openapi: 3.0.0
servers:
  - description: Billingo API
    url: https://api.billingo.hu/v3
info:
  contact:
    email: hello@billingo.hu
    name: Billingo Support
    url: https://www.billingo.hu/kapcsolat
  description: This is a Billingo API v3 documentation. Our API based on REST software architectural style. API has resource-oriented URLs, accepts JSON-encoded request bodies and returns JSON-encoded responses. To use this API you have to generate a new API key on our [site](https://app.billingo.hu/api-key). After that, you can test your API key on this page.
  termsOfService: https://www.billingo.hu/felhasznalasi-feltetelek
  title: Billingo API v3
  version: 3.0.7
  x-apisguru-categories:
    - financial
  x-logo:
    url: https://www.billingo.hu/images/billingo_logo.svg
  x-origin:
    - format: openapi
      url: https://api.swaggerhub.com/apis/Billingo/Billingo/3.0.7
      version: "3.0"
  x-providerName: billingo.hu
externalDocs:
  description: Find out more information about Billingo API v3 usage.
  url: https://support.billingo.hu/content/446136358
security:
  - api_key: []
tags:
  - description: Document object represents your invoice.
    name: Document
  - description: DocumentBlock object represents your invoice pad.
    name: DocumentBlock
  - description: Partner object represents your client.
    name: Partner
  - description: Product object represents your document's product.
    name: Product
  - description: BankAccount object represents your bank account information.
    name: BankAccount
paths:
  /bank-accounts:
    get:
      description: Returns a list of your bank accounts. The bank accounts are returned sorted by creation date, with the most recent bank account appearing first.
      operationId: ListBankAccount
      parameters:
        - in: query
          name: page
          required: false
          schema:
            default: "1"
            type: integer
        - in: query
          name: per_page
          required: false
          schema:
            default: 25
            maximum: 100
            minimum: 1
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BankAccountList"
          description: Success response
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "422":
          $ref: "#/components/responses/UnprocessableEntity"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: List all bank account
      tags:
        - BankAccount
    post:
      description: Create a new bank account. Returns a bank account object if the create is succeded.
      operationId: CreateBankAccount
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BankAccount"
        description: BankAccount object that you would like to store.
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BankAccount"
          description: BankAccount created successfully.
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "422":
          $ref: "#/components/responses/UnprocessableEntity"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: Create a bank account
      tags:
        - BankAccount
  "/bank-accounts/{id}":
    delete:
      description: Delete an existing bank account.
      operationId: DeleteBankAccount
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        "204":
          description: Bank account deleted successfully.
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: Delete a bank account
      tags:
        - BankAccount
    get:
      description: Retrieves the details of an existing bank account.
      operationId: GetBankAccount
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BankAccount"
          description: Success response
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/UnprocessableEntity"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: Retrieve a bank account
      tags:
        - BankAccount
    put:
      description: Update an existing bank accounts. Returns a bank account object if the update is succeded.
      operationId: UpdateBankAccount
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BankAccount"
        description: Bank account object that you would like to update.
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BankAccount"
          description: Bank account updated successfully.
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/UnprocessableEntity"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: Update a bank account
      tags:
        - BankAccount
  /currencies:
    get:
      description: Return with the exchange value of given currencies.
      operationId: GetConversionRate
      parameters:
        - in: query
          name: from
          required: true
          schema:
            $ref: "#/components/schemas/Currency"
        - in: query
          name: to
          required: true
          schema:
            $ref: "#/components/schemas/Currency"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConversationRate"
          description: Currencies exchange rate returned.
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "422":
          $ref: "#/components/responses/UnprocessableEntity"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: Get currencies exchange rate.
      tags:
        - Currency
  /document-blocks:
    get:
      description: Returns a list of your document blocks. The document blocks are returned sorted by creation date, with the most recent document blocks appearing first.
      operationId: ListDocumentBlock
      parameters:
        - in: query
          name: page
          required: false
          schema:
            default: "1"
            type: integer
        - in: query
          name: per_page
          required: false
          schema:
            default: 25
            maximum: 100
            minimum: 1
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DocumentBlockList"
          description: Success response
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "422":
          $ref: "#/components/responses/UnprocessableEntity"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: List all document blocks
      tags:
        - DocumentBlock
  /documents:
    get:
      description: Returns a list of your documents. The documents are returned sorted by creation date, with the most recent documents appearing first.
      operationId: ListDocument
      parameters:
        - in: query
          name: page
          required: false
          schema:
            default: "1"
            type: integer
        - in: query
          name: per_page
          required: false
          schema:
            default: 25
            maximum: 100
            minimum: 1
            type: integer
        - description: Filter documents by the identifier of your DocumentBlock.
          in: query
          name: block_id
          required: false
          schema:
            type: integer
        - description: Filter documents by the identifier of your Partner.
          in: query
          name: partner_id
          required: false
          schema:
            type: integer
        - description: Filter documents by PaymentMethod value.
          example: cash
          in: query
          name: payment_method
          required: false
          schema:
            $ref: "#/components/schemas/PaymentMethod"
        - description: Filter documents by PaymentStatus value.
          example: paid
          in: query
          name: payment_status
          required: false
          schema:
            $ref: "#/components/schemas/PaymentStatus"
        - description: Filter documents by date.
          example: 2020-05-15
          in: query
          name: start_date
          required: false
          schema:
            format: date
            type: string
        - description: Filter documents by date.
          example: 2020-05-15
          in: query
          name: end_date
          required: false
          schema:
            format: date
            type: string
        - description: Starting number of the document, should not contain year or any other formatting. Required if `start_year` given
          example: "1"
          in: query
          name: start_number
          required: false
          schema:
            type: integer
        - description: Ending number of the document, should not contain year or any other formatting. Required if `end_year` given
          example: "10"
          in: query
          name: end_number
          required: false
          schema:
            type: integer
        - description: Year for `start_number` parameter. Required if `start_number` given.
          example: "2020"
          in: query
          name: start_year
          required: false
          schema:
            type: integer
        - description: Year for `end_number` parameter. Required if `end_number` given.
          example: "2020"
          in: query
          name: end_year
          required: false
          schema:
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DocumentList"
          description: Success response
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "422":
          $ref: "#/components/responses/UnprocessableEntity"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: List all documents
      tags:
        - Document
    post:
      description: Create a new document. Returns a document object if the create is succeded.
      operationId: CreateDocument
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DocumentInsert"
        description: DocumentInsert object that you would like to store.
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Document"
          description: Document created successfully.
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "422":
          $ref: "#/components/responses/UnprocessableEntity"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: Create a document
      tags:
        - Document
  "/documents/{id}":
    get:
      description: Retrieves the details of an existing document.
      operationId: GetDocument
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Document"
          description: Success response
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/UnprocessableEntity"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: Retrieve a document
      tags:
        - Document
  "/documents/{id}/cancel":
    post:
      description: Cancel a document. Returns a cancellation document object if the cancellation is succeded.
      operationId: CancelDocument
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Document"
          description: Document cancellation successfully. Cancel document returned.
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/UnprocessableEntity"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: Cancel a document
      tags:
        - Document
  "/documents/{id}/create-from-proforma":
    post:
      description: Create a new document from proforma. Returns a document object if the create is succeded.
      operationId: CreateDocumentFromProforma
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Document"
          description: Document created successfully.
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/UnprocessableEntity"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: Create a document from proforma.
      tags:
        - Document
  "/documents/{id}/download":
    get:
      description: Download a document. Returns a document in PDF format.
      operationId: DownloadDocument
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        "200":
          content:
            application/pdf:
              schema:
                format: binary
                type: string
          description: Document PDF file.
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "202":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ClientError"
          description: Document PDF has not generated yet. You should try to download again later.
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/UnprocessableEntity"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: Download a document in PDF format.
      tags:
        - Document
  "/documents/{id}/online-szamla":
    get:
      description: Retrieves the details of an existing document status.
      operationId: GetOnlineSzamlaStatus
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OnlineSzamlaStatus"
          description: Success response
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/UnprocessableEntity"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: Retrieve a document Online Számla status
      tags:
        - Document
  "/documents/{id}/payments":
    delete:
      description: Delete all exist payment history on document.
      operationId: DeletePayment
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/PaymentHistory"
                type: array
          description: Payment history deleted successfully.
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: Delete all payment history on document
      tags:
        - Document
    get:
      description: Retrieves the details of payment history an existing document.
      operationId: GetPayment
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/PaymentHistory"
                type: array
          description: Success response
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/UnprocessableEntity"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: Retrieve a payment histroy
      tags:
        - Document
    put:
      description: Update payment history an existing document. Returns a payment history object if the update is succeded.
      operationId: UpdatePayment
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              items:
                $ref: "#/components/schemas/PaymentHistory"
              type: array
        description: Payment history object that you would like to update.
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/PaymentHistory"
                type: array
          description: Payment history updated successfully.
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/UnprocessableEntity"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: Update payment history
      tags:
        - Document
  "/documents/{id}/public-url":
    get:
      description: Retrieves public url to download an existing document.
      operationId: GetPublicUrl
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DocumentPublicUrl"
          description: Success response
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/UnprocessableEntity"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: Retrieve a document download public url.
      tags:
        - Document
  "/documents/{id}/send":
    post:
      description: Returns a list of emails, where the invoice is sent.
      operationId: SendDocument
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SendDocument"
        description: List of email-s where you want to send the invoice.
        required: false
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SendDocument"
          description: List of email adresses where the invoice sent.
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/UnprocessableEntity"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: Send invoice to given email adresses.
      tags:
        - Document
  /organization:
    get:
      description: Retrieves the data of organization.
      operationId: GetOrganizationData
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OrganizationData"
          description: Success response
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "422":
          $ref: "#/components/responses/UnprocessableEntity"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: Retrieve a organization data.
      tags:
        - Organization
  /partners:
    get:
      description: Returns a list of your partners. The partners are returned sorted by creation date, with the most recent partners appearing first.
      operationId: ListPartner
      parameters:
        - in: query
          name: page
          required: false
          schema:
            default: "1"
            type: integer
        - in: query
          name: per_page
          required: false
          schema:
            default: 25
            maximum: 100
            minimum: 1
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PartnerList"
          description: Success response
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "422":
          $ref: "#/components/responses/UnprocessableEntity"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: List all partners
      tags:
        - Partner
    post:
      description: Create a new partner. Returns a partner object if the create is succeded.
      operationId: CreatePartner
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PartnerUpsert"
        description: PartnerUpsert object that you would like to store.
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Partner"
          description: Partner created successfully.
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "422":
          $ref: "#/components/responses/UnprocessableEntity"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: Create a partner
      tags:
        - Partner
  "/partners/{id}":
    delete:
      description: Delete an existing partner.
      operationId: DeletePartner
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        "204":
          description: Partner deleted successfully.
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: Delete a partner
      tags:
        - Partner
    get:
      description: Retrieves the details of an existing partner.
      operationId: GetPartner
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Partner"
          description: Success response
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/UnprocessableEntity"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: Retrieve a partner
      tags:
        - Partner
    put:
      description: Update an existing partner. Returns a partner object if the update is succeded.
      operationId: UpdatePartner
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PartnerUpsert"
        description: Partner object that you would like to update.
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Partner"
          description: Partner updated successfully.
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/UnprocessableEntity"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: Update a partner
      tags:
        - Partner
  /products:
    get:
      description: Returns a list of your products. The partners are returned sorted by creation date, with the most recent partners appearing first.
      operationId: ListProduct
      parameters:
        - in: query
          name: page
          required: false
          schema:
            default: "1"
            type: integer
        - in: query
          name: per_page
          required: false
          schema:
            default: 25
            maximum: 100
            minimum: 1
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductList"
          description: Success response
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "422":
          $ref: "#/components/responses/UnprocessableEntity"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: List all product
      tags:
        - Product
    post:
      description: Create a new product. Returns a product object if the create is succeded.
      operationId: CreateProduct
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Product"
        description: Product object that you would like to store.
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Product"
          description: Product created successfully.
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "422":
          $ref: "#/components/responses/UnprocessableEntity"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: Create a product
      tags:
        - Product
  "/products/{id}":
    delete:
      description: Delete an existing product.
      operationId: DeleteProduct
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        "204":
          description: Product deleted successfully.
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: Delete a product
      tags:
        - Product
    get:
      description: Retrieves the details of an existing product.
      operationId: GetProduct
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Product"
          description: Success response
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/UnprocessableEntity"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: Retrieve a product
      tags:
        - Product
    put:
      description: Update an existing product. Returns a product object if the update is succeded.
      operationId: UpdateProduct
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Product"
        description: Product object that you would like to update.
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Product"
          description: Product updated successfully.
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/UnprocessableEntity"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: Update a product
      tags:
        - Product
  "/utils/convert-legacy-id/{id}":
    get:
      description: Retrieves the API v3 ID.
      operationId: GetId
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Id"
          description: Success response
          headers:
            Retry-After:
              description: How many seconds you have to wait before making new request.
              schema:
                format: int32
                type: integer
            X-RateLimit-Limit:
              description: Request limit per minute.
              schema:
                format: int32
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests left for the time window.
              schema:
                format: int32
                type: integer
            X-RateLimit-Reset:
              description: The timestamp at which the current rate limit window resets.
              schema:
                format: int32
                type: integer
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/UnprocessableEntity"
        "500":
          $ref: "#/components/responses/ServerError"
      summary: Convert legacy ID to v3 ID.
      tags:
        - Util
components:
  responses:
    BadRequest:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ClientErrorResponse"
      description: The request is malformed.
      headers:
        Retry-After:
          description: How many seconds you have to wait before making new request.
          schema:
            format: int32
            type: integer
        X-RateLimit-Limit:
          description: Request limit per minute.
          schema:
            format: int32
            type: integer
        X-RateLimit-Remaining:
          description: The number of requests left for the time window.
          schema:
            format: int32
            type: integer
        X-RateLimit-Reset:
          description: The timestamp at which the current rate limit window resets.
          schema:
            format: int32
            type: integer
    Forbidden:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ClientErrorResponse"
      description: Authenticated user doesn't have access to the resource.
      headers:
        Retry-After:
          description: How many seconds you have to wait before making new request.
          schema:
            format: int32
            type: integer
        X-RateLimit-Limit:
          description: Request limit per minute.
          schema:
            format: int32
            type: integer
        X-RateLimit-Remaining:
          description: The number of requests left for the time window.
          schema:
            format: int32
            type: integer
        X-RateLimit-Reset:
          description: The timestamp at which the current rate limit window resets.
          schema:
            format: int32
            type: integer
    NotFound:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ClientErrorResponse"
      description: Non-existent resource is requested.
      headers:
        Retry-After:
          description: How many seconds you have to wait before making new request.
          schema:
            format: int32
            type: integer
        X-RateLimit-Limit:
          description: Request limit per minute.
          schema:
            format: int32
            type: integer
        X-RateLimit-Remaining:
          description: The number of requests left for the time window.
          schema:
            format: int32
            type: integer
        X-RateLimit-Reset:
          description: The timestamp at which the current rate limit window resets.
          schema:
            format: int32
            type: integer
    ServerError:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ServerErrorResponse"
      description: Internal server error.
      headers:
        Retry-After:
          description: How many seconds you have to wait before making new request.
          schema:
            format: int32
            type: integer
        X-RateLimit-Limit:
          description: Request limit per minute.
          schema:
            format: int32
            type: integer
        X-RateLimit-Remaining:
          description: The number of requests left for the time window.
          schema:
            format: int32
            type: integer
        X-RateLimit-Reset:
          description: The timestamp at which the current rate limit window resets.
          schema:
            format: int32
            type: integer
    Unauthorized:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ClientErrorResponse"
      description: Authorization information is missing or invalid.
      headers:
        Retry-After:
          description: How many seconds you have to wait before making new request.
          schema:
            format: int32
            type: integer
        X-RateLimit-Limit:
          description: Request limit per minute.
          schema:
            format: int32
            type: integer
        X-RateLimit-Remaining:
          description: The number of requests left for the time window.
          schema:
            format: int32
            type: integer
        X-RateLimit-Reset:
          description: The timestamp at which the current rate limit window resets.
          schema:
            format: int32
            type: integer
    UnprocessableEntity:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ValidationErrorResponse"
      description: Validation errors occured.
      headers:
        Retry-After:
          description: How many seconds you have to wait before making new request.
          schema:
            format: int32
            type: integer
        X-RateLimit-Limit:
          description: Request limit per minute.
          schema:
            format: int32
            type: integer
        X-RateLimit-Remaining:
          description: The number of requests left for the time window.
          schema:
            format: int32
            type: integer
        X-RateLimit-Reset:
          description: The timestamp at which the current rate limit window resets.
          schema:
            format: int32
            type: integer
  schemas:
    Address:
      properties:
        address:
          type: string
        city:
          type: string
        country_code:
          $ref: "#/components/schemas/Country"
        post_code:
          type: string
      required:
        - country_code
        - post_code
        - city
        - address
      type: object
    BankAccount:
      properties:
        account_number:
          type: string
        account_number_iban:
          type: string
        currency:
          $ref: "#/components/schemas/Currency"
        id:
          readOnly: true
          type: integer
        name:
          type: string
        need_qr:
          default: "false"
          type: boolean
        swift:
          type: string
      required:
        - name
        - account_number
        - currency
      type: object
    BankAccountList:
      description: A object with a data property that contains an array of up to limit bank accounts. Each entry in the array is a separate bank account object. If no more bank accounts are available, the resulting array will be empty.
      properties:
        current_page:
          type: integer
        data:
          items:
            $ref: "#/components/schemas/BankAccount"
          type: array
        last_page:
          type: integer
        next_page_url:
          type: string
        per_page:
          type: integer
        prev_page_url:
          type: string
        total:
          type: integer
      type: object
    ClientError:
      properties:
        message:
          type: string
      type: object
    ClientErrorResponse:
      example:
        error:
          message: "Authorization information (Header: %s) is missing or invalid."
      properties:
        error:
          $ref: "#/components/schemas/ClientError"
      type: object
    ConversationRate:
      properties:
        conversation_rate:
          format: float
          type: number
        from_currency:
          $ref: "#/components/schemas/Currency"
        to_currency:
          $ref: "#/components/schemas/Currency"
      type: object
    Country:
      enum:
        - ""
        - AC
        - AD
        - AE
        - AF
        - AG
        - AI
        - AL
        - AM
        - AO
        - AQ
        - AR
        - AS
        - AT
        - AU
        - AW
        - AX
        - AZ
        - BA
        - BB
        - BD
        - BE
        - BF
        - BG
        - BH
        - BI
        - BJ
        - BL
        - BM
        - BN
        - BO
        - BQ
        - BR
        - BS
        - BT
        - BW
        - BY
        - BZ
        - CA
        - CC
        - CD
        - CF
        - CG
        - CH
        - CI
        - CK
        - CL
        - CM
        - CN
        - CO
        - CR
        - CU
        - CV
        - CW
        - CX
        - CY
        - CZ
        - DE
        - DG
        - DJ
        - DK
        - DM
        - DO
        - DZ
        - EA
        - EC
        - EE
        - EG
        - EH
        - ER
        - ES
        - ET
        - FI
        - FJ
        - FK
        - FM
        - FO
        - FR
        - GA
        - GB
        - GD
        - GE
        - GF
        - GG
        - GH
        - GI
        - GL
        - GM
        - GN
        - GP
        - GQ
        - GR
        - GS
        - GT
        - GU
        - GW
        - GY
        - HK
        - HN
        - HR
        - HT
        - HU
        - IC
        - ID
        - IE
        - IL
        - IM
        - IN
        - IO
        - IQ
        - IR
        - IS
        - IT
        - JE
        - JM
        - JO
        - JP
        - KE
        - KG
        - KH
        - KI
        - KM
        - KN
        - KP
        - KR
        - KW
        - KY
        - KZ
        - LA
        - LB
        - LC
        - LI
        - LK
        - LR
        - LS
        - LT
        - LU
        - LV
        - LY
        - MA
        - MC
        - MD
        - ME
        - MF
        - MG
        - MH
        - MK
        - ML
        - MM
        - MN
        - MO
        - MP
        - MQ
        - MR
        - MS
        - MT
        - MU
        - MV
        - MW
        - MX
        - MY
        - MZ
        - NA
        - NC
        - NE
        - NF
        - NG
        - NI
        - NL
        - NO
        - NP
        - NR
        - NU
        - NZ
        - OM
        - PA
        - PE
        - PF
        - PG
        - PH
        - PK
        - PL
        - PM
        - PN
        - PR
        - PS
        - PT
        - PW
        - PY
        - QA
        - RE
        - RO
        - RS
        - RU
        - RW
        - SA
        - SB
        - SC
        - SD
        - SE
        - SG
        - SH
        - SI
        - SJ
        - SK
        - SL
        - SM
        - SN
        - SO
        - SR
        - SS
        - ST
        - SV
        - SX
        - SY
        - SZ
        - TA
        - TC
        - TD
        - TF
        - TG
        - TH
        - TJ
        - TK
        - TL
        - TM
        - TN
        - TO
        - TR
        - TT
        - TV
        - TW
        - TZ
        - UA
        - UG
        - UM
        - US
        - UY
        - UZ
        - VA
        - VC
        - VE
        - VG
        - VI
        - VN
        - VU
        - WF
        - WS
        - XA
        - XB
        - XK
        - YE
        - YT
        - ZA
        - ZM
        - ZW
      type: string
    Currency:
      enum:
        - AUD
        - BGN
        - BRL
        - CAD
        - CHF
        - CNY
        - CZK
        - DKK
        - EUR
        - GBP
        - HKD
        - HRK
        - HUF
        - IDR
        - ILS
        - INR
        - ISK
        - JPY
        - KRW
        - LTL
        - LVL
        - MXN
        - MYR
        - NOK
        - NZD
        - PHP
        - PLN
        - RON
        - RSD
        - RUB
        - SEK
        - SGD
        - THB
        - TRY
        - UAH
        - USD
        - ZAR
      type: string
    Document:
      description: Document object representing your invoice.
      properties:
        block_id:
          description: DocumentBlock's identifier.
          type: integer
        cancelled:
          type: boolean
        comment:
          type: string
        conversion_rate:
          format: float
          type: number
        currency:
          $ref: "#/components/schemas/Currency"
        due_date:
          format: date
          type: string
        electronic:
          type: boolean
        fulfillment_date:
          format: date
          type: string
        gross_total:
          description: The document's gross total price.
          format: float
          type: number
        id:
          description: The document's unique identifier.
          type: integer
        invoice_date:
          format: date
          type: string
        invoice_number:
          description: The document's invoice number.
          example: PREFIX / 2020-000001
          type: string
        items:
          items:
            $ref: "#/components/schemas/DocumentItem"
          type: array
        language:
          $ref: "#/components/schemas/DocumentLanguage"
        notification_status:
          $ref: "#/components/schemas/DocumentNotificationStatus"
        organization:
          $ref: "#/components/schemas/DocumentOrganization"
        paid_date:
          format: date
          type: string
        partner:
          $ref: "#/components/schemas/Partner"
        payment_method:
          $ref: "#/components/schemas/PaymentMethod"
        payment_status:
          $ref: "#/components/schemas/PaymentStatus"
        settings:
          $ref: "#/components/schemas/DocumentSettings"
        summary:
          $ref: "#/components/schemas/DocumentSummary"
        tags:
          items:
            type: string
          type: array
        type:
          $ref: "#/components/schemas/DocumentType"
      type: object
    DocumentBankAccount:
      properties:
        account_number:
          type: string
        account_number_iban:
          type: string
        id:
          readOnly: true
          type: integer
        name:
          type: string
        swift:
          type: string
      required:
        - name
        - account_number
      type: object
    DocumentBlock:
      properties:
        custom_field1:
          type: string
        custom_field2:
          type: string
        id:
          type: integer
        name:
          type: string
        prefix:
          type: string
      type: object
    DocumentBlockList:
      description: A object with a data property that contains an array of up to limit document blocks. Each entry in the array is a separate document block object. If no more document block are available, the resulting array will be empty.
      properties:
        current_page:
          type: integer
        data:
          items:
            $ref: "#/components/schemas/DocumentBlock"
          type: array
        last_page:
          type: integer
        next_page_url:
          type: string
        per_page:
          type: integer
        prev_page_url:
          type: string
        total:
          type: integer
      type: object
    DocumentInsert:
      properties:
        bank_account_id:
          type: integer
        block_id:
          type: integer
        comment:
          type: string
        conversion_rate:
          default: "1"
          format: float
          type: number
        currency:
          $ref: "#/components/schemas/Currency"
        due_date:
          format: date
          type: string
        electronic:
          default: false
          type: boolean
        fulfillment_date:
          format: date
          type: string
        items:
          items:
            oneOf:
              - $ref: "#/components/schemas/DocumentItemData"
              - $ref: "#/components/schemas/DocumentProductData"
          type: array
        language:
          $ref: "#/components/schemas/DocumentLanguage"
        paid:
          default: false
          type: boolean
        partner_id:
          type: integer
        payment_method:
          $ref: "#/components/schemas/PaymentMethod"
        settings:
          $ref: "#/components/schemas/DocumentSettings"
        type:
          $ref: "#/components/schemas/DocumentInsertType"
        vendor_id:
          type: string
      required:
        - partner_id
        - block_id
        - type
        - fulfillment_date
        - due_date
        - payment_method
        - language
        - currency
      type: object
    DocumentInsertType:
      enum:
        - advance
        - draft
        - invoice
        - proforma
      type: string
    DocumentItem:
      properties:
        gross_amount:
          format: float
          type: number
        name:
          type: string
        net_amount:
          format: float
          type: number
        net_unit_amount:
          format: float
          type: number
        product_id:
          type: integer
        quantity:
          format: float
          type: number
        vat:
          $ref: "#/components/schemas/Vat"
        vat_amount:
          format: float
          type: number
      type: object
    DocumentItemData:
      properties:
        product_id:
          type: integer
        quantity:
          format: float
          type: number
      required:
        - product_id
        - quantity
      type: object
    DocumentLanguage:
      enum:
        - de
        - en
        - fr
        - hr
        - hu
        - it
        - ro
        - sk
      type: string
    DocumentList:
      description: A object with a data property that contains an array of up to limit documents. Each entry in the array is a separate document object. If no more documents are available, the resulting array will be empty.
      properties:
        current_page:
          type: integer
        data:
          items:
            $ref: "#/components/schemas/Document"
          type: array
        last_page:
          type: integer
        next_page_url:
          type: string
        per_page:
          type: integer
        prev_page_url:
          type: string
        total:
          type: integer
      type: object
    DocumentNotificationStatus:
      enum:
        - closed
        - downloaded
        - failed
        - none
        - opened
        - readed
      type: string
    DocumentOrganization:
      properties:
        address:
          $ref: "#/components/schemas/Address"
        bank_account:
          $ref: "#/components/schemas/DocumentBankAccount"
        cash_settled:
          type: boolean
        eu_tax_number:
          type: string
        ev_number:
          type: string
        name:
          type: string
        small_taxpayer:
          type: boolean
        tax_number:
          type: string
      type: object
    DocumentProductData:
      properties:
        comment:
          type: string
        name:
          type: string
        quantity:
          format: float
          type: number
        unit:
          type: string
        unit_price:
          format: float
          type: number
        unit_price_type:
          $ref: "#/components/schemas/UnitPriceType"
        vat:
          $ref: "#/components/schemas/Vat"
      required:
        - name
        - unit_price
        - unit_price_type
        - quantity
        - unit
        - vat
      type: object
    DocumentPublicUrl:
      properties:
        public_url:
          type: string
      type: object
    DocumentSettings:
      properties:
        mediated_service:
          default: false
          type: boolean
        online_payment:
          $ref: "#/components/schemas/OnlinePayment"
        place_id:
          type: integer
        round:
          $ref: "#/components/schemas/Round"
        without_financial_fulfillment:
          default: false
          type: boolean
      type: object
    DocumentSummary:
      properties:
        gross_amount_local:
          format: float
          type: number
        net_amount:
          format: float
          type: number
        net_amount_local:
          format: float
          type: number
        vat_amount:
          format: float
          type: number
        vat_amount_local:
          format: float
          type: number
        vat_rate_summary:
          items:
            $ref: "#/components/schemas/DocumentVatRateSummary"
          type: array
      type: object
    DocumentType:
      enum:
        - advance
        - canceled
        - cancellation
        - draft
        - invoice
        - proforma
      type: string
    DocumentVatRateSummary:
      properties:
        vat_name:
          type: string
        vat_percentage:
          format: float
          type: number
        vat_rate_gross_amount:
          format: float
          type: number
        vat_rate_net_amount:
          format: float
          type: number
        vat_rate_vat_amount:
          format: float
          type: number
        vat_rate_vat_amount_local:
          format: float
          type: number
      type: object
    Id:
      properties:
        id:
          type: integer
        legacy_id:
          type: integer
      type: object
    OnlinePayment:
      enum:
        - ""
        - Barion
        - SimplePay
        - no
      type: string
    OnlineSzamlaStatus:
      properties:
        messages:
          items:
            $ref: "#/components/schemas/OnlineSzamlaStatusMessage"
          type: array
        status:
          type: string
        transaction_id:
          type: string
      type: object
    OnlineSzamlaStatusMessage:
      properties:
        human_readable_message:
          type: string
        validation_error_code:
          type: string
        validation_result_code:
          type: string
      type: object
    OrganizationData:
      properties:
        tax_code:
          type: string
      type: object
    Partner:
      allOf:
        - $ref: "#/components/schemas/PartnerUpsert"
        - properties:
            id:
              type: integer
    PartnerList:
      description: A object with a data property that contains an array of up to limit partners. Each entry in the array is a separate partner object. If no more partners are available, the resulting array will be empty.
      properties:
        current_page:
          type: integer
        data:
          items:
            $ref: "#/components/schemas/Partner"
          type: array
        last_page:
          type: integer
        next_page_url:
          type: string
        per_page:
          type: integer
        prev_page_url:
          type: string
        total:
          type: integer
      type: object
    PartnerUpsert:
      properties:
        account_number:
          type: string
        address:
          $ref: "#/components/schemas/Address"
        emails:
          items:
            type: string
          type: array
        general_ledger_number:
          type: string
        iban:
          type: string
        name:
          type: string
        phone:
          type: string
        swift:
          type: string
        taxcode:
          type: string
      required:
        - name
        - address
      type: object
    PaymentHistory:
      properties:
        conversion_rate:
          format: float
          type: number
        date:
          format: date
          type: string
        payment_method:
          $ref: "#/components/schemas/PaymentMethod"
        price:
          format: float
          type: number
        voucher_number:
          type: string
      required:
        - date
        - price
        - payment_method
      type: object
    PaymentMethod:
      enum:
        - aruhitel
        - bankcard
        - barion
        - barter
        - cash
        - cash_on_delivery
        - coupon
        - elore_utalas
        - ep_kartya
        - kompenzacio
        - levonas
        - online_bankcard
        - payoneer
        - paypal
        - paypal_utolag
        - payu
        - pick_pack_pont
        - postai_csekk
        - postautalvany
        - skrill
        - szep_card
        - transferwise
        - upwork
        - utalvany
        - valto
        - wire_transfer
      type: string
    PaymentStatus:
      enum:
        - expired
        - none
        - outstanding
        - paid
        - partially_paid
      type: string
    Product:
      properties:
        comment:
          type: string
        currency:
          $ref: "#/components/schemas/Currency"
        general_ledger_number:
          type: string
        general_ledger_taxcode:
          type: string
        id:
          readOnly: true
          type: integer
        name:
          type: string
        net_unit_price:
          format: float
          type: number
        unit:
          type: string
        vat:
          $ref: "#/components/schemas/Vat"
      required:
        - name
        - currency
        - vat
        - unit
      type: object
    ProductList:
      description: A object with a data property that contains an array of up to limit products. Each entry in the array is a separate product object. If no more products are available, the resulting array will be empty.
      properties:
        current_page:
          type: integer
        data:
          items:
            $ref: "#/components/schemas/Product"
          type: array
        last_page:
          type: integer
        next_page_url:
          type: string
        per_page:
          type: integer
        prev_page_url:
          type: string
        total:
          type: integer
      type: object
    Round:
      enum:
        - five
        - none
        - one
        - ten
      type: string
    SendDocument:
      properties:
        emails:
          items:
            type: string
          type: array
      type: object
    ServerError:
      properties:
        message:
          type: string
        trace_id:
          description: You should send us this ID to investigate the issue.
          type: string
      type: object
    ServerErrorResponse:
      example:
        error:
          message: Internal Server Error.
          trace_id: 664b218f93954a3480cb0ddb8f919c3f
      properties:
        error:
          $ref: "#/components/schemas/ServerError"
      type: object
    UnitPriceType:
      enum:
        - gross
        - net
      type: string
    ValidationError:
      properties:
        field:
          type: string
        message:
          type: string
      type: object
    ValidationErrorResponse:
      properties:
        errors:
          items:
            $ref: "#/components/schemas/ValidationError"
          type: array
        message:
          type: string
      type: object
    Vat:
      enum:
        - 0%
        - 1%
        - 10%
        - 11%
        - 12%
        - 13%
        - 14%
        - 15%
        - 16%
        - 17%
        - 18%
        - 19%
        - 2%
        - 20%
        - 21%
        - 22%
        - 23%
        - 24%
        - 25%
        - 26%
        - 27%
        - 3%
        - 4%
        - 5%
        - 6%
        - 7%
        - 8%
        - 9%
        - AAM
        - AM
        - EU
        - EUK
        - F.AFA
        - FAD
        - K.AFA
        - MAA
        - TAM
        - ÁKK
        - ÁTHK
      type: string
  securitySchemes:
    api_key:
      in: header
      name: X-API-KEY
      type: apiKey
