{
  "openapi": "3.0.4",
  "info": {
    "title": "abFaktura API",
    "description": "Veřejné API abFaktury: kontakty, ceník, vydané a přijaté doklady, úhrady a webhooky. Návody jsou na https://api.abfaktura.cz/docs.",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api.abfaktura.cz"
    }
  ],
  "paths": {
    "/api/v1/contacts": {
      "get": {
        "tags": [
          "Kontakty"
        ],
        "summary": "Contacts, the oldest change first.",
        "parameters": [
          {
            "name": "Page",
            "in": "query",
            "description": "Page from 1.",
            "schema": {
              "maximum": 2147483647,
              "minimum": 1,
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "string"
                }
              ],
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Records on a page, at most 100.",
            "schema": {
              "maximum": 100,
              "minimum": 1,
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "string"
                }
              ],
              "format": "int32"
            }
          },
          {
            "name": "UpdatedSince",
            "in": "query",
            "description": "Only records changed after this time (ISO 8601); with the order by the change, a program syncs only what changed.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Q",
            "in": "query",
            "description": "Text in the name or the number.",
            "schema": {
              "maxLength": 100,
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ContactListPage"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactListPage"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactListPage"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "post": {
        "tags": [
          "Kontakty"
        ],
        "summary": "Adds a contact.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ContactInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/contacts/{id}": {
      "get": {
        "tags": [
          "Kontakty"
        ],
        "summary": "One contact.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "put": {
        "tags": [
          "Kontakty"
        ],
        "summary": "Changes a contact; send all its fields, a missing one is cleared. Issued documents keep the address they had.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ContactInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "Kontakty"
        ],
        "summary": "Removes a contact; documents issued to it stay.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/invoices": {
      "get": {
        "tags": [
          "Faktury vydané"
        ],
        "summary": "Issued documents, the oldest change first.",
        "parameters": [
          {
            "name": "Kind",
            "in": "query",
            "description": "Only this kind (issued documents).",
            "schema": {
              "$ref": "#/components/schemas/DocumentKindNullable"
            }
          },
          {
            "name": "IssuedFrom",
            "in": "query",
            "description": "Issued on or after the day.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "IssuedTo",
            "in": "query",
            "description": "Issued on or before the day.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Paid",
            "in": "query",
            "description": "true for paid documents, false for those with something due.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "CompanyNumber",
            "in": "query",
            "description": "IČO of the customer (issued) or the supplier (received).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "schema": {
              "maximum": 2147483647,
              "minimum": 1,
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "string"
                }
              ],
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "maximum": 100,
              "minimum": 1,
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "string"
                }
              ],
              "format": "int32"
            }
          },
          {
            "name": "UpdatedSince",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Q",
            "in": "query",
            "schema": {
              "maxLength": 100,
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentListPage"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentListPage"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentListPage"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "post": {
        "tags": [
          "Faktury vydané"
        ],
        "summary": "Issues a document; it gets the next number, your company as the supplier and your default bank account.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/invoices/{id}": {
      "get": {
        "tags": [
          "Faktury vydané"
        ],
        "summary": "One issued document.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "put": {
        "tags": [
          "Faktury vydané"
        ],
        "summary": "Changes a document; send all its fields, the lines are replaced. The kind and the links stay.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "Faktury vydané"
        ],
        "summary": "Moves a document to the deleted ones (it can be restored in the app); its number is not reused.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/invoices/{id}/payments": {
      "get": {
        "tags": [
          "Faktury vydané"
        ],
        "summary": "Payments of a document.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Payment"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Payment"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Payment"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "post": {
        "tags": [
          "Faktury vydané"
        ],
        "summary": "Records a payment and returns the document with the new amounts.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/invoices/{id}/payments/{paymentId}": {
      "delete": {
        "tags": [
          "Faktury vydané"
        ],
        "summary": "Removes a payment and returns the document with the new amounts.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "paymentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/invoices/{id}/pdf": {
      "get": {
        "tags": [
          "Faktury vydané"
        ],
        "summary": "PDF of the document as your customer gets it.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/invoices/{id}/isdoc": {
      "get": {
        "tags": [
          "Faktury vydané"
        ],
        "summary": "ISDOC (the Czech e-invoice format) of the document.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/invoices/{id}/send": {
      "post": {
        "tags": [
          "Faktury vydané"
        ],
        "summary": "E-mails the PDF of the document; it is marked as sent.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SendInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SendInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/invoices/{id}/advance-tax-document": {
      "post": {
        "tags": [
          "Faktury vydané"
        ],
        "summary": "Issues the tax document on the payments received on a proforma (daňový doklad k přijaté platbě).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/products": {
      "get": {
        "tags": [
          "Ceník"
        ],
        "summary": "Items of the price list, the oldest change first.",
        "parameters": [
          {
            "name": "Page",
            "in": "query",
            "description": "Page from 1.",
            "schema": {
              "maximum": 2147483647,
              "minimum": 1,
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "string"
                }
              ],
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Records on a page, at most 100.",
            "schema": {
              "maximum": 100,
              "minimum": 1,
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "string"
                }
              ],
              "format": "int32"
            }
          },
          {
            "name": "UpdatedSince",
            "in": "query",
            "description": "Only records changed after this time (ISO 8601); with the order by the change, a program syncs only what changed.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Q",
            "in": "query",
            "description": "Text in the name or the number.",
            "schema": {
              "maxLength": 100,
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProductListPage"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductListPage"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductListPage"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "post": {
        "tags": [
          "Ceník"
        ],
        "summary": "Adds an item.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ProductInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/products/{id}": {
      "get": {
        "tags": [
          "Ceník"
        ],
        "summary": "One item.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "put": {
        "tags": [
          "Ceník"
        ],
        "summary": "Changes an item; send all its fields.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ProductInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "Ceník"
        ],
        "summary": "Removes an item; documents with it stay.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/received-invoices": {
      "get": {
        "tags": [
          "Faktury přijaté"
        ],
        "summary": "Received invoices, the oldest change first.",
        "parameters": [
          {
            "name": "Kind",
            "in": "query",
            "description": "Only this kind (issued documents).",
            "schema": {
              "$ref": "#/components/schemas/DocumentKindNullable"
            }
          },
          {
            "name": "IssuedFrom",
            "in": "query",
            "description": "Issued on or after the day.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "IssuedTo",
            "in": "query",
            "description": "Issued on or before the day.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Paid",
            "in": "query",
            "description": "true for paid documents, false for those with something due.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "CompanyNumber",
            "in": "query",
            "description": "IČO of the customer (issued) or the supplier (received).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "schema": {
              "maximum": 2147483647,
              "minimum": 1,
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "string"
                }
              ],
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "maximum": 100,
              "minimum": 1,
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "string"
                }
              ],
              "format": "int32"
            }
          },
          {
            "name": "UpdatedSince",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Q",
            "in": "query",
            "schema": {
              "maxLength": 100,
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentListPage"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentListPage"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentListPage"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "post": {
        "tags": [
          "Faktury přijaté"
        ],
        "summary": "Records a received invoice; your company is the customer, the supplier's number goes to originalNumber.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/received-invoices/{id}": {
      "get": {
        "tags": [
          "Faktury přijaté"
        ],
        "summary": "One received invoice.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "put": {
        "tags": [
          "Faktury přijaté"
        ],
        "summary": "Changes a received invoice; send all its fields, the lines are replaced.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "Faktury přijaté"
        ],
        "summary": "Moves a received invoice to the deleted ones.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/received-invoices/{id}/payments": {
      "get": {
        "tags": [
          "Faktury přijaté"
        ],
        "summary": "Payments of a received invoice.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Payment"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Payment"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Payment"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "post": {
        "tags": [
          "Faktury přijaté"
        ],
        "summary": "Records a payment and returns the invoice with the new amounts.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/received-invoices/{id}/payments/{paymentId}": {
      "delete": {
        "tags": [
          "Faktury přijaté"
        ],
        "summary": "Removes a payment and returns the invoice with the new amounts.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "paymentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/received-invoices/{id}/isdoc": {
      "get": {
        "tags": [
          "Faktury přijaté"
        ],
        "summary": "ISDOC of the received invoice.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/webhooks": {
      "get": {
        "tags": [
          "Webhooky"
        ],
        "summary": "Webhooks of the company, at most 10.",
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Webhook"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Webhook"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Webhook"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "post": {
        "tags": [
          "Webhooky"
        ],
        "summary": "Adds a webhook; the answer has the signing secret, which is not shown again.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookWithSecret"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookWithSecret"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookWithSecret"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/webhooks/{id}": {
      "get": {
        "tags": [
          "Webhooky"
        ],
        "summary": "One webhook.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "put": {
        "tags": [
          "Webhooky"
        ],
        "summary": "Changes the address, the events or turns the webhook off.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "Webhooky"
        ],
        "summary": "Removes a webhook.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/webhooks/{id}/rotate-secret": {
      "post": {
        "tags": [
          "Webhooky"
        ],
        "summary": "Makes a new signing secret; the old one stops working at once.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookWithSecret"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookWithSecret"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookWithSecret"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/webhooks/{id}/ping": {
      "post": {
        "tags": [
          "Webhooky"
        ],
        "summary": "Sends the ping event now, to try your endpoint.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDelivery"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDelivery"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDelivery"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/webhooks/{id}/deliveries": {
      "get": {
        "tags": [
          "Webhooky"
        ],
        "summary": "Recent calls of the webhook.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebhookDelivery"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebhookDelivery"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebhookDelivery"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/webhooks/deliveries/{deliveryId}/redeliver": {
      "post": {
        "tags": [
          "Webhooky"
        ],
        "summary": "Sends a delivery again.",
        "parameters": [
          {
            "name": "deliveryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDelivery"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDelivery"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDelivery"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ApiProblem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ],
            "format": "int32"
          },
          "code": {
            "type": "string"
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "nullable": true
          }
        }
      },
      "BankAccount": {
        "type": "object",
        "properties": {
          "accountNumber": {
            "maxLength": 20,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "bankCode": {
            "maxLength": 4,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "iban": {
            "maxLength": 34,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "bic": {
            "maxLength": 11,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "variableSymbol": {
            "maxLength": 10,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "constantSymbol": {
            "maxLength": 10,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "specificSymbol": {
            "maxLength": 10,
            "minLength": 0,
            "type": "string",
            "nullable": true
          }
        },
        "description": "Bank account to pay to."
      },
      "Contact": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "companyNumber": {
            "type": "string",
            "description": "IČO.",
            "nullable": true
          },
          "taxNumber": {
            "type": "string",
            "description": "DIČ (VAT ID), e.g. CZ12345678.",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "street": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "postalCode": {
            "type": "string",
            "nullable": true
          },
          "countryCode": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2, e.g. CZ.",
            "nullable": true
          },
          "language": {
            "$ref": "#/components/schemas/Language"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "description": "Customer or supplier in the address book."
      },
      "ContactInput": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "companyNumber": {
            "maxLength": 15,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "taxNumber": {
            "maxLength": 20,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "email": {
            "maxLength": 254,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "street": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "city": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "postalCode": {
            "maxLength": 10,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "countryCode": {
            "maxLength": 2,
            "minLength": 2,
            "type": "string",
            "description": "ISO 3166-1 alpha-2, CZ when empty.",
            "nullable": true
          },
          "language": {
            "$ref": "#/components/schemas/Language"
          }
        },
        "description": "A new contact, or all fields of a changed one."
      },
      "ContactListPage": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Contact"
            }
          },
          "page": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ],
            "description": "Number of the page, from 1.",
            "format": "int32"
          },
          "pageSize": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ],
            "format": "int32"
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ],
            "description": "Records matching the filter on all pages.",
            "format": "int32"
          }
        },
        "description": "One page of a list."
      },
      "Document": {
        "required": [
          "number",
          "supplier",
          "customer",
          "currency",
          "lines",
          "vat"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "$ref": "#/components/schemas/DocumentKind"
          },
          "number": {
            "type": "string"
          },
          "originalNumber": {
            "type": "string",
            "description": "Number the supplier gave a received invoice.",
            "nullable": true
          },
          "supplier": {
            "$ref": "#/components/schemas/Party"
          },
          "customer": {
            "$ref": "#/components/schemas/Party"
          },
          "language": {
            "$ref": "#/components/schemas/Language"
          },
          "currency": {
            "type": "string"
          },
          "exchangeRate": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "enum": [
                  null
                ],
                "nullable": true
              }
            ],
            "description": "CZK for one unit of the currency, for a document in a foreign currency.",
            "format": "double",
            "nullable": true
          },
          "issueDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "taxableSupplyDate": {
            "type": "string",
            "description": "DUZP; empty on a proforma, a quote and for a non VAT payer.",
            "format": "date-time",
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "description": "Due date; on a quote its validity.",
            "format": "date-time",
            "nullable": true
          },
          "paymentMethod": {
            "$ref": "#/components/schemas/PaymentMethod"
          },
          "bankAccount": {
            "oneOf": [
              {
                "enum": [
                  null
                ],
                "nullable": true
              },
              {
                "$ref": "#/components/schemas/BankAccount"
              }
            ]
          },
          "vatPayer": {
            "type": "boolean"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Line"
            }
          },
          "discount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "enum": [
                  null
                ],
                "nullable": true
              }
            ],
            "description": "Percent off the whole document.",
            "format": "double",
            "nullable": true
          },
          "vat": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VatSummary"
            }
          },
          "subtotal": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "description": "Total without VAT.",
            "format": "double"
          },
          "vatTotal": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "format": "double"
          },
          "rounding": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "description": "Haléřové vyrovnání to whole crowns.",
            "format": "double"
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "format": "double"
          },
          "amountPaid": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "format": "double"
          },
          "amountDue": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "format": "double"
          },
          "paid": {
            "type": "boolean"
          },
          "paidAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "correctedDocumentId": {
            "type": "string",
            "description": "Invoice a credit note corrects.",
            "format": "uuid",
            "nullable": true
          },
          "correctionReason": {
            "type": "string",
            "nullable": true
          },
          "sourceProformaId": {
            "type": "string",
            "description": "Proforma a final invoice settles.",
            "format": "uuid",
            "nullable": true
          },
          "sourceQuoteId": {
            "type": "string",
            "description": "Quote the document was issued from.",
            "format": "uuid",
            "nullable": true
          },
          "sentAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "description": "Issued or received document."
      },
      "DocumentInput": {
        "required": [
          "lines"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "oneOf": [
              {
                "enum": [
                  null
                ],
                "nullable": true
              },
              {
                "$ref": "#/components/schemas/DocumentKindNullable"
              }
            ]
          },
          "number": {
            "maxLength": 38,
            "minLength": 0,
            "type": "string",
            "description": "Your number; empty takes the next one from the number series.",
            "nullable": true
          },
          "numberSeriesId": {
            "type": "string",
            "description": "Number series to number from, its default series when empty.",
            "format": "uuid",
            "nullable": true
          },
          "originalNumber": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string",
            "description": "Number the supplier gave a received invoice.",
            "nullable": true
          },
          "contactId": {
            "type": "string",
            "description": "The customer (issued) or the supplier (received) from the address book; Party wins when both are sent.",
            "format": "uuid",
            "nullable": true
          },
          "customer": {
            "oneOf": [
              {
                "enum": [
                  null
                ],
                "nullable": true
              },
              {
                "$ref": "#/components/schemas/Party"
              }
            ]
          },
          "supplier": {
            "oneOf": [
              {
                "enum": [
                  null
                ],
                "nullable": true
              },
              {
                "$ref": "#/components/schemas/Party"
              }
            ]
          },
          "language": {
            "oneOf": [
              {
                "enum": [
                  null
                ],
                "nullable": true
              },
              {
                "$ref": "#/components/schemas/LanguageNullable"
              }
            ]
          },
          "currency": {
            "maxLength": 3,
            "minLength": 3,
            "type": "string",
            "description": "ISO 4217, CZK when empty.",
            "nullable": true
          },
          "exchangeRate": {
            "maximum": 1000000,
            "minimum": 0.000001,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "enum": [
                  null
                ],
                "nullable": true
              }
            ],
            "description": "CZK for one unit; the rate of the Czech National Bank on the decisive day when empty.",
            "format": "double",
            "nullable": true
          },
          "issueDate": {
            "type": "string",
            "description": "Today in Prague when empty.",
            "format": "date-time",
            "nullable": true
          },
          "taxableSupplyDate": {
            "type": "string",
            "description": "DUZP, the issue date when empty.",
            "format": "date-time",
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "description": "The issue date and DueInDays when empty.",
            "format": "date-time",
            "nullable": true
          },
          "dueInDays": {
            "maximum": 365,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ],
            "format": "int32"
          },
          "paymentMethod": {
            "$ref": "#/components/schemas/PaymentMethod"
          },
          "bankAccount": {
            "oneOf": [
              {
                "enum": [
                  null
                ],
                "nullable": true
              },
              {
                "$ref": "#/components/schemas/BankAccount"
              }
            ]
          },
          "vatPayer": {
            "type": "boolean",
            "description": "Whether VAT is charged; whether your company is a VAT payer when empty.",
            "nullable": true
          },
          "lines": {
            "maxItems": 500,
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineInput"
            }
          },
          "discount": {
            "maximum": 100,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "enum": [
                  null
                ],
                "nullable": true
              }
            ],
            "description": "Percent off the whole document.",
            "format": "double",
            "nullable": true
          },
          "roundToCrowns": {
            "type": "boolean",
            "description": "Round the total to whole crowns."
          },
          "note": {
            "maxLength": 2000,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "correctedDocumentId": {
            "type": "string",
            "description": "Invoice a credit note corrects (required for a credit note).",
            "format": "uuid",
            "nullable": true
          },
          "correctionReason": {
            "maxLength": 500,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "sourceProformaId": {
            "type": "string",
            "description": "Proforma the invoice settles; what was paid on it is paid on the invoice.",
            "format": "uuid",
            "nullable": true
          },
          "sourceQuoteId": {
            "type": "string",
            "description": "Quote the invoice or proforma is issued from.",
            "format": "uuid",
            "nullable": true
          }
        },
        "description": "A new document, or all fields of a changed one. The totals are computed from the lines."
      },
      "DocumentKind": {
        "enum": [
          "invoice",
          "creditNote",
          "proforma",
          "advanceTaxDocument",
          "quote"
        ],
        "description": "What an issued document is."
      },
      "DocumentKindNullable": {
        "enum": [
          "invoice",
          "creditNote",
          "proforma",
          "advanceTaxDocument",
          "quote",
          null
        ]
      },
      "DocumentListPage": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Document"
            }
          },
          "page": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ],
            "description": "Number of the page, from 1.",
            "format": "int32"
          },
          "pageSize": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ],
            "format": "int32"
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ],
            "description": "Records matching the filter on all pages.",
            "format": "int32"
          }
        },
        "description": "One page of a list."
      },
      "Language": {
        "enum": [
          "cs",
          "en",
          "bilingual"
        ],
        "description": "Language of a document: Czech, English, or both side by side."
      },
      "LanguageNullable": {
        "enum": [
          "cs",
          "en",
          "bilingual",
          null
        ]
      },
      "Line": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "format": "double"
          },
          "unitPrice": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "format": "double"
          },
          "priceIncludesVat": {
            "type": "boolean",
            "description": "The unit price contains VAT."
          },
          "vatRate": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "format": "double"
          },
          "vatClassification": {
            "type": "string",
            "description": "Členění DPH, e.g. 01,02 for a domestic supply or 40,41 for a domestic purchase.",
            "nullable": true
          },
          "discount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "enum": [
                  null
                ],
                "nullable": true
              }
            ],
            "description": "Percent off the line.",
            "format": "double",
            "nullable": true
          },
          "amount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "description": "Quantity × unit price after the discount, as entered (with or without VAT).",
            "format": "double"
          }
        }
      },
      "LineInput": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "description": {
            "maxLength": 1000,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "quantity": {
            "maximum": 999999999,
            "minimum": -999999999,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "format": "double"
          },
          "unitPrice": {
            "maximum": 999999999,
            "minimum": -999999999,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "format": "double"
          },
          "priceIncludesVat": {
            "type": "boolean"
          },
          "vatRate": {
            "maximum": 100,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "enum": [
                  null
                ],
                "nullable": true
              }
            ],
            "description": "VAT rate in percent; the basic rate valid on the date of the taxable supply (21 % today) when empty for a VAT payer, ignored otherwise.",
            "format": "double",
            "nullable": true
          },
          "vatClassification": {
            "maxLength": 10,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "discount": {
            "maximum": 100,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "enum": [
                  null
                ],
                "nullable": true
              }
            ],
            "format": "double",
            "nullable": true
          }
        }
      },
      "Party": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "companyNumber": {
            "maxLength": 15,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "taxNumber": {
            "maxLength": 20,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "street": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "city": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "postalCode": {
            "maxLength": 10,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "countryCode": {
            "maxLength": 2,
            "minLength": 2,
            "type": "string",
            "nullable": true
          },
          "email": {
            "maxLength": 254,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "phone": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string",
            "nullable": true
          }
        },
        "description": "Supplier or customer as printed on the document."
      },
      "Payment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "amount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "description": "In the currency of the document; negative for a refund.",
            "format": "double"
          },
          "method": {
            "$ref": "#/components/schemas/PaymentMethod"
          },
          "exchangeRate": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "enum": [
                  null
                ],
                "nullable": true
              }
            ],
            "description": "CZK for one unit of the document currency on the payment day.",
            "format": "double",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          }
        },
        "description": "Payment of a document."
      },
      "PaymentInput": {
        "required": [
          "amount"
        ],
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "description": "Today when empty.",
            "format": "date-time",
            "nullable": true
          },
          "amount": {
            "maximum": 999999999,
            "minimum": -999999999,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "description": "In the currency of the document, not zero; negative for a refund of an overpayment.",
            "format": "double"
          },
          "method": {
            "$ref": "#/components/schemas/PaymentMethod"
          },
          "exchangeRate": {
            "maximum": 1000000,
            "minimum": 0.000001,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "enum": [
                  null
                ],
                "nullable": true
              }
            ],
            "description": "The rate of the Czech National Bank on the payment day when empty.",
            "format": "double",
            "nullable": true
          },
          "note": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string",
            "nullable": true
          }
        }
      },
      "PaymentMethod": {
        "enum": [
          "none",
          "bankTransfer",
          "card",
          "cash",
          "cashOnDelivery",
          "credit",
          "compensation"
        ]
      },
      "Product": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "description": "Your own code of the item.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "unit": {
            "type": "string",
            "description": "Unit of measure, e.g. ks, hod.",
            "nullable": true
          },
          "unitPrice": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "format": "double"
          },
          "priceIncludesVat": {
            "type": "boolean",
            "description": "The unit price contains VAT."
          },
          "vatRate": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "description": "VAT rate in percent: 21, 12 or 0.",
            "format": "double"
          },
          "currency": {
            "type": "string",
            "description": "ISO 4217, CZK when empty.",
            "nullable": true
          },
          "ean": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "description": "Item of the price list."
      },
      "ProductInput": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "code": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "description": {
            "maxLength": 500,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "unit": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "unitPrice": {
            "maximum": 999999999,
            "minimum": -999999999,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "format": "double"
          },
          "priceIncludesVat": {
            "type": "boolean"
          },
          "vatRate": {
            "maximum": 100,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "format": "double"
          },
          "currency": {
            "maxLength": 3,
            "minLength": 3,
            "type": "string",
            "nullable": true
          },
          "ean": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string",
            "nullable": true
          }
        },
        "description": "A new item, or all fields of a changed one."
      },
      "ProductListPage": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Product"
            }
          },
          "page": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ],
            "description": "Number of the page, from 1.",
            "format": "int32"
          },
          "pageSize": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ],
            "format": "int32"
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ],
            "description": "Records matching the filter on all pages.",
            "format": "int32"
          }
        },
        "description": "One page of a list."
      },
      "SendInput": {
        "required": [
          "to"
        ],
        "type": "object",
        "properties": {
          "to": {
            "maxLength": 1000,
            "minLength": 3,
            "type": "string",
            "description": "Recipient; more addresses separated by a comma."
          },
          "subject": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string",
            "description": "Subject of your template for documents when empty.",
            "nullable": true
          },
          "message": {
            "maxLength": 5000,
            "minLength": 0,
            "type": "string",
            "description": "Text of your template for documents when empty.",
            "nullable": true
          }
        },
        "description": "E-mail with the PDF of the document."
      },
      "VatSummary": {
        "type": "object",
        "properties": {
          "rate": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "format": "double"
          },
          "base": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "format": "double"
          },
          "vat": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "format": "double"
          }
        }
      },
      "Webhook": {
        "required": [
          "url",
          "events"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Events it gets, or \"*\" for all."
          },
          "enabled": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastDelivery": {
            "oneOf": [
              {
                "enum": [
                  null
                ],
                "nullable": true
              },
              {
                "$ref": "#/components/schemas/WebhookDelivery"
              }
            ]
          }
        },
        "description": "Address your program is told about changes of documents at."
      },
      "WebhookDelivery": {
        "required": [
          "event",
          "state"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "event": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "description": "pending, delivered or failed."
          },
          "attempts": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ],
            "format": "int32"
          },
          "statusCode": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              },
              {
                "enum": [
                  null
                ],
                "nullable": true
              }
            ],
            "description": "HTTP status your program answered the last attempt with.",
            "format": "int32",
            "nullable": true
          },
          "error": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastAttemptAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "nextAttemptAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "description": "One call of a webhook with its attempts."
      },
      "WebhookInput": {
        "required": [
          "url",
          "events"
        ],
        "type": "object",
        "properties": {
          "url": {
            "maxLength": 500,
            "minLength": 0,
            "type": "string",
            "description": "Public HTTPS address.",
            "format": "uri"
          },
          "description": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string",
            "nullable": true
          },
          "events": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Events from /docs/webhooky, or [\"*\"] for all."
          },
          "enabled": {
            "type": "boolean"
          }
        }
      },
      "WebhookWithSecret": {
        "required": [
          "secret",
          "url",
          "events"
        ],
        "type": "object",
        "properties": {
          "secret": {
            "type": "string",
            "description": "Checks the X-Abfaktura-Signature header; keep it secret."
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Events it gets, or \"*\" for all."
          },
          "enabled": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastDelivery": {
            "oneOf": [
              {
                "enum": [
                  null
                ],
                "nullable": true
              },
              {
                "$ref": "#/components/schemas/WebhookDelivery"
              }
            ]
          }
        },
        "description": "A new webhook with its signing secret, shown only now."
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "description": "API klíč (abf_...) z Nastavení › API klíče, nebo přístupový token OAuth 2.0 z /api/v1/oauth/token",
        "scheme": "bearer"
      }
    }
  },
  "tags": [
    {
      "name": "Kontakty"
    },
    {
      "name": "Faktury vydané"
    },
    {
      "name": "Ceník"
    },
    {
      "name": "Faktury přijaté"
    },
    {
      "name": "Webhooky"
    }
  ]
}