{
  "openapi": "3.1.1",
  "info": {
    "title": "Codixio API",
    "description": "One account and one API key for all Codixio API services (listing localization, tariff classification, e-invoice). Authorization: Bearer <API key>. Calls are paid per call from prepaid credit. Listing texts and the reasoning of tariff code suggestions are generated with a language model.",
    "termsOfService": "https://legal.codixio.com/apps/codixio-api/terms.en",
    "contact": {
      "name": "Codixio",
      "url": "https://api.codixio.com/en/support",
      "email": "support@codixio.com"
    },
    "version": "1.0.0",
    "x-logo": {
      "url": "https://api.codixio.com/apple-touch-icon.png",
      "backgroundColor": "#111144"
    }
  },
  "servers": [
    {
      "url": "https://api.codixio.com/"
    }
  ],
  "paths": {
    "/v1/listing/jobs": {
      "post": {
        "tags": [
          "Listing localization"
        ],
        "summary": "Listing localization: queue a job.",
        "description": "Body: the job request of the listing localization service as JSON object. Send no personal data. The portal sets billing_kind, sales_channel and end_customer_ref itself (400 when sent). Uses the free quota first, then reserves the current maximum price from the credit (402 without cover); the job is charged with its price on success and the reservation is released on failure. Without API key only possible when the operator set a free quota without sign-in; the answer then carries the header Codixio-Job-Token, needed to read the job. Answers 202 with the job.",
        "operationId": "CreateListingJob",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonObject"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "202": {
            "description": "Accepted"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Listing localization"
        ],
        "summary": "Listing localization: own jobs, newest first.",
        "description": "Cursor before=<job id>, limit 1 to 100 (default 50).",
        "operationId": "ListListingJobs",
        "parameters": [
          {
            "name": "before",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/listing/jobs/{id}": {
      "get": {
        "tags": [
          "Listing localization"
        ],
        "summary": "Listing localization: status, price and result of an own job.",
        "description": "Only own jobs (API key) or, for jobs without sign-in, with the header Codixio-Job-Token. Otherwise 404.",
        "operationId": "GetListingJob",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/listing/max-price": {
      "get": {
        "tags": [
          "Listing localization"
        ],
        "summary": "Listing localization: current maximum price per job; a paid job reserves this amount.",
        "operationId": "GetListingMaxPrice",
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK"
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tariff/jobs": {
      "post": {
        "tags": [
          "Tariff classification"
        ],
        "summary": "Tariff classification: queue a job.",
        "description": "Body: the job request of the tariff classification service as JSON object. Send no personal data. The portal sets billing_kind, sales_channel and end_customer_ref itself (400 when sent). Uses the free quota first, then reserves the current maximum price from the credit (402 without cover); the job is charged with its price on success and the reservation is released on failure. Without API key only possible when the operator set a free quota without sign-in; the answer then carries the header Codixio-Job-Token, needed to read the job. Answers 202 with the job.",
        "operationId": "CreateTariffJob",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonObject"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "202": {
            "description": "Accepted"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Tariff classification"
        ],
        "summary": "Tariff classification: own jobs, newest first.",
        "description": "Cursor before=<job id>, limit 1 to 100 (default 50).",
        "operationId": "ListTariffJobs",
        "parameters": [
          {
            "name": "before",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tariff/jobs/{id}": {
      "get": {
        "tags": [
          "Tariff classification"
        ],
        "summary": "Tariff classification: status, price and result of an own job.",
        "description": "Only own jobs (API key) or, for jobs without sign-in, with the header Codixio-Job-Token. Otherwise 404.",
        "operationId": "GetTariffJob",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tariff/max-price": {
      "get": {
        "tags": [
          "Tariff classification"
        ],
        "summary": "Tariff classification: current maximum price per job; a paid job reserves this amount.",
        "operationId": "GetTariffMaxPrice",
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK"
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/einvoice/validate": {
      "post": {
        "tags": [
          "E-invoice"
        ],
        "summary": "Validate an XRechnung or a ZUGFeRD / Factur-X invoice (application/xml, text/xml or application/pdf).",
        "description": "Answers 200 with request_id, price and the validation report. Billing as for jobs: free quota first, else reservation of the maximum price, charge of the price from the answer on success, release otherwise. The invoice is passed through in memory only; the portal stores and logs no content.",
        "operationId": "ValidateEInvoice",
        "requestBody": {
          "content": {
            "application/xml": {
              "schema": {
                "type": "string"
              }
            },
            "text/xml": {
              "schema": {
                "type": "string"
              }
            },
            "application/pdf": {
              "schema": {
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/einvoice/create": {
      "post": {
        "tags": [
          "E-invoice"
        ],
        "summary": "Create an XRechnung (syntax=cii or ubl) or a ZUGFeRD PDF (syntax=zugferd) from invoice data (JSON, EN 16931).",
        "description": "Answers 200 with the XML or PDF; price and request id in the headers Codixio-Price-Amount, Codixio-Price-Currency and Codixio-Request-Id. Billing as for jobs: free quota first, else reservation of the maximum price, charge of the price from the answer on success, release otherwise. The invoice is passed through in memory only; the portal stores and logs no content.",
        "operationId": "CreateEInvoice",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonObject"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/einvoice/render": {
      "post": {
        "tags": [
          "E-invoice"
        ],
        "summary": "Readable view (format=html or pdf) of an XRechnung or ZUGFeRD invoice.",
        "description": "Answers 200 with HTML or PDF; price and request id in the headers. Billing as for jobs: free quota first, else reservation of the maximum price, charge of the price from the answer on success, release otherwise. The invoice is passed through in memory only; the portal stores and logs no content.",
        "operationId": "RenderEInvoice",
        "requestBody": {
          "content": {
            "application/xml": {
              "schema": {
                "type": "string"
              }
            },
            "text/xml": {
              "schema": {
                "type": "string"
              }
            },
            "application/pdf": {
              "schema": {
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/einvoice/max-price": {
      "get": {
        "tags": [
          "E-invoice"
        ],
        "summary": "E-invoice: current maximum price per document; a paid call reserves this amount.",
        "operationId": "GetEInvoiceMaxPrice",
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/account": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Own balance (available and reserved), free quota per service this month and the credit packages.",
        "operationId": "GetAccount",
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/account/ledger": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Own ledger entries, newest first (cursor before, limit 1 to 100, default 50).",
        "operationId": "GetLedger",
        "parameters": [
          {
            "name": "before",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LedgerPage"
                }
              }
            }
          }
        }
      }
    },
    "/v1/account/calls": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Own calls through the portal (service, billing, state, charged amount), newest first.",
        "operationId": "GetCalls",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ServiceCallDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/account/top-up": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Checkout link at Polar (merchant of record) for one credit package; the credit is booked when Polar confirms the payment.",
        "operationId": "CreateTopUp",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/TopUpRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TopUpResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AccountResponse": {
        "required": [
          "id",
          "balance",
          "free_quota",
          "top_up_enabled",
          "top_up_packages"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "balance": {
            "$ref": "#/components/schemas/BalanceDto"
          },
          "free_quota": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FreeQuotaDto"
            }
          },
          "top_up_enabled": {
            "type": "boolean"
          },
          "top_up_packages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreditPackageDto"
            }
          }
        },
        "additionalProperties": false
      },
      "BalanceDto": {
        "required": [
          "available",
          "reserved",
          "currency"
        ],
        "type": "object",
        "properties": {
          "available": {
            "type": "string"
          },
          "reserved": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "BillingKind": {
        "enum": [
          "paid",
          "free"
        ]
      },
      "CreditPackageDto": {
        "required": [
          "product_id",
          "credit",
          "currency"
        ],
        "type": "object",
        "properties": {
          "product_id": {
            "type": "string"
          },
          "credit": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "FreeQuotaDto": {
        "required": [
          "service",
          "per_month",
          "used_this_month"
        ],
        "type": "object",
        "properties": {
          "service": {
            "$ref": "#/components/schemas/Service"
          },
          "per_month": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "used_this_month": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "HttpValidationProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "detail": {
            "type": [
              "null",
              "string"
            ]
          },
          "instance": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        },
        "additionalProperties": false
      },
      "JsonObject": {
        "type": "object"
      },
      "LedgerEntryDto": {
        "required": [
          "id",
          "kind",
          "available_delta",
          "reserved_delta",
          "available_after",
          "reserved_after",
          "currency",
          "service_call_id",
          "uncovered_amount",
          "created_at"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "$ref": "#/components/schemas/LedgerEntryKind"
          },
          "available_delta": {
            "type": "string"
          },
          "reserved_delta": {
            "type": "string"
          },
          "available_after": {
            "type": "string"
          },
          "reserved_after": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "service_call_id": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "uncovered_amount": {
            "type": [
              "null",
              "string"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "LedgerEntryKind": {
        "enum": [
          "top_up",
          "reservation",
          "settlement",
          "release",
          "credit",
          "reversal"
        ]
      },
      "LedgerPage": {
        "required": [
          "items",
          "next_before"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LedgerEntryDto"
            }
          },
          "next_before": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "detail": {
            "type": [
              "null",
              "string"
            ]
          },
          "instance": {
            "type": [
              "null",
              "string"
            ]
          }
        },
        "additionalProperties": false
      },
      "Service": {
        "enum": [
          "listing",
          "tariff",
          "e_invoice"
        ]
      },
      "ServiceCallDto": {
        "required": [
          "id",
          "service",
          "operation",
          "billing_kind",
          "state",
          "upstream_id",
          "reserved",
          "charged",
          "currency",
          "created_at",
          "completed_at"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "service": {
            "$ref": "#/components/schemas/Service"
          },
          "operation": {
            "type": "string"
          },
          "billing_kind": {
            "$ref": "#/components/schemas/BillingKind"
          },
          "state": {
            "$ref": "#/components/schemas/ServiceCallState"
          },
          "upstream_id": {
            "type": [
              "null",
              "string"
            ]
          },
          "reserved": {
            "type": "string"
          },
          "charged": {
            "type": [
              "null",
              "string"
            ]
          },
          "currency": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "completed_at": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "ServiceCallState": {
        "enum": [
          "pending",
          "open",
          "settled",
          "released",
          "rejected"
        ]
      },
      "TopUpRequest": {
        "required": [
          "product_id"
        ],
        "type": "object",
        "properties": {
          "product_id": {
            "type": [
              "null",
              "string"
            ]
          }
        },
        "additionalProperties": false
      },
      "TopUpResponse": {
        "required": [
          "checkout_url"
        ],
        "type": "object",
        "properties": {
          "checkout_url": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    }
  },
  "tags": [
    {
      "name": "Listing localization"
    },
    {
      "name": "Tariff classification"
    },
    {
      "name": "E-invoice"
    },
    {
      "name": "Account"
    }
  ],
  "externalDocs": {
    "description": "Documentation",
    "url": "https://api.codixio.com/en/docs"
  }
}