{
  "openapi": "3.1.0",
  "servers": [
    {
      "url": "https://server.kolleno.com"
    }
  ],
  "info": {
    "title": "Kolleno Open API",
    "version": "v1",
    "description": "Welcome to Kolleno Open API - the best way to recover your late invoices fully integrated with your custom systems.\n\nSending updated and real-time data to Kolleno is important to make sure the account managers always have the most up-to-date information when they contact your customers.\n\nIf you don't use one of our supported accounting software, you have the possibility to integrate directly into our Kolleno Open API.\n\nIt is designed for companies that have custom-made systems and want to integrate directly with Kolleno in a seamless manner.\n\n# Authentication\n\n## Overview\n\nThe authentication is done with an API Key linked to your user. If you don't want it to be linked to your user, you can create a separate one just for the API Key (i.e. it won't be used in the User Interface).\n\nThe API Key is made of a `client_id` and a `client_secret`.\n\n## Add the key to your request\n\nIn the headers of your HTTP request, send the following:\n`Authorization: API client_id:client_secret`\n\nThe header key is `Authorization`, and the value is `API{blank space}` appended with the `client_id` and `client_secret` (please make sure these two are separated by a colon `:`)\n\nExample:\nIf your `client_id` is `3f2a6d1c-8b7e-4c59-a1d0-5e9b4c7f2a18` and your `client_secret` is `example_client_secret` then you would send:\n`Authorization: API 3f2a6d1c-8b7e-4c59-a1d0-5e9b4c7f2a18:example_client_secret`\n\nA request with no key, or with a key that Kolleno does not accept, gets the status **403**.\n\n## Get your key\n\nPlease get in touch with your sales representative in order to get access to the API.\n\n## Customer portfolios\n\nIf your Company restricts access to Customers by portfolio, an API Key only sees the Customers in the portfolios of the user it belongs to, and the records of these Customers. This does not apply to admin users.\n\nA Customer outside these portfolios gets the same response as a Customer that does not exist, usually **404**. The routes that name the Customer in the URL (Credit Notes, Transactions and the deprecated Person routes) return **403**. Invoice PDFs and Invoice Custom Fields also return **403**, and creating an Invoice or a Person for such a Customer returns **400**.\n\n## Access of the user\n\nAn API Key has the access of the user it belongs to. A user with the Viewer role cannot send `POST`, `PUT`, `PATCH` or `DELETE` requests, and gets the status **403**. The exceptions are Report Files and Report Schedules: a Viewer can generate a Report File and manage Report Schedules. If the Company requires two-factor authentication, and the user did not set it up, the API answers **428**.\n\n# General structure\n\n- Companies are the organizations your user is part of.\n\n- Every Company has a number of Customers.\n\n- Every Customer has a number of Invoices and Persons (your point of contacts at your Customers).\n\n- Every Customer has a number of Transactions linked to any number of Invoices belonging to that same Customer.\n\n- Every Customer has a number of Credit Notes linked to any number of Invoices belonging to that same Customer.\n\n- Every Customer has a number of Card Details and Direct Debit Details.\n\n# Requests and responses\n\nSend the body of a request as JSON, with the header `Content-Type: application/json`. The only exception is the upload of an Invoice PDF, which is `multipart/form-data`. The API answers with JSON, except for the endpoints that download a file.\n\n# Pagination\n\nEvery list endpoint returns one page of results. Use these query parameters:\n\n- `limit`: the maximum number of items in the page. The default is **200**. The API sets no maximum for `limit`.\n- `offset`: the position of the first item of the page in the full list. The default is 0.\n\nA `limit` or an `offset` that is not a number is ignored, and the default applies.\n\nThe response has the following shape:\n\n```json\n{\n  \"count\": 2,\n  \"next\": \"https://server.kolleno.com/v1/customer/COMPANY_ID/?limit=1&offset=1\",\n  \"previous\": null,\n  \"results\": []\n}\n```\n\n`count` is the number of items in the full list. `next` and `previous` are the URLs of the next and the previous page, and are `null` when there is no such page. Each list endpoint documents the order of its items. To page through a list without a skipped or repeated item, send `limit` and `offset` with the same filters in each request.\n\n# Rate limits\n\nKolleno can limit the requests of the Open API for each Company. The limit is a number of requests for each minute. A Company has no limit by default. To set one, ask your Kolleno representative.\n\nWhen a limit is set, the API counts the requests that name the Company in the URL, from every API Key of that Company together. The count restarts every minute. A request over the limit gets the status **429** and a `Retry-After` header. The header holds the number of seconds until the next minute starts:\n\n```json\n{\n  \"detail\": \"Request was throttled. Expected available in 43 seconds.\"\n}\n```\n\nThe API does not count a request that fails the authentication or the permission checks. The routes that name a Customer or an Invoice, but not the Company, are not counted: `/v1/credit-note/{customer}/`, `/v1/person/{customer}/`, `/v1/transaction/{customer}/` and `/v1/invoice-pdf/{invoice}/`.\n\n**Generate Report File** also answers **429** when 3 of your report files for the Company are still queued or in progress. Only the files that you requested in the last 3 hours count. That response has no `Retry-After` header.\n\n# IP allowlist\n\nA Company can restrict its Open API to a list of IP addresses or networks. This is optional and is off by default. To turn it on, ask your Kolleno representative.\n\nWhen it is on, a request from an address outside the list gets the status **403**:\n\n```json\n{\n  \"detail\": \"Requests to this API are not permitted from this IP address.\"\n}\n```\n\nIf the allowlist is on and has no active entry, no address is allowed. A caller that has no access to the Company always gets the standard **403** response, so the response does not show whether the allowlist is on. `GET /v1/company/` does not list the Companies whose allowlist does not admit the address of the caller.\n\n# Errors\n\nThe API uses the HTTP status code to show the result. The body of an error is JSON.\n\n| Status | Meaning |\n| --- | --- |\n| **400** | The request has an invalid value. The body is an object. Each key is the name of a field, or `non_field_errors`, and each value is a list of messages. |\n| **403** | The API key is missing or not accepted, the user has no access to the Company or the record, or the IP allowlist refused the address. The body has a `detail` message. |\n| **404** | The record does not exist, or the user cannot see it. The body has a `detail` message. For some routes `detail` is a list with one message. |\n| **428** | The Company requires two-factor authentication and the user did not set it up. |\n| **429** | A rate limit was reached. See **Rate limits**. |\n\nExample of a **400** response:\n\n```json\n{\n  \"name\": [\"This field is required.\"]\n}\n```\n\nExample of a **404** response:\n\n```json\n{\n  \"detail\": \"No Customer matches the given query.\"\n}\n```\n\n# Changes Log\n\n_2026-11-03_ - Set and retrieve \"tags\" on Customers and Credit Notes. A list of tag ids sent in \"tags\" replaces all the tags of the record, and \"tags\" can be updated whatever the source of the record.\n\n_2026-10-21_ - (a) New endpoints to list the Workflows and the Templates. (b) Returning \"template\" on Email Sent objects. (c) List of Steps orders the Steps with the same \"date_event\" by \"id\", so paging with limit and offset does not skip or repeat them.\n\n_2026-10-19_ - (a) New endpoints to generate Report Files, get their status, list the Report Types and manage Report Schedules. (b) New endpoints to list and retrieve the Emails Sent. (c) Filter Invoices by \"payment_status\", \"payment_status__in\" and \"date_modified__gte\", and Customers by \"ref\". (d) Returning \"date_promise_to_pay_valid\" on Invoice objects (read-only). (e) Customer portfolios apply to all the endpoints. (f) The Match endpoints require reconciliation access.\n\n_2026-10-13_ - Customer PATCH can merge \"extra_data\": only the keys sent are updated, and a key sent as null is removed. Off by default, ask your Kolleno representative to turn it on.\n\n_2026-10-05_ - Optional query parameter ?source added to Customer endpoints, to retrieve, update or delete a Customer by its source_id.\n\n_2026-09-29_ - Added \"extra_data\" to Transaction object.\n\n_2026-09-03_ - New endpoints to manage Tags and Tag Categories. Set and retrieve \"tags\" on Invoices.\n\n_2026-06-01_ - Limits the fields returned in the Customer endpoint with parameter ?fields= for performance.\n\n_2026-05-29_ - List Reports generated and download a Report.\n\n_2026-04-29_ - New endpoint to update Custom Fields on Invoice records.\n\n_2026-03-19_ - Optional query parameters ?source and ?source_customer added to Person endpoints.\n\n_2026-03-05_ - Added the 'Match' List and Retrieve endpoints. Move Person endpoint to using 'source_id' (backwards compatibility with 'external_id').\n\n_2026-03-04_ - Added _extra_data_ to Invoice record (send any JSON formatted data).\n\n_2026-01-13_ - Send \"source_id\" to update custom fields.\n\n_2025-10-27_ - (a) New endpoint to retrieve the list of Position External. (b) New endpoints for linking Person <> Invoice. (c) Update \"pause_chasing\" of any Invoice.source. (d) Update \"primary\" and \"position_external\" of any Person.source.\n\n_2024-11-18_ - Set and retrieve \"warning_level\" on Customers.\n\n_2024-09-25_ - Return \"date_created\" for Card Detail and Direct Debit Detail\n\n_2024-05-21_ - Ability to update the field \"extra_data\" for Customer object, no matter the source of the record.\n\n_2024-04-04_ - Returning \"balance\" field on Customer object (read-only)\n\n_2024-03-08_ - Set and retrieve \"persons\" on Invoices.\n\n_2024-03-04_ - Set and retrieve \"amount_remaining\" for Credit Notes.\n\n_2023-12-27_ - Ability to download a Credit Note PDF.\n\n_2023-12-20_ - Ability to upload an Invoice PDF by using its source_id.\n\n_2023-12-18_ - Added endpoint to download any invoice PDF.\n\n_2023-11-17_ - Filter CardDetail and DirectDebitDetail by \"customer__source_id\".\n\n_2023-11-09_ - Ability to filter by \"source_id\" on Card Detail and Direct Debit Detail list endpoints.\n\n_2023-10-27_ - Added endpoints to get the list of Card Details and Direct Debit Detail. For Customers and Invoices, replaced \"external_id\" by \"source_id\".\n\n_2023-09-21_ - Added an extra_field \"bank_account_setup_url\" for Customer GET endpoints.\n\n_2023-08-28_ - Added \"extra_fields\" value \"has_direct_debit_detail\" for Customer GET endpoints. Also added \"extra_fields\" for Timeline GET endpoint with possible values: \"contacts\" and \"content\".\n\n_2023-08-23_ - Return \"extra_fields\" for Customer GET endpoints. First field added: \"gocardless_customer_id\".\n\n_2023-05-30_ - Added endpoints to get the Customer Portal URL and the list of Steps from the timeline.\n\n_2022-12-01_ - Added field 'description' for the Invoice objects.\n\n_2022-10-21_ - Endpoint to get the persons by default returns all Persons in the Company, with possible filtering by ?customer=UUID.\n\n_2022-07-04_ - Mark Transactions as \"prepayment\" or \"overpayment\". Record amount remaining to be credited on a pre/overpayment. Flag the transaction as \"paid\" or \"voided\".\n\n_2022-02-14_ - Added 'date_invoice' field for Invoice objects.\n\n_2022-01-27_ - Added Credit Notes endpoints to the Open API.\n\n_2021-12-14_ - Added 'ref' field for Customer object.\n\n_2021-10-20_ - Solved inconsistency where PPN was still documenting the UUID.\n\n_2021-09-13_ - Countries and Currencies updated with ISO code (2 characters for country, 3 characters for currency) rather than ID. Card Details and Direct Debit Details still return `country` and `currency` as UUIDs."
  },
  "paths": {
    "/v1/card-detail/{company}/": {
      "get": {
        "operationId": "card_detail_list",
        "description": "Retrieve the Card Details of the Customers in a given Company. Ordered by\n`date_created`. A Card Detail that was deleted is not listed.\n\n`country` is the UUID of a Country in Kolleno, not its ISO code.",
        "summary": "List Card Details",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "query",
            "name": "customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Filter to get only a specific Customer's Card Details. An id that does not exist returns 400."
          },
          {
            "in": "query",
            "name": "customer__source_id",
            "schema": {
              "type": "string"
            },
            "description": "Filter to get only a specific Customer's Card Details, using the `source_id` of the Customer."
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            },
            "description": "The maximum number of items in the page. The default is 200."
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer"
            },
            "description": "The position of the first item of the page in the full list. The default is 0."
          },
          {
            "in": "query",
            "name": "source_id",
            "schema": {
              "type": "string"
            },
            "description": "Filter to get only a specific `source_id`."
          }
        ],
        "tags": [
          "Card Detail"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedCardDetailList"
                },
                "examples": {
                  "CardDetail": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "id": "f79749b0-6188-47c0-99dd-d22614203cab",
                          "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                          "card_issuer": "EXAMPLE BANK",
                          "card_number_mask": "424242******4242",
                          "exp_month": "03",
                          "exp_year": "29",
                          "country": "0c6b1f7e-3d2a-4e8b-9f51-6a7d2c4e8b13",
                          "source": "stripe",
                          "source_id": "card_EXAMPLE0001",
                          "is_valid": true,
                          "date_created": "2026-01-24T12:53:55.610255Z"
                        }
                      ]
                    },
                    "summary": "Card Detail"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "UnknownCustomer": {
                    "value": {
                      "customer": [
                        "Select a valid choice. That choice is not one of the available choices."
                      ]
                    },
                    "summary": "Unknown customer"
                  }
                }
              }
            },
            "description": "A filter has a value that is not valid, for example a `customer` that is not a UUID or that does not exist."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      }
    },
    "/v1/company/": {
      "get": {
        "operationId": "company_list",
        "description": "Retrieve the Companies of the user that owns your API key. Ordered by\n`date_created`, oldest first.\n\nA Company whose IP allowlist does not admit the address of the caller is not listed.",
        "summary": "List Companies",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            },
            "description": "The maximum number of items in the page. The default is 200."
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer"
            },
            "description": "The position of the first item of the page in the full list. The default is 0."
          }
        ],
        "tags": [
          "Company"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedCompanyList"
                },
                "examples": {
                  "Company": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "id": "285429a2-1a37-4ceb-ad14-7687f9b6d16d",
                          "name": "Acme Ltd",
                          "address_line_1": "1 High Street",
                          "address_line_2": "",
                          "postal_code": "AB1 2CD",
                          "city": "Springfield",
                          "country": "US",
                          "currency": "USD",
                          "date_modified": "2026-01-06T17:43:21.549420Z",
                          "date_created": "2025-10-06T11:46:08.814501Z"
                        }
                      ]
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, or its user is not active."
          }
        }
      }
    },
    "/v1/company/{id}/": {
      "get": {
        "operationId": "company_retrieve",
        "description": "Retrieve a specific Company. A Company that does not exist, or that the user of\nyour API key has no access to, returns 403.",
        "summary": "Retrieve Company",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company to retrieve.",
            "required": true
          }
        ],
        "tags": [
          "Company"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                },
                "examples": {
                  "Company": {
                    "value": {
                      "id": "285429a2-1a37-4ceb-ad14-7687f9b6d16d",
                      "name": "Acme Ltd",
                      "address_line_1": "1 High Street",
                      "address_line_2": "",
                      "postal_code": "AB1 2CD",
                      "city": "Springfield",
                      "country": "US",
                      "currency": "USD",
                      "date_modified": "2026-01-06T17:43:21.549420Z",
                      "date_created": "2025-10-06T11:46:08.814501Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          },
          "404": {
            "description": "The `id` is not a UUID in the normal form: lower case, with hyphens. The body is an HTML page, not JSON. An unknown UUID returns 403."
          }
        }
      }
    },
    "/v1/credit-note/{customer}/": {
      "get": {
        "operationId": "credit_note_list",
        "description": "Retrieve all the Credit Notes for a given Customer. Ordered by `date_created`.\nA Customer that does not exist, or is outside the portfolios of the user, returns\n403.",
        "summary": "List Credit Notes",
        "parameters": [
          {
            "in": "path",
            "name": "customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Customer the records belong to.",
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            },
            "description": "The maximum number of items in the page. The default is 200."
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer"
            },
            "description": "The position of the first item of the page in the full list. The default is 0."
          }
        ],
        "tags": [
          "Credit Note"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedCreditNoteList"
                },
                "examples": {
                  "CreditNote": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "id": "c733e174-80be-4f28-82a1-e10d3ff3767d",
                          "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                          "credit_note_invoices": [
                            {
                              "invoice": "a3f73037-33bf-4139-8e75-0da72b9d1e33",
                              "amount": "200.00"
                            },
                            {
                              "invoice": "f23c2589-0db6-4f88-b6d8-d3237e424c52",
                              "amount": "50.00"
                            }
                          ],
                          "amount": "250.00",
                          "amount_remaining": "0.00",
                          "currency": "USD",
                          "ref": "CN-1045",
                          "date_issued": "2026-01-10",
                          "tags": [
                            {
                              "id": "32fd143d-e5fc-4be5-a8f2-e4756e92edcf",
                              "name": "Disputed",
                              "color": "FF0000",
                              "description": "The customer raised a dispute",
                              "tag_category": {
                                "id": "5b10714b-66d0-4db4-b8bb-5bf0207fd5f9",
                                "name": "Collections"
                              }
                            }
                          ],
                          "source": "kolleno_api",
                          "source_id": "",
                          "date_modified": "2026-01-10T12:53:55.687545Z",
                          "date_created": "2026-01-10T12:53:55.687564Z"
                        }
                      ]
                    },
                    "summary": "Credit Note"
                  }
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          }
        }
      },
      "post": {
        "operationId": "credit_note_create",
        "description": "Create a Credit Note. It will set the field `source` to `kolleno_api`\nautomatically. The Credit Note belongs to the Customer of the URL.\n\n**Fields**\n\n- `currency` is required on create and on PUT. It is the ISO code of the currency, for example `USD`. An\n  unknown code returns 400.\n- `amount` and `amount_remaining` are a string or a number with up to 2 decimals.\n  The default is `0.00`. `amount_remaining` is the amount that is not allocated.\n- `credit_note_invoices` is a list of Invoices (UUID) and the `amount` of the\n  Credit Note assigned to each Invoice (string or number, default `0.00`). Each\n  Invoice has to belong to the Customer of the URL. Otherwise the request returns\n  400, with the error under the position of the item in the list, for example\n  `{\"credit_note_invoices\": {\"0\": {\"invoice\": [\"...\"]}}}`.\n- `ref` is a string of up to 255 characters, the reference of the Credit Note.\n- `date_issued` has the format YYYY-MM-DD, and can be null.\n- `source`, `source_id`, `date_created` and `date_modified` are read-only.\n\n**tags**\n\n`tags` is a list of Tag UUIDs (see the Tag endpoints). Send it in a JSON body\n(`Content-Type: application/json`).\n\n- The list replaces all the tags of the Credit Note.\n- An empty list `[]` removes all the tags.\n- If you do not send `tags`, the tags do not change.\n- A Tag of another Company, or a deleted Tag, returns HTTP 400.",
        "summary": "Create Credit Note",
        "parameters": [
          {
            "in": "path",
            "name": "customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Customer the records belong to.",
            "required": true
          }
        ],
        "tags": [
          "Credit Note"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditNoteCreateRequest"
              },
              "examples": {
                "CreditNote": {
                  "value": {
                    "amount": "250.00",
                    "amount_remaining": "0.00",
                    "currency": "USD",
                    "credit_note_invoices": [
                      {
                        "invoice": "a3f73037-33bf-4139-8e75-0da72b9d1e33",
                        "amount": "200.00"
                      },
                      {
                        "invoice": "f23c2589-0db6-4f88-b6d8-d3237e424c52",
                        "amount": "50.00"
                      }
                    ],
                    "ref": "CN-1045",
                    "date_issued": "2026-01-10",
                    "tags": [
                      "32fd143d-e5fc-4be5-a8f2-e4756e92edcf"
                    ]
                  },
                  "summary": "Credit Note"
                }
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditNote"
                },
                "examples": {
                  "CreditNote": {
                    "value": {
                      "id": "c733e174-80be-4f28-82a1-e10d3ff3767d",
                      "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                      "credit_note_invoices": [
                        {
                          "invoice": "a3f73037-33bf-4139-8e75-0da72b9d1e33",
                          "amount": "200.00"
                        },
                        {
                          "invoice": "f23c2589-0db6-4f88-b6d8-d3237e424c52",
                          "amount": "50.00"
                        }
                      ],
                      "amount": "250.00",
                      "amount_remaining": "0.00",
                      "currency": "USD",
                      "ref": "CN-1045",
                      "date_issued": "2026-01-10",
                      "tags": [
                        {
                          "id": "32fd143d-e5fc-4be5-a8f2-e4756e92edcf",
                          "name": "Disputed",
                          "color": "FF0000",
                          "description": "The customer raised a dispute",
                          "tag_category": {
                            "id": "5b10714b-66d0-4db4-b8bb-5bf0207fd5f9",
                            "name": "Collections"
                          }
                        }
                      ],
                      "source": "kolleno_api",
                      "source_id": "",
                      "date_modified": "2026-01-10T12:53:55.687545Z",
                      "date_created": "2026-01-10T12:53:55.687564Z"
                    },
                    "summary": "Credit Note"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                      "additionalProperties": {}
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "A list of messages for an error that no field owns."
                    }
                  ]
                },
                "examples": {
                  "RequiredField": {
                    "value": {
                      "currency": [
                        "This field is required."
                      ]
                    },
                    "summary": "Required field"
                  },
                  "UnknownCurrency": {
                    "value": {
                      "currency": [
                        "'ZZZ' is not a valid ISO."
                      ]
                    },
                    "summary": "Unknown currency"
                  },
                  "TagNotFound": {
                    "value": [
                      "One or more tags were not found."
                    ],
                    "summary": "Tag not found"
                  }
                }
              }
            },
            "description": "A value of the request is not valid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          }
        }
      }
    },
    "/v1/credit-note/{customer}/{id}/": {
      "get": {
        "operationId": "credit_note_retrieve",
        "description": "Retrieve a specific Credit Note.",
        "summary": "Retrieve Credit Note",
        "parameters": [
          {
            "in": "path",
            "name": "customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Customer the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Credit Note.",
            "required": true
          }
        ],
        "tags": [
          "Credit Note"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditNote"
                },
                "examples": {
                  "CreditNote": {
                    "value": {
                      "id": "c733e174-80be-4f28-82a1-e10d3ff3767d",
                      "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                      "credit_note_invoices": [
                        {
                          "invoice": "a3f73037-33bf-4139-8e75-0da72b9d1e33",
                          "amount": "200.00"
                        },
                        {
                          "invoice": "f23c2589-0db6-4f88-b6d8-d3237e424c52",
                          "amount": "50.00"
                        }
                      ],
                      "amount": "250.00",
                      "amount_remaining": "0.00",
                      "currency": "USD",
                      "ref": "CN-1045",
                      "date_issued": "2026-01-10",
                      "tags": [
                        {
                          "id": "32fd143d-e5fc-4be5-a8f2-e4756e92edcf",
                          "name": "Disputed",
                          "color": "FF0000",
                          "description": "The customer raised a dispute",
                          "tag_category": {
                            "id": "5b10714b-66d0-4db4-b8bb-5bf0207fd5f9",
                            "name": "Collections"
                          }
                        }
                      ],
                      "source": "kolleno_api",
                      "source_id": "",
                      "date_modified": "2026-01-10T12:53:55.687545Z",
                      "date_created": "2026-01-10T12:53:55.687564Z"
                    },
                    "summary": "Credit Note"
                  }
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "CreditNoteNotFound": {
                    "value": {
                      "detail": "No CreditNote matches the given query."
                    },
                    "summary": "Credit Note not found"
                  }
                }
              }
            },
            "description": "The Credit Note does not exist, or belongs to another Customer."
          }
        }
      },
      "put": {
        "operationId": "credit_note_update",
        "description": "Update a specific Credit Note. A PUT request must send the fields that are\nrequired: `customer` and `currency`.\n\nYou can edit all the fields of a Credit Note if `source` equals one of: `manual`,\n`kolleno_api`, `csv`. Otherwise, you can only update the field `tags`, and any other\nfield returns 400. A PUT request must send `customer` and `currency`, so a PUT on\nsuch a Credit Note always returns 400: use PATCH.\n\nThe Credit Note keeps its Customer. A `customer` in the body must be a Customer of\nthe same Company, else the request returns 400, but the value is not used.\n\nWhen you send `credit_note_invoices`, the list replaces the existing links, and an\nempty list `[]` removes them all. Kolleno then computes again the amount credited on\neach Invoice that the change touches.\n\n**Fields**\n\n- `currency` is required on create and on PUT. It is the ISO code of the currency, for example `USD`. An\n  unknown code returns 400.\n- `amount` and `amount_remaining` are a string or a number with up to 2 decimals.\n  The default is `0.00`. `amount_remaining` is the amount that is not allocated.\n- `credit_note_invoices` is a list of Invoices (UUID) and the `amount` of the\n  Credit Note assigned to each Invoice (string or number, default `0.00`). Each\n  Invoice has to belong to the Customer of the URL. Otherwise the request returns\n  400, with the error under the position of the item in the list, for example\n  `{\"credit_note_invoices\": {\"0\": {\"invoice\": [\"...\"]}}}`.\n- `ref` is a string of up to 255 characters, the reference of the Credit Note.\n- `date_issued` has the format YYYY-MM-DD, and can be null.\n- `source`, `source_id`, `date_created` and `date_modified` are read-only.\n\n**tags**\n\n`tags` is a list of Tag UUIDs (see the Tag endpoints). Send it in a JSON body\n(`Content-Type: application/json`).\n\n- The list replaces all the tags of the Credit Note.\n- An empty list `[]` removes all the tags.\n- If you do not send `tags`, the tags do not change.\n- A Tag of another Company, or a deleted Tag, returns HTTP 400.",
        "summary": "Replace Credit Note",
        "parameters": [
          {
            "in": "path",
            "name": "customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Customer the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Credit Note.",
            "required": true
          }
        ],
        "tags": [
          "Credit Note"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditNoteUpdateRequest"
              },
              "examples": {
                "CreditNote": {
                  "value": {
                    "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                    "amount": "250.00",
                    "amount_remaining": "0.00",
                    "currency": "USD",
                    "credit_note_invoices": [
                      {
                        "invoice": "a3f73037-33bf-4139-8e75-0da72b9d1e33",
                        "amount": "200.00"
                      },
                      {
                        "invoice": "f23c2589-0db6-4f88-b6d8-d3237e424c52",
                        "amount": "50.00"
                      }
                    ],
                    "ref": "CN-1045",
                    "date_issued": "2026-01-10",
                    "tags": [
                      "32fd143d-e5fc-4be5-a8f2-e4756e92edcf"
                    ]
                  },
                  "summary": "Credit Note"
                }
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditNote"
                },
                "examples": {
                  "CreditNote": {
                    "value": {
                      "id": "c733e174-80be-4f28-82a1-e10d3ff3767d",
                      "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                      "credit_note_invoices": [
                        {
                          "invoice": "a3f73037-33bf-4139-8e75-0da72b9d1e33",
                          "amount": "200.00"
                        },
                        {
                          "invoice": "f23c2589-0db6-4f88-b6d8-d3237e424c52",
                          "amount": "50.00"
                        }
                      ],
                      "amount": "250.00",
                      "amount_remaining": "0.00",
                      "currency": "USD",
                      "ref": "CN-1045",
                      "date_issued": "2026-01-10",
                      "tags": [
                        {
                          "id": "32fd143d-e5fc-4be5-a8f2-e4756e92edcf",
                          "name": "Disputed",
                          "color": "FF0000",
                          "description": "The customer raised a dispute",
                          "tag_category": {
                            "id": "5b10714b-66d0-4db4-b8bb-5bf0207fd5f9",
                            "name": "Collections"
                          }
                        }
                      ],
                      "source": "kolleno_api",
                      "source_id": "",
                      "date_modified": "2026-01-10T12:53:55.687545Z",
                      "date_created": "2026-01-10T12:53:55.687564Z"
                    },
                    "summary": "Credit Note"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                      "additionalProperties": {}
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "A list of messages for an error that no field owns."
                    }
                  ]
                },
                "examples": {
                  "FieldNotAllowedForTheSource": {
                    "value": {
                      "non_field_errors": [
                        "Credit Note imported from external source can only have the field 'tags' updated."
                      ]
                    },
                    "summary": "Field not allowed for the source"
                  },
                  "RequiredField": {
                    "value": {
                      "customer": [
                        "This field is required."
                      ]
                    },
                    "summary": "Required field"
                  },
                  "UnknownCurrency": {
                    "value": {
                      "currency": [
                        "'ZZZ' is not a valid ISO."
                      ]
                    },
                    "summary": "Unknown currency"
                  },
                  "TagNotFound": {
                    "value": [
                      "One or more tags were not found."
                    ],
                    "summary": "Tag not found"
                  }
                }
              }
            },
            "description": "A value of the request is not valid, or the request changes a field that the `source` of the Credit Note does not allow."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "CreditNoteNotFound": {
                    "value": {
                      "detail": "No CreditNote matches the given query."
                    },
                    "summary": "Credit Note not found"
                  }
                }
              }
            },
            "description": "The Credit Note does not exist, or belongs to another Customer."
          }
        }
      },
      "patch": {
        "operationId": "credit_note_partial_update",
        "description": "Update details about a specific Credit Note. Send only the fields to change.\n\nYou can edit all the fields of a Credit Note if `source` equals one of: `manual`,\n`kolleno_api`, `csv`. Otherwise, you can only update the field `tags`, and any other\nfield returns 400. A PUT request must send `customer` and `currency`, so a PUT on\nsuch a Credit Note always returns 400: use PATCH.\n\nThe Credit Note keeps its Customer. A `customer` in the body must be a Customer of\nthe same Company, else the request returns 400, but the value is not used.\n\nWhen you send `credit_note_invoices`, the list replaces the existing links, and an\nempty list `[]` removes them all. Kolleno then computes again the amount credited on\neach Invoice that the change touches.\n\n**Fields**\n\n- `currency` is required on create and on PUT. It is the ISO code of the currency, for example `USD`. An\n  unknown code returns 400.\n- `amount` and `amount_remaining` are a string or a number with up to 2 decimals.\n  The default is `0.00`. `amount_remaining` is the amount that is not allocated.\n- `credit_note_invoices` is a list of Invoices (UUID) and the `amount` of the\n  Credit Note assigned to each Invoice (string or number, default `0.00`). Each\n  Invoice has to belong to the Customer of the URL. Otherwise the request returns\n  400, with the error under the position of the item in the list, for example\n  `{\"credit_note_invoices\": {\"0\": {\"invoice\": [\"...\"]}}}`.\n- `ref` is a string of up to 255 characters, the reference of the Credit Note.\n- `date_issued` has the format YYYY-MM-DD, and can be null.\n- `source`, `source_id`, `date_created` and `date_modified` are read-only.\n\n**tags**\n\n`tags` is a list of Tag UUIDs (see the Tag endpoints). Send it in a JSON body\n(`Content-Type: application/json`).\n\n- The list replaces all the tags of the Credit Note.\n- An empty list `[]` removes all the tags.\n- If you do not send `tags`, the tags do not change.\n- A Tag of another Company, or a deleted Tag, returns HTTP 400.",
        "summary": "Update Credit Note",
        "parameters": [
          {
            "in": "path",
            "name": "customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Customer the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Credit Note.",
            "required": true
          }
        ],
        "tags": [
          "Credit Note"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCreditNoteUpdateRequest"
              },
              "examples": {
                "SetTags": {
                  "value": {
                    "tags": [
                      "32fd143d-e5fc-4be5-a8f2-e4756e92edcf"
                    ]
                  },
                  "summary": "Set tags"
                },
                "ReplaceTheInvoiceLinks": {
                  "value": {
                    "credit_note_invoices": [
                      {
                        "invoice": "a3f73037-33bf-4139-8e75-0da72b9d1e33",
                        "amount": "250.00"
                      }
                    ]
                  },
                  "summary": "Replace the Invoice links"
                }
              }
            }
          }
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditNote"
                },
                "examples": {
                  "CreditNote": {
                    "value": {
                      "id": "c733e174-80be-4f28-82a1-e10d3ff3767d",
                      "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                      "credit_note_invoices": [
                        {
                          "invoice": "a3f73037-33bf-4139-8e75-0da72b9d1e33",
                          "amount": "200.00"
                        },
                        {
                          "invoice": "f23c2589-0db6-4f88-b6d8-d3237e424c52",
                          "amount": "50.00"
                        }
                      ],
                      "amount": "250.00",
                      "amount_remaining": "0.00",
                      "currency": "USD",
                      "ref": "CN-1045",
                      "date_issued": "2026-01-10",
                      "tags": [
                        {
                          "id": "32fd143d-e5fc-4be5-a8f2-e4756e92edcf",
                          "name": "Disputed",
                          "color": "FF0000",
                          "description": "The customer raised a dispute",
                          "tag_category": {
                            "id": "5b10714b-66d0-4db4-b8bb-5bf0207fd5f9",
                            "name": "Collections"
                          }
                        }
                      ],
                      "source": "kolleno_api",
                      "source_id": "",
                      "date_modified": "2026-01-10T12:53:55.687545Z",
                      "date_created": "2026-01-10T12:53:55.687564Z"
                    },
                    "summary": "Credit Note"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                      "additionalProperties": {}
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "A list of messages for an error that no field owns."
                    }
                  ]
                },
                "examples": {
                  "FieldNotAllowedForTheSource": {
                    "value": {
                      "non_field_errors": [
                        "Credit Note imported from external source can only have the field 'tags' updated."
                      ]
                    },
                    "summary": "Field not allowed for the source"
                  },
                  "RequiredField": {
                    "value": {
                      "customer": [
                        "This field is required."
                      ]
                    },
                    "summary": "Required field"
                  },
                  "UnknownCurrency": {
                    "value": {
                      "currency": [
                        "'ZZZ' is not a valid ISO."
                      ]
                    },
                    "summary": "Unknown currency"
                  },
                  "TagNotFound": {
                    "value": [
                      "One or more tags were not found."
                    ],
                    "summary": "Tag not found"
                  }
                }
              }
            },
            "description": "A value of the request is not valid, or the request changes a field that the `source` of the Credit Note does not allow."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "CreditNoteNotFound": {
                    "value": {
                      "detail": "No CreditNote matches the given query."
                    },
                    "summary": "Credit Note not found"
                  }
                }
              }
            },
            "description": "The Credit Note does not exist, or belongs to another Customer."
          }
        }
      },
      "delete": {
        "operationId": "credit_note_destroy",
        "description": "Permanently delete a specific Credit Note. You can only delete Credit Notes if\n`source` equals one of: `manual`, `kolleno_api`, `csv`. Any other source returns\n400.",
        "summary": "Delete Credit Note",
        "parameters": [
          {
            "in": "path",
            "name": "customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Customer the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Credit Note.",
            "required": true
          }
        ],
        "tags": [
          "Credit Note"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "ImportedCreditNote": {
                    "value": {
                      "non_field_errors": [
                        "Credit Note imported from external source cannot be deleted."
                      ]
                    },
                    "summary": "Imported Credit Note"
                  }
                }
              }
            },
            "description": "The `source` of the Credit Note is not `manual`, `kolleno_api` or `csv`."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "CreditNoteNotFound": {
                    "value": {
                      "detail": "No CreditNote matches the given query."
                    },
                    "summary": "Credit Note not found"
                  }
                }
              }
            },
            "description": "The Credit Note does not exist, or belongs to another Customer."
          }
        }
      }
    },
    "/v1/credit-note/pdf/{company}/{credit_note}/": {
      "get": {
        "operationId": "credit_note_pdf_retrieve",
        "description": "Download the PDF of a Credit Note. The response is `application/pdf`, shown inline.\nThe file name is in the `Content-Disposition` header.\n\nThe identifier in the URL is the Kolleno ID of the Credit Note. Pass\n`?id_from=source` when it is the source ID.\n\nReturns 404 when the Credit Note does not exist, its Customer is outside the\nportfolios of the user, or it has no PDF. Returns 400 when the PDF is not ready\nyet, or cannot be retrieved.",
        "summary": "Download Credit Note PDF",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "credit_note",
            "schema": {
              "type": "string"
            },
            "description": "ID of the Credit Note. It is the source ID when `id_from=source`.",
            "required": true
          },
          {
            "in": "query",
            "name": "id_from",
            "schema": {
              "type": "string",
              "enum": [
                "source"
              ]
            },
            "description": "Send `source` when the identifier in the URL is the source ID of the record and not the Kolleno ID."
          }
        ],
        "tags": [
          "Credit Note PDF"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            },
            "description": "The PDF file."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "PDFNotReady": {
                    "value": {
                      "non_field_errors": [
                        "The PDF will be available soon. Please try again later."
                      ]
                    },
                    "summary": "PDF not ready"
                  }
                }
              }
            },
            "description": "The PDF is not available yet, or cannot be retrieved."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                }
              }
            },
            "description": "The Credit Note does not exist, or has no PDF."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      }
    },
    "/v1/customer/{company}/": {
      "get": {
        "operationId": "customer_list",
        "description": "Retrieve all the Customers in a given Company. Ordered by `date_created`, oldest\nfirst.",
        "summary": "List Customers",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "query",
            "name": "external_id",
            "schema": {
              "type": "string"
            },
            "description": "Filter by the legacy `external_id`. Use `source_id`."
          },
          {
            "in": "query",
            "name": "extra_fields",
            "schema": {
              "type": "string"
            },
            "description": "Get additional fields in the response (comma separated). The possible values are: gocardless_customer_id, has_direct_debit_detail, bank_account_setup_url."
          },
          {
            "in": "query",
            "name": "fields",
            "schema": {
              "type": "string"
            },
            "description": "Get only the named fields in the response (comma separated). The response is then smaller and faster. You can also name the extra fields (gocardless_customer_id, has_direct_debit_detail, bank_account_setup_url) here, and then `?extra_fields=` has no effect. `id` is always in the response. An unknown name has no effect."
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            },
            "description": "The maximum number of items in the page. The default is 200."
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer"
            },
            "description": "The position of the first item of the page in the full list. The default is 0."
          },
          {
            "in": "query",
            "name": "ref",
            "schema": {
              "type": "string"
            },
            "description": "Filter to get only the Customers with a specific `ref` (exact match)."
          },
          {
            "in": "query",
            "name": "source_id",
            "schema": {
              "type": "string"
            },
            "description": "Filter to get only the Customers with a specific `source_id` (exact match)."
          }
        ],
        "tags": [
          "Customer"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedCustomerListItemList"
                },
                "examples": {
                  "Customer": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "id": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                          "name": "Globex Corporation",
                          "address_line_1": "Accounts Payable Department",
                          "address_line_2": "PO Box 100",
                          "postal_code": "AB1 2CD",
                          "city": "Springfield",
                          "state": "Greater Springfield",
                          "country": "US",
                          "ref": "CUST-0042",
                          "currency": "USD",
                          "balance": "45.67",
                          "pause_chasing": false,
                          "warning_level": 0,
                          "extra_data": {},
                          "tags": [
                            {
                              "id": "32fd143d-e5fc-4be5-a8f2-e4756e92edcf",
                              "name": "Disputed",
                              "color": "FF0000",
                              "description": "The customer raised a dispute",
                              "tag_category": {
                                "id": "5b10714b-66d0-4db4-b8bb-5bf0207fd5f9",
                                "name": "Collections"
                              }
                            }
                          ],
                          "source": "kolleno_api",
                          "source_id": "my_company_ref",
                          "date_modified": "2026-01-06T11:25:03.415043Z",
                          "date_created": "2025-11-24T12:53:55.611646Z"
                        }
                      ]
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      },
      "post": {
        "operationId": "customer_create",
        "description": "Create a Customer. It will set the field `source` to `kolleno_api` automatically.\nThe Customer belongs to the Company of the URL. Only `name` is required.\n\nA request that sets `pause_chasing` to `true` needs the access to change the chasing\nstatus. Without it, the request returns 403.\n\n**Fields**\n\n- `country` is the ISO code of the country (2 upper-case letters), and `currency` is\n  the ISO code of the currency (3 upper-case letters). An empty string removes the value.\n- `ref` is a user friendly reference for the Customer.\n- `source_id` is the ID in your system so you can keep track of the Customer.\n- `warning_level` is an integer from 0 to 10 for the strike level of the Customer.\n- `extra_data` is a JSON object.\n- `source`, `balance`, `date_created` and `date_modified` are read-only. If you send\n  them, they do not change.\n\n**tags**\n\n`tags` is a list of Tag UUIDs (see the Tag endpoints). Send it in a JSON body\n(`Content-Type: application/json`).\n\n- The list replaces all the tags of the Customer.\n- An empty list `[]` removes all the tags.\n- If you do not send `tags`, the tags do not change.\n- A Tag of another Company, or a deleted Tag, returns 400. The body is then a list:\n  `[\"One or more tags were not found.\"]`.",
        "summary": "Create Customer",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          }
        ],
        "tags": [
          "Customer"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerCreateRequest"
              },
              "examples": {
                "Customer": {
                  "value": {
                    "name": "Globex Corporation",
                    "address_line_1": "Accounts Payable Department",
                    "address_line_2": "PO Box 100",
                    "postal_code": "AB1 2CD",
                    "city": "Springfield",
                    "state": "Greater Springfield",
                    "country": "US",
                    "source_id": "my_company_ref",
                    "ref": "CUST-0042",
                    "currency": "USD",
                    "pause_chasing": false,
                    "warning_level": 1,
                    "extra_data": {},
                    "tags": [
                      "32fd143d-e5fc-4be5-a8f2-e4756e92edcf"
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                },
                "examples": {
                  "Customer": {
                    "value": {
                      "id": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                      "name": "Globex Corporation",
                      "address_line_1": "Accounts Payable Department",
                      "address_line_2": "PO Box 100",
                      "postal_code": "AB1 2CD",
                      "city": "Springfield",
                      "state": "Greater Springfield",
                      "country": "US",
                      "ref": "CUST-0042",
                      "currency": "USD",
                      "balance": "45.67",
                      "pause_chasing": false,
                      "warning_level": 0,
                      "extra_data": {},
                      "tags": [
                        {
                          "id": "32fd143d-e5fc-4be5-a8f2-e4756e92edcf",
                          "name": "Disputed",
                          "color": "FF0000",
                          "description": "The customer raised a dispute",
                          "tag_category": {
                            "id": "5b10714b-66d0-4db4-b8bb-5bf0207fd5f9",
                            "name": "Collections"
                          }
                        }
                      ],
                      "source": "kolleno_api",
                      "source_id": "my_company_ref",
                      "date_modified": "2026-01-06T11:25:03.415043Z",
                      "date_created": "2025-11-24T12:53:55.611646Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                      "additionalProperties": {}
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "A list of messages for an error that no field owns."
                    }
                  ]
                },
                "examples": {
                  "RequiredField": {
                    "value": {
                      "name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Required field"
                  },
                  "UnknownCountry": {
                    "value": {
                      "country": [
                        "'ZZ' is not a valid ISO."
                      ]
                    },
                    "summary": "Unknown country"
                  },
                  "DuplicateSourceId": {
                    "value": {
                      "source_id": [
                        "There is an integrity error as this source_id already exists."
                      ]
                    },
                    "summary": "Duplicate source_id"
                  },
                  "TagNotFound": {
                    "value": [
                      "One or more tags were not found."
                    ],
                    "summary": "Tag not found"
                  }
                }
              }
            },
            "description": "A value of the request is not valid. For most errors the body is an object of messages per field. For a Tag that is not found, the body is a list."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      }
    },
    "/v1/customer/{company}/{id}/": {
      "get": {
        "operationId": "customer_retrieve",
        "description": "Retrieve a specific Customer.",
        "summary": "Retrieve Customer",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "query",
            "name": "extra_fields",
            "schema": {
              "type": "string"
            },
            "description": "Get additional fields in the response (comma separated). The possible values are: gocardless_customer_id, has_direct_debit_detail, bank_account_setup_url."
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "description": "UUID of the Customer. When `?source=` is sent, the `source_id` of the Customer.",
            "required": true
          },
          {
            "in": "query",
            "name": "source",
            "schema": {
              "type": "string"
            },
            "description": "Send the source of the Customer, for example `kolleno_api`. The `{id}` in the URL is then the `source_id` of the Customer in that source. If no Customer matches, the response is 404. A `source_id` that holds `/` or `.` cannot be used in the URL."
          }
        ],
        "tags": [
          "Customer"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                },
                "examples": {
                  "Customer": {
                    "value": {
                      "id": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                      "name": "Globex Corporation",
                      "address_line_1": "Accounts Payable Department",
                      "address_line_2": "PO Box 100",
                      "postal_code": "AB1 2CD",
                      "city": "Springfield",
                      "state": "Greater Springfield",
                      "country": "US",
                      "ref": "CUST-0042",
                      "currency": "USD",
                      "balance": "45.67",
                      "pause_chasing": false,
                      "warning_level": 0,
                      "extra_data": {},
                      "tags": [
                        {
                          "id": "32fd143d-e5fc-4be5-a8f2-e4756e92edcf",
                          "name": "Disputed",
                          "color": "FF0000",
                          "description": "The customer raised a dispute",
                          "tag_category": {
                            "id": "5b10714b-66d0-4db4-b8bb-5bf0207fd5f9",
                            "name": "Collections"
                          }
                        }
                      ],
                      "source": "kolleno_api",
                      "source_id": "my_company_ref",
                      "date_modified": "2026-01-06T11:25:03.415043Z",
                      "date_created": "2025-11-24T12:53:55.611646Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "CustomerNotFound": {
                    "value": {
                      "detail": "No Customer matches the given query."
                    },
                    "summary": "Customer not found"
                  },
                  "NoMatchForTheSourceId": {
                    "value": {
                      "detail": "No customer found with the given source_id."
                    },
                    "summary": "No match for the source_id"
                  }
                }
              }
            },
            "description": "The Customer is not in the Company of the URL, or it is outside the portfolios of the user. With `?source=`, no Customer has this `source` and `source_id`."
          }
        }
      },
      "put": {
        "operationId": "customer_update",
        "description": "Update a specific Customer. A PUT request must send `name` and `company`.\n`company` must be the UUID of the Company of the URL. Any other value returns\n400. `extra_data` is always replaced as a whole. A field that you do not send\nkeeps its value, but `source_id` becomes an empty string.\n\nPUT needs `name` and `company`, and these fields are not allowed on a Customer\nfrom another source (see below). So for such a Customer, PUT always returns 400.\nUse PATCH.\n\nYou can edit all the fields of a Customer if `source` equals one of: `manual`,\n`kolleno_api`, `csv`. Otherwise, you can only update the fields `extra_data`, `tags`\nand `warning_level`. Any other field of such a Customer returns 400.\n\nA request that sends `pause_chasing`, with any value, needs the access to change the\nchasing status. Without it, the request returns 403.\n\n**Fields**\n\n- `country` is the ISO code of the country (2 upper-case letters), and `currency` is\n  the ISO code of the currency (3 upper-case letters). An empty string removes the value.\n- `ref` is a user friendly reference for the Customer.\n- `source_id` is the ID in your system so you can keep track of the Customer.\n- `warning_level` is an integer from 0 to 10 for the strike level of the Customer.\n- `extra_data` is a JSON object.\n- `source`, `balance`, `date_created` and `date_modified` are read-only. If you send\n  them, they do not change.\n\n**tags**\n\n`tags` is a list of Tag UUIDs (see the Tag endpoints). Send it in a JSON body\n(`Content-Type: application/json`).\n\n- The list replaces all the tags of the Customer.\n- An empty list `[]` removes all the tags.\n- If you do not send `tags`, the tags do not change.\n- A Tag of another Company, or a deleted Tag, returns 400. The body is then a list:\n  `[\"One or more tags were not found.\"]`.",
        "summary": "Replace Customer",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "description": "UUID of the Customer. When `?source=` is sent, the `source_id` of the Customer.",
            "required": true
          },
          {
            "in": "query",
            "name": "source",
            "schema": {
              "type": "string"
            },
            "description": "Send the source of the Customer, for example `kolleno_api`. The `{id}` in the URL is then the `source_id` of the Customer in that source. If no Customer matches, the response is 404. A `source_id` that holds `/` or `.` cannot be used in the URL."
          }
        ],
        "tags": [
          "Customer"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerUpdateRequest"
              },
              "examples": {
                "Customer": {
                  "value": {
                    "name": "Globex Corporation",
                    "address_line_1": "Accounts Payable Department",
                    "address_line_2": "PO Box 100",
                    "postal_code": "AB1 2CD",
                    "city": "Springfield",
                    "state": "Greater Springfield",
                    "country": "US",
                    "source_id": "my_company_ref",
                    "ref": "CUST-0042",
                    "currency": "USD",
                    "pause_chasing": false,
                    "warning_level": 1,
                    "extra_data": {},
                    "tags": [
                      "32fd143d-e5fc-4be5-a8f2-e4756e92edcf"
                    ],
                    "company": "285429a2-1a37-4ceb-ad14-7687f9b6d16d"
                  }
                }
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                },
                "examples": {
                  "Customer": {
                    "value": {
                      "id": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                      "name": "Globex Corporation",
                      "address_line_1": "Accounts Payable Department",
                      "address_line_2": "PO Box 100",
                      "postal_code": "AB1 2CD",
                      "city": "Springfield",
                      "state": "Greater Springfield",
                      "country": "US",
                      "ref": "CUST-0042",
                      "currency": "USD",
                      "balance": "45.67",
                      "pause_chasing": false,
                      "warning_level": 0,
                      "extra_data": {},
                      "tags": [
                        {
                          "id": "32fd143d-e5fc-4be5-a8f2-e4756e92edcf",
                          "name": "Disputed",
                          "color": "FF0000",
                          "description": "The customer raised a dispute",
                          "tag_category": {
                            "id": "5b10714b-66d0-4db4-b8bb-5bf0207fd5f9",
                            "name": "Collections"
                          }
                        }
                      ],
                      "source": "kolleno_api",
                      "source_id": "my_company_ref",
                      "date_modified": "2026-01-06T11:25:03.415043Z",
                      "date_created": "2025-11-24T12:53:55.611646Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                      "additionalProperties": {}
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "A list of messages for an error that no field owns."
                    }
                  ]
                },
                "examples": {
                  "RequiredField": {
                    "value": {
                      "company": [
                        "This field is required."
                      ]
                    },
                    "summary": "Required field"
                  },
                  "CompanyOfAnotherURL": {
                    "value": {
                      "company": [
                        "Invalid pk \"285429a2-1a37-4ceb-ad14-7687f9b6d16d\" - object does not exist."
                      ]
                    },
                    "summary": "Company of another URL"
                  },
                  "FieldNotAllowedForTheSource": {
                    "value": {
                      "non_field_errors": [
                        "Customer imported from external source can only have the fields 'extra_data', 'tags', 'warning_level' updated."
                      ]
                    },
                    "summary": "Field not allowed for the source"
                  },
                  "DuplicateSourceId": {
                    "value": {
                      "non_field_errors": [
                        "The fields company, source, source_id must make a unique set."
                      ]
                    },
                    "summary": "Duplicate source_id"
                  },
                  "TagNotFound": {
                    "value": [
                      "One or more tags were not found."
                    ],
                    "summary": "Tag not found"
                  }
                }
              }
            },
            "description": "A value of the request is not valid, a required field is missing, or the request changes a field that the `source` of the Customer does not allow. For a Tag that is not found, the body is a list."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "CustomerNotFound": {
                    "value": {
                      "detail": "No Customer matches the given query."
                    },
                    "summary": "Customer not found"
                  },
                  "NoMatchForTheSourceId": {
                    "value": {
                      "detail": "No customer found with the given source_id."
                    },
                    "summary": "No match for the source_id"
                  }
                }
              }
            },
            "description": "The Customer is not in the Company of the URL, or it is outside the portfolios of the user. With `?source=`, no Customer has this `source` and `source_id`."
          }
        }
      },
      "patch": {
        "operationId": "customer_partial_update",
        "description": "Update details about a specific Customer. Send only the fields to change.\n\nYou can edit all the fields of a Customer if `source` equals one of: `manual`,\n`kolleno_api`, `csv`. Otherwise, you can only update the fields `extra_data`, `tags`\nand `warning_level`. Any other field of such a Customer returns 400.\n\nA request that sends `pause_chasing`, with any value, needs the access to change the\nchasing status. Without it, the request returns 403.\n\n**Fields**\n\n- `country` is the ISO code of the country (2 upper-case letters), and `currency` is\n  the ISO code of the currency (3 upper-case letters). An empty string removes the value.\n- `ref` is a user friendly reference for the Customer.\n- `source_id` is the ID in your system so you can keep track of the Customer.\n- `warning_level` is an integer from 0 to 10 for the strike level of the Customer.\n- `extra_data` is a JSON object.\n- `source`, `balance`, `date_created` and `date_modified` are read-only. If you send\n  them, they do not change.\n\n**extra_data on PATCH**\n\nBy default, PATCH replaces the full `extra_data` object with the object you send.\n\nYour Kolleno representative can turn on merge mode for your company. With merge mode on:\n\n- Keys you send are added or updated.\n- Keys you do not send keep their values.\n- A key sent as `null` is removed.\n- Only top-level keys are merged. A nested object is replaced as a whole.\n- An empty object `{}` changes nothing.\n- PUT does not merge. It always replaces the full object.\n- It works with the Customer UUID and with `?source=`.\n\nExample with merge mode on. Stored value:\n\n```json\n{\"a\": \"0\", \"b\": \"2\", \"c\": \"3\"}\n```\n\nRequest body:\n\n```json\n{\"extra_data\": {\"a\": \"1\", \"c\": null}}\n```\n\nResult:\n\n```json\n{\"a\": \"1\", \"b\": \"2\"}\n```\n\n**tags**\n\n`tags` is a list of Tag UUIDs (see the Tag endpoints). Send it in a JSON body\n(`Content-Type: application/json`).\n\n- The list replaces all the tags of the Customer.\n- An empty list `[]` removes all the tags.\n- If you do not send `tags`, the tags do not change.\n- A Tag of another Company, or a deleted Tag, returns 400. The body is then a list:\n  `[\"One or more tags were not found.\"]`.",
        "summary": "Update Customer",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "description": "UUID of the Customer. When `?source=` is sent, the `source_id` of the Customer.",
            "required": true
          },
          {
            "in": "query",
            "name": "source",
            "schema": {
              "type": "string"
            },
            "description": "Send the source of the Customer, for example `kolleno_api`. The `{id}` in the URL is then the `source_id` of the Customer in that source. If no Customer matches, the response is 404. A `source_id` that holds `/` or `.` cannot be used in the URL."
          }
        ],
        "tags": [
          "Customer"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCustomerUpdateRequest"
              },
              "examples": {
                "Customer": {
                  "value": {
                    "warning_level": 2,
                    "extra_data": {
                      "segment": "enterprise"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                },
                "examples": {
                  "Customer": {
                    "value": {
                      "id": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                      "name": "Globex Corporation",
                      "address_line_1": "Accounts Payable Department",
                      "address_line_2": "PO Box 100",
                      "postal_code": "AB1 2CD",
                      "city": "Springfield",
                      "state": "Greater Springfield",
                      "country": "US",
                      "ref": "CUST-0042",
                      "currency": "USD",
                      "balance": "45.67",
                      "pause_chasing": false,
                      "warning_level": 0,
                      "extra_data": {},
                      "tags": [
                        {
                          "id": "32fd143d-e5fc-4be5-a8f2-e4756e92edcf",
                          "name": "Disputed",
                          "color": "FF0000",
                          "description": "The customer raised a dispute",
                          "tag_category": {
                            "id": "5b10714b-66d0-4db4-b8bb-5bf0207fd5f9",
                            "name": "Collections"
                          }
                        }
                      ],
                      "source": "kolleno_api",
                      "source_id": "my_company_ref",
                      "date_modified": "2026-01-06T11:25:03.415043Z",
                      "date_created": "2025-11-24T12:53:55.611646Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                      "additionalProperties": {}
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "A list of messages for an error that no field owns."
                    }
                  ]
                },
                "examples": {
                  "FieldNotAllowedForTheSource": {
                    "value": {
                      "non_field_errors": [
                        "Customer imported from external source can only have the fields 'extra_data', 'tags', 'warning_level' updated."
                      ]
                    },
                    "summary": "Field not allowed for the source"
                  },
                  "UnknownCountry": {
                    "value": {
                      "country": [
                        "'ZZ' is not a valid ISO."
                      ]
                    },
                    "summary": "Unknown country"
                  },
                  "DuplicateSourceId": {
                    "value": {
                      "non_field_errors": [
                        "The fields company, source, source_id must make a unique set."
                      ]
                    },
                    "summary": "Duplicate source_id"
                  },
                  "TagNotFound": {
                    "value": [
                      "One or more tags were not found."
                    ],
                    "summary": "Tag not found"
                  }
                }
              }
            },
            "description": "A value of the request is not valid, or the request changes a field that the `source` of the Customer does not allow. For a Tag that is not found, the body is a list."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "CustomerNotFound": {
                    "value": {
                      "detail": "No Customer matches the given query."
                    },
                    "summary": "Customer not found"
                  },
                  "NoMatchForTheSourceId": {
                    "value": {
                      "detail": "No customer found with the given source_id."
                    },
                    "summary": "No match for the source_id"
                  }
                }
              }
            },
            "description": "The Customer is not in the Company of the URL, or it is outside the portfolios of the user. With `?source=`, no Customer has this `source` and `source_id`."
          }
        }
      },
      "delete": {
        "operationId": "customer_destroy",
        "description": "Permanently delete a specific Customer. You cannot undo it. Kolleno also deletes\nthe data that belongs to the Customer, for example its Invoices, Credit Notes,\nTransactions and Persons.\n\nYou can only delete Customers if `source` equals one of: `manual`, `kolleno_api`,\n`csv`. Any other source returns 400. A Customer that has custom object records\nalso returns 400. Move or delete the records first.",
        "summary": "Delete Customer",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "description": "UUID of the Customer. When `?source=` is sent, the `source_id` of the Customer.",
            "required": true
          },
          {
            "in": "query",
            "name": "source",
            "schema": {
              "type": "string"
            },
            "description": "Send the source of the Customer, for example `kolleno_api`. The `{id}` in the URL is then the `source_id` of the Customer in that source. If no Customer matches, the response is 404. A `source_id` that holds `/` or `.` cannot be used in the URL."
          }
        ],
        "tags": [
          "Customer"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                      "additionalProperties": {}
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "A list of messages for an error that no field owns."
                    }
                  ]
                },
                "examples": {
                  "ImportedCustomer": {
                    "value": {
                      "non_field_errors": [
                        "Customer imported from external source cannot be deleted."
                      ]
                    },
                    "summary": "Imported Customer"
                  },
                  "CustomerWithRecords": {
                    "value": {
                      "non_field_errors": [
                        "This customer has 2 custom object record(s). Move or delete the records first."
                      ]
                    },
                    "summary": "Customer with records"
                  }
                }
              }
            },
            "description": "The `source` of the Customer is not `manual`, `kolleno_api` or `csv`, or the Customer has custom object records."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "CustomerNotFound": {
                    "value": {
                      "detail": "No Customer matches the given query."
                    },
                    "summary": "Customer not found"
                  },
                  "NoMatchForTheSourceId": {
                    "value": {
                      "detail": "No customer found with the given source_id."
                    },
                    "summary": "No match for the source_id"
                  }
                }
              }
            },
            "description": "The Customer is not in the Company of the URL, or it is outside the portfolios of the user. With `?source=`, no Customer has this `source` and `source_id`."
          }
        }
      }
    },
    "/v1/customer/custom-fields/{company}/{customer}/": {
      "put": {
        "operationId": "customer_custom_fields_update",
        "description": "Create or update the values of the Custom Fields of a Customer. The keys of the body\nare the `field_name` of the Custom Fields, and the values are the values to set.\nOne request updates all the fields, or none if a value is not valid.\n\nPUT and PATCH do the same thing. A Custom Field that is not in the body keeps its\nvalue.\n\nThe Customer can be identified by its UUID in the URL, or by its `source_id` in the\nURL with the `source` query parameter. If no Customer of the Company matches, or the\nCustomer is outside the portfolios of the user, the request returns 403.\n\nSee: [Add custom fields to your Kolleno Customers](https://help.kolleno.com/en/articles/11660969-add-custom-fields-to-your-kolleno-customers)\n\nIf you are unsure about the fields API names, please reach out to support.\n\n**Values**\n\nThe type of the value must match the type of the Custom Field. `null` is accepted only\nby a Custom Field that Kolleno support has set to accept it, and clears the value.\n\n- Integer: a JSON integer.\n- Decimal: a number, or a string that holds a number, for example `\"10.12\"`.\n- Boolean: `true` or `false`.\n- String: a JSON string.\n- Date: a string in the format YYYY-MM-DD.\n- Datetime: a string in the ISO 8601 format.\n\nIf the Custom Field has a list of choices, the value must be one of them. For a\nString field with choices, an empty string `\"\"` is also accepted, and clears the value.\n\nThe response holds the fields that you sent. A Decimal value is a number. Each other\nvalue is the value that you sent.",
        "summary": "Set Custom Fields of a Customer (PUT)",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "customer",
            "schema": {
              "type": "string"
            },
            "description": "The Customer to update: its Kolleno UUID, or its `source_id` from your ERP with the `source` query parameter. A `source_id` that holds `/` or `.` cannot be used in the URL.",
            "required": true
          },
          {
            "in": "query",
            "name": "source",
            "schema": {
              "type": "string"
            },
            "description": "Send it when the identifier in the URL is the `source_id` of the record, from the system that the record comes from, for example `netsuite`."
          }
        ],
        "tags": [
          "Customer Custom Fields"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "examples": {
                "CustomFields": {
                  "value": {
                    "upsell": true,
                    "amount_requested": 10.12
                  },
                  "summary": "Custom Fields"
                }
              }
            }
          }
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "examples": {
                  "CustomFields": {
                    "value": {
                      "upsell": true,
                      "amount_requested": 10.12
                    },
                    "summary": "Custom Fields"
                  }
                }
              }
            },
            "description": "The values that were saved."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "UnknownField": {
                    "value": {
                      "amount": [
                        "Custom field with field_name 'amount' not found for this company."
                      ]
                    },
                    "summary": "Unknown field"
                  },
                  "WrongType": {
                    "value": {
                      "upsell": [
                        "'upsell' must be a boolean."
                      ]
                    },
                    "summary": "Wrong type"
                  },
                  "EmptyBody": {
                    "value": {
                      "non_field_errors": [
                        "At least one custom field must be provided."
                      ]
                    },
                    "summary": "Empty body"
                  }
                }
              }
            },
            "description": "The body is not a JSON object or is empty, a key is not the `field_name` of a Custom Field of the Company, or a value has the wrong type or is not an allowed choice."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "CustomerOfAnotherCompany": {
                    "value": {
                      "detail": "No Customer matches the given query."
                    },
                    "summary": "Customer of another Company"
                  }
                }
              }
            },
            "description": "The Customer belongs to another Company that the user of the API key can also access."
          }
        }
      },
      "patch": {
        "operationId": "customer_custom_fields_partial_update",
        "description": "Create or update the values of the Custom Fields of a Customer. The keys of the body\nare the `field_name` of the Custom Fields, and the values are the values to set.\nOne request updates all the fields, or none if a value is not valid.\n\nPUT and PATCH do the same thing. A Custom Field that is not in the body keeps its\nvalue.\n\nThe Customer can be identified by its UUID in the URL, or by its `source_id` in the\nURL with the `source` query parameter. If no Customer of the Company matches, or the\nCustomer is outside the portfolios of the user, the request returns 403.\n\nSee: [Add custom fields to your Kolleno Customers](https://help.kolleno.com/en/articles/11660969-add-custom-fields-to-your-kolleno-customers)\n\nIf you are unsure about the fields API names, please reach out to support.\n\n**Values**\n\nThe type of the value must match the type of the Custom Field. `null` is accepted only\nby a Custom Field that Kolleno support has set to accept it, and clears the value.\n\n- Integer: a JSON integer.\n- Decimal: a number, or a string that holds a number, for example `\"10.12\"`.\n- Boolean: `true` or `false`.\n- String: a JSON string.\n- Date: a string in the format YYYY-MM-DD.\n- Datetime: a string in the ISO 8601 format.\n\nIf the Custom Field has a list of choices, the value must be one of them. For a\nString field with choices, an empty string `\"\"` is also accepted, and clears the value.\n\nThe response holds the fields that you sent. A Decimal value is a number. Each other\nvalue is the value that you sent.",
        "summary": "Update Custom Fields of a Customer",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "customer",
            "schema": {
              "type": "string"
            },
            "description": "The Customer to update: its Kolleno UUID, or its `source_id` from your ERP with the `source` query parameter. A `source_id` that holds `/` or `.` cannot be used in the URL.",
            "required": true
          },
          {
            "in": "query",
            "name": "source",
            "schema": {
              "type": "string"
            },
            "description": "Send it when the identifier in the URL is the `source_id` of the record, from the system that the record comes from, for example `netsuite`."
          }
        ],
        "tags": [
          "Customer Custom Fields"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "examples": {
                "CustomFields": {
                  "value": {
                    "upsell": true,
                    "amount_requested": 10.12
                  },
                  "summary": "Custom Fields"
                }
              }
            }
          }
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "examples": {
                  "CustomFields": {
                    "value": {
                      "upsell": true,
                      "amount_requested": 10.12
                    },
                    "summary": "Custom Fields"
                  }
                }
              }
            },
            "description": "The values that were saved."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "UnknownField": {
                    "value": {
                      "amount": [
                        "Custom field with field_name 'amount' not found for this company."
                      ]
                    },
                    "summary": "Unknown field"
                  },
                  "WrongType": {
                    "value": {
                      "upsell": [
                        "'upsell' must be a boolean."
                      ]
                    },
                    "summary": "Wrong type"
                  },
                  "EmptyBody": {
                    "value": {
                      "non_field_errors": [
                        "At least one custom field must be provided."
                      ]
                    },
                    "summary": "Empty body"
                  }
                }
              }
            },
            "description": "The body is not a JSON object or is empty, a key is not the `field_name` of a Custom Field of the Company, or a value has the wrong type or is not an allowed choice."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "CustomerOfAnotherCompany": {
                    "value": {
                      "detail": "No Customer matches the given query."
                    },
                    "summary": "Customer of another Company"
                  }
                }
              }
            },
            "description": "The Customer belongs to another Company that the user of the API key can also access."
          }
        }
      }
    },
    "/v1/customer/portal-url/{company}/": {
      "get": {
        "operationId": "customer_portal_url_retrieve",
        "description": "Retrieve the URL to the Kolleno Customer Portal of a Customer. You can search the\nCustomer either by the Kolleno Customer ID OR the `source_id` from your\nERP/accounting platform. Send one of the two query parameters. If you send both,\nthe Customer must match both.\n\nEach request gives a new URL. The URL holds a token that expires after the number\nof days that your Company sets for the Customer Portal.",
        "summary": "Retrieve Customer Portal URL",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "query",
            "name": "customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Customer to retrieve. A value that is not a UUID has no effect."
          },
          {
            "in": "query",
            "name": "source_id",
            "schema": {
              "type": "string"
            },
            "description": "The `source_id` from the ERP/accounting platform, rather than the Kolleno Customer ID."
          }
        ],
        "tags": [
          "Customer"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerPortal"
                },
                "examples": {
                  "CustomerPortalURL": {
                    "value": {
                      "id": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                      "customer_portal_url": "https://app.kolleno.com/customer-portal/EXAMPLE-TOKEN/"
                    },
                    "summary": "Customer Portal URL"
                  }
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "CustomerNotFound": {
                    "value": {
                      "non_field_errors": [
                        "This customer could not be found."
                      ]
                    },
                    "summary": "Customer not found"
                  }
                }
              }
            },
            "description": "No Customer matches the query, no query parameter was sent, or the Customer is outside the portfolios of the user."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      }
    },
    "/v1/direct-debit-detail/{company}/": {
      "get": {
        "operationId": "direct_debit_detail_list",
        "description": "Retrieve the Direct Debit Details of the Customers in a given Company. Ordered by\n`date_created`. A Direct Debit Detail that was deleted is not listed.\n\n`country` and `currency` are the UUIDs of a Country and a Currency in Kolleno,\nnot their ISO codes.",
        "summary": "List Direct Debit Details",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "query",
            "name": "customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Filter to get only a specific Customer's Direct Debit Details. An id that does not exist returns 400."
          },
          {
            "in": "query",
            "name": "customer__source_id",
            "schema": {
              "type": "string"
            },
            "description": "Filter to get only a specific Customer's Direct Debit Details, using the `source_id` of the Customer."
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            },
            "description": "The maximum number of items in the page. The default is 200."
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer"
            },
            "description": "The position of the first item of the page in the full list. The default is 0."
          },
          {
            "in": "query",
            "name": "source_id",
            "schema": {
              "type": "string"
            },
            "description": "Filter to get only a specific `source_id`."
          }
        ],
        "tags": [
          "Direct Debit Detail"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedDirectDebitDetailList"
                },
                "examples": {
                  "DirectDebitDetail": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "id": "7b25410e-7514-4153-84e5-8cdbe10d791a",
                          "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                          "country": "0c6b1f7e-3d2a-4e8b-9f51-6a7d2c4e8b13",
                          "currency": "5e2d8a41-7c9b-4f36-a0e8-1b3c5d7f9a24",
                          "bank_name": "Example Bank, N.A.",
                          "account_type": "Checking account",
                          "account_holder_name": "Globex Corporation",
                          "account_number_ending": "1234",
                          "mandate_ref": "EXAMPLE-0001",
                          "mandate_scheme": "SEPA",
                          "mandate_status": "inactive",
                          "next_possible_charge_date": "2026-11-01",
                          "payments_require_approval": false,
                          "source": "gocardless",
                          "source_id": "mandate_EXAMPLE0001",
                          "date_created": "2026-01-24T12:53:55.610255Z"
                        }
                      ]
                    },
                    "summary": "Direct Debit Detail"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "UnknownCustomer": {
                    "value": {
                      "customer": [
                        "Select a valid choice. That choice is not one of the available choices."
                      ]
                    },
                    "summary": "Unknown customer"
                  }
                }
              }
            },
            "description": "A filter has a value that is not valid, for example a `customer` that is not a UUID or that does not exist."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      }
    },
    "/v1/email-sent/{company}/": {
      "get": {
        "operationId": "email_sent_list",
        "description": "Retrieve the emails sent in a given Company. Ordered by `date_sent`, oldest first.\nOnly the emails that have a `date_sent` are returned.\n\nTo get the emails of the Steps from **List of Steps**, use `step__in`. Send at most\n100 to 200 Step IDs per request: a URL longer than about 16 KB returns **414**.",
        "summary": "List Emails Sent",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "query",
            "name": "customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Filter to get only the emails sent to a specific Customer. An id that does not exist returns 400."
          },
          {
            "in": "query",
            "name": "date_sent__gte",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "To get all the emails sent at or after an ISO 8601 datetime."
          },
          {
            "in": "query",
            "name": "extra_fields",
            "schema": {
              "type": "string"
            },
            "description": "Get additional fields in the response (comma separated, no brackets). The possible values are: body, body_text: the HTML and the plain text of the email. Other values are ignored."
          },
          {
            "in": "query",
            "name": "invoice",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Filter to get only the emails about a specific Invoice."
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            },
            "description": "The maximum number of items in the page. The default is 200."
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer"
            },
            "description": "The position of the first item of the page in the full list. The default is 0."
          },
          {
            "in": "query",
            "name": "step",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Filter to get only the email of a specific Step (see **List of Steps**)."
          },
          {
            "in": "query",
            "name": "step__in",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "description": "Filter to get only the emails of a list of Steps (comma separated). Send at most 100 to 200 Step IDs per request.",
            "explode": false,
            "style": "form",
            "examples": {
              "TwoSteps": {
                "value": [
                  "d2c9ee92-762a-4566-a180-e808502a97ce",
                  "e7cc3686-2349-4c79-afb9-1ce7525e50d0"
                ],
                "summary": "Two Steps"
              }
            }
          }
        ],
        "tags": [
          "Email Sent"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedEmailSentList"
                },
                "examples": {
                  "EmailSent": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "id": "7e71ff67-2c27-4891-8411-b1b7b95d31ab",
                          "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                          "step": "d2c9ee92-762a-4566-a180-e808502a97ce",
                          "invoices": [
                            "a3f73037-33bf-4139-8e75-0da72b9d1e33"
                          ],
                          "email_address_from": "accounts@example.com",
                          "name_from": "Accounts Team",
                          "to_recipients": [
                            {
                              "name": "Jane Doe",
                              "email_address": "jane.doe@example.com"
                            }
                          ],
                          "cc_recipients": [],
                          "bcc_recipients": [],
                          "subject": "Invoice INV-0038 is overdue",
                          "status": "delivered",
                          "workflow": "8ec8c055-a2c4-4866-8688-8b610cd8ad37",
                          "template": "2d9d8667-51b1-47c9-b207-d930e88c19cd",
                          "date_sent": "2026-10-12T09:00:04.118263Z",
                          "date_created": "2026-10-12T09:00:01.902114Z"
                        }
                      ]
                    },
                    "summary": "Email Sent"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "NotAUUID": {
                    "value": {
                      "invoice": [
                        "Enter a valid UUID."
                      ]
                    },
                    "summary": "Not a UUID"
                  }
                }
              }
            },
            "description": "A filter has a value that is not valid, for example an id that is not a UUID, a `customer` that does not exist, or a date that is not valid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      }
    },
    "/v1/email-sent/{company}/{id}/": {
      "get": {
        "operationId": "email_sent_retrieve",
        "description": "Retrieve a specific email sent.\n\nReturns **404** if the email does not exist or was not sent.",
        "summary": "Retrieve Email Sent",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "query",
            "name": "extra_fields",
            "schema": {
              "type": "string"
            },
            "description": "Get additional fields in the response (comma separated, no brackets). The possible values are: body, body_text: the HTML and the plain text of the email. Other values are ignored."
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the email sent.",
            "required": true
          }
        ],
        "tags": [
          "Email Sent"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailSent"
                },
                "examples": {
                  "EmailSent": {
                    "value": {
                      "id": "7e71ff67-2c27-4891-8411-b1b7b95d31ab",
                      "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                      "step": "d2c9ee92-762a-4566-a180-e808502a97ce",
                      "invoices": [
                        "a3f73037-33bf-4139-8e75-0da72b9d1e33"
                      ],
                      "email_address_from": "accounts@example.com",
                      "name_from": "Accounts Team",
                      "to_recipients": [
                        {
                          "name": "Jane Doe",
                          "email_address": "jane.doe@example.com"
                        }
                      ],
                      "cc_recipients": [],
                      "bcc_recipients": [],
                      "subject": "Invoice INV-0038 is overdue",
                      "status": "delivered",
                      "workflow": "8ec8c055-a2c4-4866-8688-8b610cd8ad37",
                      "template": "2d9d8667-51b1-47c9-b207-d930e88c19cd",
                      "date_sent": "2026-10-12T09:00:04.118263Z",
                      "date_created": "2026-10-12T09:00:01.902114Z"
                    },
                    "summary": "Email Sent"
                  }
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "RecordNotFound": {
                    "value": {
                      "detail": "No Invoice matches the given query."
                    },
                    "summary": "Record not found"
                  }
                }
              }
            },
            "description": "The record does not exist, or the user cannot see it. The `detail` names the type of the record."
          }
        }
      }
    },
    "/v1/invoice-pdf/{invoice}/": {
      "get": {
        "operationId": "invoice_pdf_list",
        "description": "Retrieve the files that Kolleno keeps for a given Invoice: the file uploaded via\nthe API, or the copy of the PDF from the accounting system when the Company\nkeeps copies. At the moment, the API only supports one file per Invoice.\n\nWhen the Invoice ID in the URL is the source ID, pass `?id_from=source` and the\nUUID of the Company in `?company=`. An Invoice ID that does not exist returns 403.\nAn Invoice of a Customer outside the portfolios of the user returns 403.",
        "summary": "List Invoice PDFs",
        "parameters": [
          {
            "in": "query",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company of the Invoice. You must send it when `id_from=source`. If you send it with a Kolleno ID, the Invoice must belong to this Company, else the request returns 404."
          },
          {
            "in": "query",
            "name": "id_from",
            "schema": {
              "type": "string",
              "enum": [
                "source"
              ]
            },
            "description": "Send `source` when the identifier in the URL is the source ID of the record and not the Kolleno ID."
          },
          {
            "in": "path",
            "name": "invoice",
            "schema": {
              "type": "string"
            },
            "description": "ID of the Invoice. It is the source ID when `id_from=source`.",
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            },
            "description": "The maximum number of items in the page. The default is 200."
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer"
            },
            "description": "The position of the first item of the page in the full list. The default is 0."
          }
        ],
        "tags": [
          "Invoice PDF"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedInvoicePdfList"
                },
                "examples": {
                  "InvoicePDF": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "id": "82c49967-8e95-4afa-b1d4-80e162cc4f41",
                          "invoice": "a3f73037-33bf-4139-8e75-0da72b9d1e33",
                          "name": "Invoice",
                          "extension": "pdf",
                          "size": 32026,
                          "date_created": "2026-01-21T15:08:11.025264Z"
                        }
                      ]
                    },
                    "summary": "Invoice PDF"
                  }
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "InvoiceNotFound": {
                    "value": {
                      "detail": [
                        "Not found."
                      ]
                    },
                    "summary": "Invoice not found"
                  }
                }
              }
            },
            "description": "The Invoice is not in the Company that `company` names."
          }
        }
      },
      "post": {
        "operationId": "invoice_pdf_create",
        "description": "Upload an Invoice PDF. The uploaded PDF will overwrite the PDF coming from any\nother source. The allowed extensions are: pdf, jpg, jpeg, png.\n\nSend the file as `multipart/form-data`, in the field `file`. The content of\nthe file must match its extension, and the file must not be larger than the\nupload size limit. Otherwise the request returns 400. In the response, `name`\nis the file name without the extension, and `size` is the size in bytes.\n\nAn Invoice can have one file. If the Invoice already has one (an upload, or a\ncopy of the PDF from the accounting system), the request returns 400. Delete\nthe file first.\n\nWhen the Invoice ID in the URL is the source ID, pass `?id_from=source` and the\nUUID of the Company in `?company=`. An Invoice ID that does not exist returns 403.\nAn Invoice of a Customer outside the portfolios of the user returns 403.",
        "summary": "Upload Invoice PDF",
        "parameters": [
          {
            "in": "query",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company of the Invoice. You must send it when `id_from=source`. If you send it with a Kolleno ID, the Invoice must belong to this Company, else the request returns 404."
          },
          {
            "in": "query",
            "name": "id_from",
            "schema": {
              "type": "string",
              "enum": [
                "source"
              ]
            },
            "description": "Send `source` when the identifier in the URL is the source ID of the record and not the Kolleno ID."
          },
          {
            "in": "path",
            "name": "invoice",
            "schema": {
              "type": "string"
            },
            "description": "ID of the Invoice. It is the source ID when `id_from=source`.",
            "required": true
          }
        ],
        "tags": [
          "Invoice PDF"
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The file to upload. It must be one of: pdf, jpg, jpeg, png."
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoicePdf"
                },
                "examples": {
                  "InvoicePDF": {
                    "value": {
                      "id": "82c49967-8e95-4afa-b1d4-80e162cc4f41",
                      "invoice": "a3f73037-33bf-4139-8e75-0da72b9d1e33",
                      "name": "Invoice",
                      "extension": "pdf",
                      "size": 32026,
                      "date_created": "2026-01-21T15:08:11.025264Z"
                    },
                    "summary": "Invoice PDF"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "InvoiceAlreadyHasAPDF": {
                    "value": {
                      "non_field_errors": [
                        "This invoice already has a PDF. Please delete it before uploading a new one."
                      ]
                    },
                    "summary": "Invoice already has a PDF"
                  },
                  "NoFile": {
                    "value": {
                      "file": [
                        "This field is mandatory."
                      ]
                    },
                    "summary": "No file"
                  },
                  "ExtensionNotAllowed": {
                    "value": {
                      "file": [
                        "Allowed file extensions are: ('pdf', 'jpg', 'jpeg', 'png')"
                      ]
                    },
                    "summary": "Extension not allowed"
                  },
                  "ContentDoesNotMatchTheExtension": {
                    "value": {
                      "file": [
                        "Invalid file type: expected application/pdf, got text/plain"
                      ]
                    },
                    "summary": "Content does not match the extension"
                  }
                }
              }
            },
            "description": "The file is missing, not allowed or too large, its content does not match its extension, or the Invoice already has a file."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "InvoiceNotFound": {
                    "value": {
                      "detail": [
                        "Not found."
                      ]
                    },
                    "summary": "Invoice not found"
                  }
                }
              }
            },
            "description": "The Invoice is not in the Company that `company` names."
          }
        }
      }
    },
    "/v1/invoice-pdf/{invoice}/{id}/": {
      "delete": {
        "operationId": "invoice_pdf_destroy",
        "description": "Permanently delete a specific PDF. You can only delete the PDF if the Invoice it\nrefers to has its `source` equal to one of: `manual`, `kolleno_api`, `csv`. Any\nother source returns 400.\n\nWhen the Invoice ID in the URL is the source ID, pass `?id_from=source` and the\nUUID of the Company in `?company=`. An Invoice ID that does not exist returns 403.\nAn Invoice of a Customer outside the portfolios of the user returns 403.",
        "summary": "Delete Invoice PDF",
        "parameters": [
          {
            "in": "query",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company of the Invoice. You must send it when `id_from=source`. If you send it with a Kolleno ID, the Invoice must belong to this Company, else the request returns 404."
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the PDF to delete.",
            "required": true
          },
          {
            "in": "query",
            "name": "id_from",
            "schema": {
              "type": "string",
              "enum": [
                "source"
              ]
            },
            "description": "Send `source` when the identifier in the URL is the source ID of the record and not the Kolleno ID."
          },
          {
            "in": "path",
            "name": "invoice",
            "schema": {
              "type": "string"
            },
            "description": "ID of the Invoice. It is the source ID when `id_from=source`.",
            "required": true
          }
        ],
        "tags": [
          "Invoice PDF"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "ImportedInvoice": {
                    "value": {
                      "non_field_errors": [
                        "Invoice imported from external source cannot have a PDF deleted."
                      ]
                    },
                    "summary": "Imported Invoice"
                  }
                }
              }
            },
            "description": "The `source` of the Invoice is not `manual`, `kolleno_api` or `csv`."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "PDFNotFound": {
                    "value": {
                      "detail": "No InvoicePdf matches the given query."
                    },
                    "summary": "PDF not found"
                  }
                }
              }
            },
            "description": "The PDF does not exist or belongs to another Invoice, or the Invoice is not in the Company that `company` names."
          }
        }
      }
    },
    "/v1/invoice/{company}/": {
      "get": {
        "operationId": "invoice_list",
        "description": "Retrieve all the Invoices in a given Company. Ordered by `date_created`. If the\nCompany uses portfolios, the list holds only the Invoices of the Customers in the\nportfolios of the user.\n\nTo get only the Invoices that changed since your last sync, use `date_modified__gte`.",
        "summary": "List Invoices",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "query",
            "name": "customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Filter to get only a specific Customer's Invoices. A Customer UUID that does not exist returns 400."
          },
          {
            "in": "query",
            "name": "date_modified__gte",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "To get all the Invoices modified at or after an ISO 8601 datetime."
          },
          {
            "in": "query",
            "name": "external_id",
            "schema": {
              "type": "string"
            },
            "description": "Filter by the legacy `external_id`. Use `source_id`."
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            },
            "description": "The maximum number of items in the page. The default is 200."
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer"
            },
            "description": "The position of the first item of the page in the full list. The default is 0."
          },
          {
            "in": "query",
            "name": "payment_status",
            "schema": {
              "type": "string",
              "enum": [
                "bad_debt",
                "closed",
                "credited",
                "dispute",
                "draft",
                "hold_back",
                "installments",
                "open",
                "paid",
                "paid_pending_confirmation",
                "partially_paid",
                "payment_scheduled"
              ]
            },
            "description": "Filter to get only the Invoices with a specific `payment_status`. An unknown value returns 400."
          },
          {
            "in": "query",
            "name": "payment_status__in",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "paid",
                  "partially_paid",
                  "paid_pending_confirmation",
                  "payment_scheduled",
                  "installments",
                  "open",
                  "dispute",
                  "draft",
                  "closed",
                  "hold_back",
                  "bad_debt",
                  "credited"
                ]
              }
            },
            "description": "Filter to get only the Invoices with one of a list of `payment_status` (comma separated, lowercase, no spaces). An unknown value returns 400.",
            "explode": false,
            "style": "form"
          },
          {
            "in": "query",
            "name": "source_id",
            "schema": {
              "type": "string"
            },
            "description": "Filter to get only a specific `source_id`."
          }
        ],
        "tags": [
          "Invoice"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedInvoiceList"
                },
                "examples": {
                  "Invoice": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "id": "a3f73037-33bf-4139-8e75-0da72b9d1e33",
                          "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                          "amount": "330.20",
                          "balance": "115.73",
                          "currency": "USD",
                          "ref": "INV-0038",
                          "description": "Monthly fee",
                          "payment_status": "open",
                          "date_invoice": "2026-09-14",
                          "date_due": "2026-10-15",
                          "date_promise_to_pay_valid": null,
                          "pause_chasing": false,
                          "extra_data": {
                            "mykey": "myval",
                            "somelist": [
                              1,
                              2,
                              3
                            ]
                          },
                          "persons": [
                            "a7ac6c0e-af42-49d4-becf-8d5a85d0431c",
                            "6228d9e8-c86f-4dc1-a2de-a9f10c5e3e70"
                          ],
                          "tags": [
                            {
                              "id": "32fd143d-e5fc-4be5-a8f2-e4756e92edcf",
                              "name": "Disputed",
                              "color": "FF0000",
                              "description": "The customer raised a dispute",
                              "tag_category": {
                                "id": "5b10714b-66d0-4db4-b8bb-5bf0207fd5f9",
                                "name": "Collections"
                              }
                            }
                          ],
                          "source": "kolleno_api",
                          "source_id": "my_company_ref",
                          "date_modified": "2026-09-14T12:53:55.615229Z",
                          "date_created": "2026-09-14T12:53:55.615242Z"
                        }
                      ]
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "UnknownPaymentStatus": {
                    "value": {
                      "payment_status__in": [
                        "Select a valid choice. wrongvalue is not one of the available choices."
                      ]
                    },
                    "summary": "Unknown payment status"
                  }
                }
              }
            },
            "description": "A filter has a value that is not valid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      },
      "post": {
        "operationId": "invoice_create",
        "description": "Create an Invoice. It will set the field `source` to `kolleno_api` automatically.\n\nThe `customer` is the UUID of the Customer of the Invoice. The Customer has to\nbelong to the Company of the URL, and to the portfolios of the user. Otherwise\nthe request returns 400.\n\nA request with `pause_chasing` set to `true` needs the access to change the\nchasing status. Without it, the request returns 403.\n\n**Fields**\n\n- On create and on PUT, `customer` (UUID) and `currency` are required. All the\n  other fields are optional.\n- `amount` is the total amount of the Invoice, and `balance` is the remaining balance\n  to be paid. Each is a string or a number with up to 2 decimals. The default is `0.00`.\n- `currency` is the ISO code of the currency, for example `USD`. An unknown code\n  returns 400.\n- `ref` is the reference of the Invoice, and `description` is a description. Each is\n  a string of up to 255 characters, and cannot be null.\n- `payment_status` is one of: `paid`, `partially_paid`, `paid_pending_confirmation`, `payment_scheduled`, `installments`, `open`, `dispute`, `draft`, `closed`, `hold_back`, `bad_debt`, `credited`. The default is `open`.\n- `date_invoice` and `date_due` have the format YYYY-MM-DD, and can be null.\n- `pause_chasing` is a boolean. The default is `false`.\n- `persons` is a list of Person UUIDs assigned to the Invoice. Each Person has to\n  belong to the Company of the Invoice, else the request returns 400.\n- `extra_data` is a JSON object with any data that you want to keep with the Invoice.\n  Any other JSON type, or null, returns 400.\n- `source_id` is the ID in your system, so you can keep track of the Invoice. A\n  `source_id` that is not empty must be unique among the Invoices of the Company\n  with the same `source`. On create, a duplicate returns 400.\n- `source`, `date_promise_to_pay_valid`, `date_created` and `date_modified` are\n  read-only.\n\n**tags**\n\n`tags` is a list of Tag UUIDs (see the Tag endpoints). The list replaces all the tags\nof the Invoice, and an empty list `[]` removes all the tags. If you do not send `tags`,\nthe tags do not change. The Tags have to belong to the same Company as the Invoice.\nA Tag of another Company, or a deleted Tag, returns 400 with a list of messages as\nthe body: `[\"One or more tags were not found.\"]`.",
        "summary": "Create Invoice",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          }
        ],
        "tags": [
          "Invoice"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceRequest"
              },
              "examples": {
                "Invoice": {
                  "value": {
                    "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                    "amount": "330.20",
                    "balance": "115.73",
                    "currency": "USD",
                    "ref": "INV-0038",
                    "description": "Monthly fee",
                    "payment_status": "open",
                    "date_invoice": "2026-09-14",
                    "date_due": "2026-10-15",
                    "pause_chasing": false,
                    "persons": [
                      "a7ac6c0e-af42-49d4-becf-8d5a85d0431c",
                      "6228d9e8-c86f-4dc1-a2de-a9f10c5e3e70"
                    ],
                    "tags": [
                      "32fd143d-e5fc-4be5-a8f2-e4756e92edcf"
                    ],
                    "extra_data": {
                      "mykey": "myval",
                      "somelist": [
                        1,
                        2,
                        3
                      ]
                    },
                    "source_id": "my_company_ref"
                  }
                }
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                },
                "examples": {
                  "Invoice": {
                    "value": {
                      "id": "a3f73037-33bf-4139-8e75-0da72b9d1e33",
                      "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                      "amount": "330.20",
                      "balance": "115.73",
                      "currency": "USD",
                      "ref": "INV-0038",
                      "description": "Monthly fee",
                      "payment_status": "open",
                      "date_invoice": "2026-09-14",
                      "date_due": "2026-10-15",
                      "date_promise_to_pay_valid": null,
                      "pause_chasing": false,
                      "extra_data": {
                        "mykey": "myval",
                        "somelist": [
                          1,
                          2,
                          3
                        ]
                      },
                      "persons": [
                        "a7ac6c0e-af42-49d4-becf-8d5a85d0431c",
                        "6228d9e8-c86f-4dc1-a2de-a9f10c5e3e70"
                      ],
                      "tags": [
                        {
                          "id": "32fd143d-e5fc-4be5-a8f2-e4756e92edcf",
                          "name": "Disputed",
                          "color": "FF0000",
                          "description": "The customer raised a dispute",
                          "tag_category": {
                            "id": "5b10714b-66d0-4db4-b8bb-5bf0207fd5f9",
                            "name": "Collections"
                          }
                        }
                      ],
                      "source": "kolleno_api",
                      "source_id": "my_company_ref",
                      "date_modified": "2026-09-14T12:53:55.615229Z",
                      "date_created": "2026-09-14T12:53:55.615242Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                      "additionalProperties": {}
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "A list of messages for an error that no field owns."
                    }
                  ]
                },
                "examples": {
                  "UnknownCustomer": {
                    "value": {
                      "customer": [
                        "This customer could not be found for the given company."
                      ]
                    },
                    "summary": "Unknown customer"
                  },
                  "UnknownCurrency": {
                    "value": {
                      "currency": [
                        "'ZZZ' is not a valid ISO."
                      ]
                    },
                    "summary": "Unknown currency"
                  },
                  "DuplicateSourceId": {
                    "value": {
                      "source_id": [
                        "There is an integrity error as this source_id already exists."
                      ]
                    },
                    "summary": "Duplicate source_id"
                  },
                  "TagNotFound": {
                    "value": [
                      "One or more tags were not found."
                    ],
                    "summary": "Tag not found"
                  }
                }
              }
            },
            "description": "A value of the request is not valid. The `customer` is missing, or is not a Customer of the Company of the URL and of the portfolios of the user."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      }
    },
    "/v1/invoice/{company}/{id}/": {
      "get": {
        "operationId": "invoice_retrieve",
        "description": "Retrieve a specific Invoice.\n\nAn Invoice ID that does not exist returns 403. An Invoice of a Customer outside the\nportfolios of the user returns 404.",
        "summary": "Retrieve Invoice",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Invoice.",
            "required": true
          }
        ],
        "tags": [
          "Invoice"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                },
                "examples": {
                  "Invoice": {
                    "value": {
                      "id": "a3f73037-33bf-4139-8e75-0da72b9d1e33",
                      "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                      "amount": "330.20",
                      "balance": "115.73",
                      "currency": "USD",
                      "ref": "INV-0038",
                      "description": "Monthly fee",
                      "payment_status": "open",
                      "date_invoice": "2026-09-14",
                      "date_due": "2026-10-15",
                      "date_promise_to_pay_valid": null,
                      "pause_chasing": false,
                      "extra_data": {
                        "mykey": "myval",
                        "somelist": [
                          1,
                          2,
                          3
                        ]
                      },
                      "persons": [
                        "a7ac6c0e-af42-49d4-becf-8d5a85d0431c",
                        "6228d9e8-c86f-4dc1-a2de-a9f10c5e3e70"
                      ],
                      "tags": [
                        {
                          "id": "32fd143d-e5fc-4be5-a8f2-e4756e92edcf",
                          "name": "Disputed",
                          "color": "FF0000",
                          "description": "The customer raised a dispute",
                          "tag_category": {
                            "id": "5b10714b-66d0-4db4-b8bb-5bf0207fd5f9",
                            "name": "Collections"
                          }
                        }
                      ],
                      "source": "kolleno_api",
                      "source_id": "my_company_ref",
                      "date_modified": "2026-09-14T12:53:55.615229Z",
                      "date_created": "2026-09-14T12:53:55.615242Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "InvoiceNotFound": {
                    "value": {
                      "detail": "No Invoice matches the given query."
                    },
                    "summary": "Invoice not found"
                  }
                }
              }
            },
            "description": "The Invoice is not in the Company of the URL, or its Customer is outside the portfolios of the user."
          }
        }
      },
      "put": {
        "operationId": "invoice_update",
        "description": "Update a specific Invoice. A PUT request must send the fields that are required.\n\nYou can edit all the fields of an Invoice if `source` equals one of: `manual`,\n`kolleno_api`, `csv`. Otherwise, you can only update the fields `pause_chasing`,\n`extra_data` and `tags`. Any other field of such an Invoice returns 400. A PUT\nrequest must send `customer` and `currency`, so a PUT on such an Invoice always\nreturns 400: use PATCH.\n\nA request that sends `pause_chasing` needs the access to change the chasing status.\nWithout it, the request returns 403.\n\nThe Invoice keeps its Customer. A `customer` in the body must be a Customer of the\nCompany of the URL, else the request returns 400, but the value is not used. To move\nan Invoice to another Customer, delete the Invoice and create it again.\n\nWhen you send `persons`, the list replaces the Persons of the Invoice. An empty list\n`[]` does not change the Persons.\n\nAn Invoice ID that does not exist returns 403. An Invoice of a Customer outside the\nportfolios of the user returns 404.\n\n**Fields**\n\n- On create and on PUT, `customer` (UUID) and `currency` are required. All the\n  other fields are optional.\n- `amount` is the total amount of the Invoice, and `balance` is the remaining balance\n  to be paid. Each is a string or a number with up to 2 decimals. The default is `0.00`.\n- `currency` is the ISO code of the currency, for example `USD`. An unknown code\n  returns 400.\n- `ref` is the reference of the Invoice, and `description` is a description. Each is\n  a string of up to 255 characters, and cannot be null.\n- `payment_status` is one of: `paid`, `partially_paid`, `paid_pending_confirmation`, `payment_scheduled`, `installments`, `open`, `dispute`, `draft`, `closed`, `hold_back`, `bad_debt`, `credited`. The default is `open`.\n- `date_invoice` and `date_due` have the format YYYY-MM-DD, and can be null.\n- `pause_chasing` is a boolean. The default is `false`.\n- `persons` is a list of Person UUIDs assigned to the Invoice. Each Person has to\n  belong to the Company of the Invoice, else the request returns 400.\n- `extra_data` is a JSON object with any data that you want to keep with the Invoice.\n  Any other JSON type, or null, returns 400.\n- `source_id` is the ID in your system, so you can keep track of the Invoice. A\n  `source_id` that is not empty must be unique among the Invoices of the Company\n  with the same `source`. On create, a duplicate returns 400.\n- `source`, `date_promise_to_pay_valid`, `date_created` and `date_modified` are\n  read-only.\n\n**tags**\n\n`tags` is a list of Tag UUIDs (see the Tag endpoints). The list replaces all the tags\nof the Invoice, and an empty list `[]` removes all the tags. If you do not send `tags`,\nthe tags do not change. The Tags have to belong to the same Company as the Invoice.\nA Tag of another Company, or a deleted Tag, returns 400 with a list of messages as\nthe body: `[\"One or more tags were not found.\"]`.",
        "summary": "Replace Invoice",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Invoice.",
            "required": true
          }
        ],
        "tags": [
          "Invoice"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceRequest"
              },
              "examples": {
                "Invoice": {
                  "value": {
                    "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                    "amount": "330.20",
                    "balance": "115.73",
                    "currency": "USD",
                    "ref": "INV-0038",
                    "description": "Monthly fee",
                    "payment_status": "open",
                    "date_invoice": "2026-09-14",
                    "date_due": "2026-10-15",
                    "pause_chasing": false,
                    "persons": [
                      "a7ac6c0e-af42-49d4-becf-8d5a85d0431c",
                      "6228d9e8-c86f-4dc1-a2de-a9f10c5e3e70"
                    ],
                    "tags": [
                      "32fd143d-e5fc-4be5-a8f2-e4756e92edcf"
                    ],
                    "extra_data": {
                      "mykey": "myval",
                      "somelist": [
                        1,
                        2,
                        3
                      ]
                    },
                    "source_id": "my_company_ref"
                  }
                }
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                },
                "examples": {
                  "Invoice": {
                    "value": {
                      "id": "a3f73037-33bf-4139-8e75-0da72b9d1e33",
                      "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                      "amount": "330.20",
                      "balance": "115.73",
                      "currency": "USD",
                      "ref": "INV-0038",
                      "description": "Monthly fee",
                      "payment_status": "open",
                      "date_invoice": "2026-09-14",
                      "date_due": "2026-10-15",
                      "date_promise_to_pay_valid": null,
                      "pause_chasing": false,
                      "extra_data": {
                        "mykey": "myval",
                        "somelist": [
                          1,
                          2,
                          3
                        ]
                      },
                      "persons": [
                        "a7ac6c0e-af42-49d4-becf-8d5a85d0431c",
                        "6228d9e8-c86f-4dc1-a2de-a9f10c5e3e70"
                      ],
                      "tags": [
                        {
                          "id": "32fd143d-e5fc-4be5-a8f2-e4756e92edcf",
                          "name": "Disputed",
                          "color": "FF0000",
                          "description": "The customer raised a dispute",
                          "tag_category": {
                            "id": "5b10714b-66d0-4db4-b8bb-5bf0207fd5f9",
                            "name": "Collections"
                          }
                        }
                      ],
                      "source": "kolleno_api",
                      "source_id": "my_company_ref",
                      "date_modified": "2026-09-14T12:53:55.615229Z",
                      "date_created": "2026-09-14T12:53:55.615242Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                      "additionalProperties": {}
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "A list of messages for an error that no field owns."
                    }
                  ]
                },
                "examples": {
                  "FieldNotAllowedForTheSource": {
                    "value": {
                      "non_field_errors": [
                        "Only 'extra_data', 'pause_chasing', 'tags' fields can be updated for invoices imported from external sources. Attempted to update: ref"
                      ]
                    },
                    "summary": "Field not allowed for the source"
                  },
                  "RequiredField": {
                    "value": {
                      "customer": [
                        "This field is required."
                      ]
                    },
                    "summary": "Required field"
                  },
                  "UnknownCurrency": {
                    "value": {
                      "currency": [
                        "'ZZZ' is not a valid ISO."
                      ]
                    },
                    "summary": "Unknown currency"
                  },
                  "TagNotFound": {
                    "value": [
                      "One or more tags were not found."
                    ],
                    "summary": "Tag not found"
                  }
                }
              }
            },
            "description": "A value of the request is not valid, or the request changes a field that the `source` of the Invoice does not allow."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "InvoiceNotFound": {
                    "value": {
                      "detail": "No Invoice matches the given query."
                    },
                    "summary": "Invoice not found"
                  }
                }
              }
            },
            "description": "The Invoice is not in the Company of the URL, or its Customer is outside the portfolios of the user."
          }
        }
      },
      "patch": {
        "operationId": "invoice_partial_update",
        "description": "Update details about a specific Invoice. Send only the fields to change.\n\nYou can edit all the fields of an Invoice if `source` equals one of: `manual`,\n`kolleno_api`, `csv`. Otherwise, you can only update the fields `pause_chasing`,\n`extra_data` and `tags`. Any other field of such an Invoice returns 400. A PUT\nrequest must send `customer` and `currency`, so a PUT on such an Invoice always\nreturns 400: use PATCH.\n\nA request that sends `pause_chasing` needs the access to change the chasing status.\nWithout it, the request returns 403.\n\nThe Invoice keeps its Customer. A `customer` in the body must be a Customer of the\nCompany of the URL, else the request returns 400, but the value is not used. To move\nan Invoice to another Customer, delete the Invoice and create it again.\n\nWhen you send `persons`, the list replaces the Persons of the Invoice. An empty list\n`[]` does not change the Persons.\n\nAn Invoice ID that does not exist returns 403. An Invoice of a Customer outside the\nportfolios of the user returns 404.\n\n**Fields**\n\n- On create and on PUT, `customer` (UUID) and `currency` are required. All the\n  other fields are optional.\n- `amount` is the total amount of the Invoice, and `balance` is the remaining balance\n  to be paid. Each is a string or a number with up to 2 decimals. The default is `0.00`.\n- `currency` is the ISO code of the currency, for example `USD`. An unknown code\n  returns 400.\n- `ref` is the reference of the Invoice, and `description` is a description. Each is\n  a string of up to 255 characters, and cannot be null.\n- `payment_status` is one of: `paid`, `partially_paid`, `paid_pending_confirmation`, `payment_scheduled`, `installments`, `open`, `dispute`, `draft`, `closed`, `hold_back`, `bad_debt`, `credited`. The default is `open`.\n- `date_invoice` and `date_due` have the format YYYY-MM-DD, and can be null.\n- `pause_chasing` is a boolean. The default is `false`.\n- `persons` is a list of Person UUIDs assigned to the Invoice. Each Person has to\n  belong to the Company of the Invoice, else the request returns 400.\n- `extra_data` is a JSON object with any data that you want to keep with the Invoice.\n  Any other JSON type, or null, returns 400.\n- `source_id` is the ID in your system, so you can keep track of the Invoice. A\n  `source_id` that is not empty must be unique among the Invoices of the Company\n  with the same `source`. On create, a duplicate returns 400.\n- `source`, `date_promise_to_pay_valid`, `date_created` and `date_modified` are\n  read-only.\n\n**tags**\n\n`tags` is a list of Tag UUIDs (see the Tag endpoints). The list replaces all the tags\nof the Invoice, and an empty list `[]` removes all the tags. If you do not send `tags`,\nthe tags do not change. The Tags have to belong to the same Company as the Invoice.\nA Tag of another Company, or a deleted Tag, returns 400 with a list of messages as\nthe body: `[\"One or more tags were not found.\"]`.",
        "summary": "Update Invoice",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Invoice.",
            "required": true
          }
        ],
        "tags": [
          "Invoice"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedInvoiceRequest"
              },
              "examples": {
                "PauseChasingAndSetTags": {
                  "value": {
                    "pause_chasing": true,
                    "tags": [
                      "32fd143d-e5fc-4be5-a8f2-e4756e92edcf"
                    ]
                  },
                  "summary": "Pause chasing and set tags"
                }
              }
            }
          }
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                },
                "examples": {
                  "Invoice": {
                    "value": {
                      "id": "a3f73037-33bf-4139-8e75-0da72b9d1e33",
                      "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                      "amount": "330.20",
                      "balance": "115.73",
                      "currency": "USD",
                      "ref": "INV-0038",
                      "description": "Monthly fee",
                      "payment_status": "open",
                      "date_invoice": "2026-09-14",
                      "date_due": "2026-10-15",
                      "date_promise_to_pay_valid": null,
                      "pause_chasing": false,
                      "extra_data": {
                        "mykey": "myval",
                        "somelist": [
                          1,
                          2,
                          3
                        ]
                      },
                      "persons": [
                        "a7ac6c0e-af42-49d4-becf-8d5a85d0431c",
                        "6228d9e8-c86f-4dc1-a2de-a9f10c5e3e70"
                      ],
                      "tags": [
                        {
                          "id": "32fd143d-e5fc-4be5-a8f2-e4756e92edcf",
                          "name": "Disputed",
                          "color": "FF0000",
                          "description": "The customer raised a dispute",
                          "tag_category": {
                            "id": "5b10714b-66d0-4db4-b8bb-5bf0207fd5f9",
                            "name": "Collections"
                          }
                        }
                      ],
                      "source": "kolleno_api",
                      "source_id": "my_company_ref",
                      "date_modified": "2026-09-14T12:53:55.615229Z",
                      "date_created": "2026-09-14T12:53:55.615242Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                      "additionalProperties": {}
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "A list of messages for an error that no field owns."
                    }
                  ]
                },
                "examples": {
                  "FieldNotAllowedForTheSource": {
                    "value": {
                      "non_field_errors": [
                        "Only 'extra_data', 'pause_chasing', 'tags' fields can be updated for invoices imported from external sources. Attempted to update: ref"
                      ]
                    },
                    "summary": "Field not allowed for the source"
                  },
                  "RequiredField": {
                    "value": {
                      "customer": [
                        "This field is required."
                      ]
                    },
                    "summary": "Required field"
                  },
                  "UnknownCurrency": {
                    "value": {
                      "currency": [
                        "'ZZZ' is not a valid ISO."
                      ]
                    },
                    "summary": "Unknown currency"
                  },
                  "TagNotFound": {
                    "value": [
                      "One or more tags were not found."
                    ],
                    "summary": "Tag not found"
                  }
                }
              }
            },
            "description": "A value of the request is not valid, or the request changes a field that the `source` of the Invoice does not allow."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "InvoiceNotFound": {
                    "value": {
                      "detail": "No Invoice matches the given query."
                    },
                    "summary": "Invoice not found"
                  }
                }
              }
            },
            "description": "The Invoice is not in the Company of the URL, or its Customer is outside the portfolios of the user."
          }
        }
      },
      "delete": {
        "operationId": "invoice_destroy",
        "description": "Permanently delete a specific Invoice. You can only delete Invoices if `source`\nequals one of: `manual`, `kolleno_api`, `csv`. Any other source returns 400.\n\nAn Invoice ID that does not exist returns 403. An Invoice of a Customer outside the\nportfolios of the user returns 404.",
        "summary": "Delete Invoice",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Invoice.",
            "required": true
          }
        ],
        "tags": [
          "Invoice"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "ImportedInvoice": {
                    "value": {
                      "non_field_errors": [
                        "Invoice imported from external source cannot be deleted."
                      ]
                    },
                    "summary": "Imported Invoice"
                  }
                }
              }
            },
            "description": "The `source` of the Invoice is not `manual`, `kolleno_api` or `csv`."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "InvoiceNotFound": {
                    "value": {
                      "detail": "No Invoice matches the given query."
                    },
                    "summary": "Invoice not found"
                  }
                }
              }
            },
            "description": "The Invoice is not in the Company of the URL, or its Customer is outside the portfolios of the user."
          }
        }
      }
    },
    "/v1/invoice/custom-fields/{company}/{invoice}/": {
      "put": {
        "operationId": "invoice_custom_fields_update",
        "description": "Create or update the values of the Custom Fields of an Invoice. The keys of the body\nare the `field_name` of the Custom Fields, and the values are the values to set.\nOne request updates all the fields, or none if a value is not valid.\n\nPUT and PATCH do the same thing: they change only the fields in the body, and the\nother Custom Fields keep their values. The body must hold at least one field. Each\nfield must be a Custom Field of the Invoices of the Company, else the request\nreturns 400. The response holds the saved values: a decimal field is a number, and\nthe other fields hold the value that you sent.\n\nThe Invoice can be identified by its UUID in the URL, or by its `source_id` in the\nURL with the `source` query parameter. An Invoice that does not exist, or whose\nCustomer is outside the portfolios of the user, returns 403.\n\nSee: [Add custom fields to your Kolleno Customers](https://help.kolleno.com/en/articles/11660969-add-custom-fields-to-your-kolleno-customers) (the same\nconfiguration mechanism is used for invoice-scoped custom fields).\n\nIf you are unsure about the fields API names, please reach out to support.",
        "summary": "Replace Custom Fields of an Invoice",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "invoice",
            "schema": {
              "type": "string"
            },
            "description": "The Invoice to update: its Kolleno UUID, or its `source_id` from your ERP with the `source` query parameter.",
            "required": true
          },
          {
            "in": "query",
            "name": "source",
            "schema": {
              "type": "string"
            },
            "description": "Send it when the identifier in the URL is the `source_id` of the record, from the system that the record comes from, for example `netsuite`."
          }
        ],
        "tags": [
          "Invoice Custom Fields"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "examples": {
                "CustomFields": {
                  "value": {
                    "invoice_priority": "high",
                    "approved_amount": 10.12
                  },
                  "summary": "Custom Fields"
                }
              }
            }
          }
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "examples": {
                  "CustomFields": {
                    "value": {
                      "invoice_priority": "high",
                      "approved_amount": 10.12
                    },
                    "summary": "Custom Fields"
                  }
                }
              }
            },
            "description": "The values that were saved."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "UnknownField": {
                    "value": {
                      "po_number": [
                        "Custom field with field_name 'po_number' not found for this company."
                      ]
                    },
                    "summary": "Unknown field"
                  },
                  "ValueNotValid": {
                    "value": {
                      "approved_amount": [
                        "'approved_amount' must be a decimal."
                      ]
                    },
                    "summary": "Value not valid"
                  },
                  "EmptyBody": {
                    "value": {
                      "non_field_errors": [
                        "At least one custom field must be provided."
                      ]
                    },
                    "summary": "Empty body"
                  }
                }
              }
            },
            "description": "The body is empty or is not an object, a field is not a Custom Field of the Invoices of the Company, or a value is not valid for its field."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "InvoiceNotFound": {
                    "value": {
                      "detail": "No Invoice matches the given query."
                    },
                    "summary": "Invoice not found"
                  }
                }
              }
            },
            "description": "The Invoice is not in the Company of the URL."
          }
        }
      },
      "patch": {
        "operationId": "invoice_custom_fields_partial_update",
        "description": "Create or update the values of the Custom Fields of an Invoice. The keys of the body\nare the `field_name` of the Custom Fields, and the values are the values to set.\nOne request updates all the fields, or none if a value is not valid.\n\nPUT and PATCH do the same thing: they change only the fields in the body, and the\nother Custom Fields keep their values. The body must hold at least one field. Each\nfield must be a Custom Field of the Invoices of the Company, else the request\nreturns 400. The response holds the saved values: a decimal field is a number, and\nthe other fields hold the value that you sent.\n\nThe Invoice can be identified by its UUID in the URL, or by its `source_id` in the\nURL with the `source` query parameter. An Invoice that does not exist, or whose\nCustomer is outside the portfolios of the user, returns 403.\n\nSee: [Add custom fields to your Kolleno Customers](https://help.kolleno.com/en/articles/11660969-add-custom-fields-to-your-kolleno-customers) (the same\nconfiguration mechanism is used for invoice-scoped custom fields).\n\nIf you are unsure about the fields API names, please reach out to support.",
        "summary": "Update Custom Fields of an Invoice",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "invoice",
            "schema": {
              "type": "string"
            },
            "description": "The Invoice to update: its Kolleno UUID, or its `source_id` from your ERP with the `source` query parameter.",
            "required": true
          },
          {
            "in": "query",
            "name": "source",
            "schema": {
              "type": "string"
            },
            "description": "Send it when the identifier in the URL is the `source_id` of the record, from the system that the record comes from, for example `netsuite`."
          }
        ],
        "tags": [
          "Invoice Custom Fields"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "examples": {
                "CustomFields": {
                  "value": {
                    "invoice_priority": "high",
                    "approved_amount": 10.12
                  },
                  "summary": "Custom Fields"
                }
              }
            }
          }
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "examples": {
                  "CustomFields": {
                    "value": {
                      "invoice_priority": "high",
                      "approved_amount": 10.12
                    },
                    "summary": "Custom Fields"
                  }
                }
              }
            },
            "description": "The values that were saved."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "UnknownField": {
                    "value": {
                      "po_number": [
                        "Custom field with field_name 'po_number' not found for this company."
                      ]
                    },
                    "summary": "Unknown field"
                  },
                  "ValueNotValid": {
                    "value": {
                      "approved_amount": [
                        "'approved_amount' must be a decimal."
                      ]
                    },
                    "summary": "Value not valid"
                  },
                  "EmptyBody": {
                    "value": {
                      "non_field_errors": [
                        "At least one custom field must be provided."
                      ]
                    },
                    "summary": "Empty body"
                  }
                }
              }
            },
            "description": "The body is empty or is not an object, a field is not a Custom Field of the Invoices of the Company, or a value is not valid for its field."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "InvoiceNotFound": {
                    "value": {
                      "detail": "No Invoice matches the given query."
                    },
                    "summary": "Invoice not found"
                  }
                }
              }
            },
            "description": "The Invoice is not in the Company of the URL."
          }
        }
      }
    },
    "/v1/invoice/pdf/{company}/{invoice}/": {
      "get": {
        "operationId": "invoice_pdf_retrieve",
        "description": "Download the PDF of an Invoice, from any source. The response is `application/pdf`,\nor `application/zip` when the accounting system gives the PDF with its\nattachments. The file name is in the `Content-Disposition` header.\n\nThe identifier in the URL is the Kolleno ID of the Invoice. Pass `?id_from=source`\nwhen it is the source ID.\n\nReturns 404 when the Invoice does not exist, its Customer is outside the\nportfolios of the user, or it has no PDF. Returns 400 when the PDF is not ready\nyet, or cannot be retrieved. Returns 503 when the accounting system cannot give\nthe PDF now.",
        "summary": "Download Invoice PDF",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "query",
            "name": "id_from",
            "schema": {
              "type": "string",
              "enum": [
                "source"
              ]
            },
            "description": "Send `source` when the identifier in the URL is the source ID of the record and not the Kolleno ID."
          },
          {
            "in": "path",
            "name": "invoice",
            "schema": {
              "type": "string"
            },
            "description": "ID of the Invoice. It is the source ID when `id_from=source`.",
            "required": true
          }
        ],
        "tags": [
          "Invoice PDF"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            },
            "description": "The PDF file, or a ZIP file with the PDF and its attachments."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "PDFNotReady": {
                    "value": {
                      "non_field_errors": [
                        "The PDF will be available soon. Please try again later."
                      ]
                    },
                    "summary": "PDF not ready"
                  }
                }
              }
            },
            "description": "The PDF is not available yet, or cannot be retrieved."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                }
              }
            },
            "description": "The Invoice does not exist, or has no PDF."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                }
              }
            },
            "description": "The accounting system cannot give the PDF now."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      }
    },
    "/v1/match/{company}/": {
      "get": {
        "operationId": "match_list",
        "description": "Retrieve all the Matches in a given Company. Ordered by `date_created`.\n\nReturns **403** if the user the API Key belongs to does not have reconciliation access.",
        "summary": "List Matches",
        "parameters": [
          {
            "in": "query",
            "name": "account",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Filter to get only the Matches of this Account (UUID). An id that does not exist returns 400."
          },
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "query",
            "name": "date_modified",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "To get all records modified at exactly this timestamp."
          },
          {
            "in": "query",
            "name": "date_modified__gte",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "To get all records modified at or after a timestamp."
          },
          {
            "in": "query",
            "name": "date_modified__lte",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "To get all records modified at or before a timestamp."
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            },
            "description": "The maximum number of items in the page. The default is 200."
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer"
            },
            "description": "The position of the first item of the page in the full list. The default is 0."
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string",
              "enum": [
                "confirmed",
                "matched",
                "reconciled",
                "sync_incomplete"
              ]
            },
            "description": "Filter to get only the Matches with this status."
          }
        ],
        "tags": [
          "Match"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedMatchList"
                },
                "examples": {
                  "Match": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "id": "4241df29-8b3a-4557-83fd-8948082ecab7",
                          "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                          "account": "f8b4348c-5e90-4dfe-9111-319b103bdb8c",
                          "account_transaction": {
                            "id": "1642fb8e-e7c8-486c-b2c1-b3717609a022",
                            "amount": "234.00",
                            "currency": "USD",
                            "reference": "BANK-TXN-100238",
                            "date_paid": "2026-11-15T09:30:00Z",
                            "description": "Payment received via bank transfer"
                          },
                          "status": "matched",
                          "date_created": "2026-11-15T09:35:55.615242Z",
                          "date_modified": "2026-11-15T09:35:55.615229Z"
                        }
                      ]
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "UnknownStatus": {
                    "value": {
                      "status": [
                        "Select a valid choice. wrongvalue is not one of the available choices."
                      ]
                    },
                    "summary": "Unknown status"
                  }
                }
              }
            },
            "description": "A filter has a value that is not valid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      }
    },
    "/v1/match/{company}/{id}/": {
      "get": {
        "operationId": "match_retrieve",
        "description": "Retrieve a specific Match.\n\nReturns **403** if the user the API Key belongs to does not have reconciliation access.",
        "summary": "Retrieve Match",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Match.",
            "required": true
          }
        ],
        "tags": [
          "Match"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Match"
                },
                "examples": {
                  "Match": {
                    "value": {
                      "id": "4241df29-8b3a-4557-83fd-8948082ecab7",
                      "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                      "account": "f8b4348c-5e90-4dfe-9111-319b103bdb8c",
                      "account_transaction": {
                        "id": "1642fb8e-e7c8-486c-b2c1-b3717609a022",
                        "amount": "234.00",
                        "currency": "USD",
                        "reference": "BANK-TXN-100238",
                        "date_paid": "2026-11-15T09:30:00Z",
                        "description": "Payment received via bank transfer"
                      },
                      "status": "matched",
                      "date_created": "2026-11-15T09:35:55.615242Z",
                      "date_modified": "2026-11-15T09:35:55.615229Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "RecordNotFound": {
                    "value": {
                      "detail": "No Invoice matches the given query."
                    },
                    "summary": "Record not found"
                  }
                }
              }
            },
            "description": "The record does not exist, or the user cannot see it. The `detail` names the type of the record."
          }
        }
      }
    },
    "/v1/person-invoice/{company}/": {
      "post": {
        "operationId": "person_invoice_create",
        "description": "Mark a contact Person as the related contact of an Invoice. It is a many-to-many\nrelationship. `person` and `invoice` are Kolleno UUIDs.\n\nIf the link already exists, the response is the existing link, also with 201. If you\ndeleted the link before, this request brings it back and changes its\n`date_modified`.\n\nThe Person and the Invoice have to belong to the Company of the URL, and to the\nportfolios of the user. Otherwise the request returns 400.",
        "summary": "Link Person <> Invoice",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          }
        ],
        "tags": [
          "Person <> Invoice"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonInvoiceCreateRequest"
              },
              "examples": {
                "Link": {
                  "value": {
                    "person": "a7ac6c0e-af42-49d4-becf-8d5a85d0431c",
                    "invoice": "a3f73037-33bf-4139-8e75-0da72b9d1e33"
                  }
                }
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonInvoice"
                },
                "examples": {
                  "Link": {
                    "value": {
                      "id": "94813bac-9e58-4f72-8804-e4d563d21fab",
                      "person": "a7ac6c0e-af42-49d4-becf-8d5a85d0431c",
                      "invoice": "a3f73037-33bf-4139-8e75-0da72b9d1e33",
                      "date_created": "2026-01-06T14:54:57.576078Z",
                      "date_modified": "2026-01-06T14:54:57.576058Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "RequiredField": {
                    "value": {
                      "invoice": [
                        "This field is required."
                      ]
                    },
                    "summary": "Required field"
                  },
                  "UnknownPerson": {
                    "value": {
                      "person": [
                        "Invalid pk \"a7ac6c0e-af42-49d4-becf-8d5a85d0431c\" - object does not exist."
                      ]
                    },
                    "summary": "Unknown Person"
                  },
                  "PersonOfAnotherCompany": {
                    "value": {
                      "person": [
                        "Person does not belong to the specified company."
                      ]
                    },
                    "summary": "Person of another Company"
                  }
                }
              }
            },
            "description": "`person` or `invoice` is missing, does not exist, is outside the portfolios of the user, or belongs to another Company."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      }
    },
    "/v1/person-invoice/{company}/{id}/": {
      "delete": {
        "operationId": "person_invoice_destroy",
        "description": "Delete a link between a Person and an Invoice. This is a soft delete. If you link\nagain the Person to the Invoice after deletion, it will bring it back and simply\nchange the `date_modified`. A link that you deleted before also returns 204.",
        "summary": "Delete Person <> Invoice relationship",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the link.",
            "required": true
          }
        ],
        "tags": [
          "Person <> Invoice"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "LinkNotFound": {
                    "value": {
                      "detail": "No PersonInvoice matches the given query."
                    },
                    "summary": "Link not found"
                  }
                }
              }
            },
            "description": "No link has this UUID in the Company of the URL, or the Customer of the Person is outside the portfolios of the user."
          }
        }
      }
    },
    "/v1/person/{customer}/": {
      "get": {
        "operationId": "person_list",
        "description": "This endpoint is deprecated. Use the endpoint of the Company, `/v1/person/company/{company}/`.\n\nRetrieve all the Persons of a given Customer. Ordered by `date_created`.\n\nIf the Customer of the URL does not exist, or is not in the portfolios of the user,\nthe request returns 403.",
        "summary": "List Persons of a Customer",
        "parameters": [
          {
            "in": "path",
            "name": "customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Customer the records belong to.",
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            },
            "description": "The maximum number of items in the page. The default is 200."
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer"
            },
            "description": "The position of the first item of the page in the full list. The default is 0."
          }
        ],
        "tags": [
          "Person"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "deprecated": true,
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedPersonList"
                },
                "examples": {
                  "Person": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "id": "a7ac6c0e-af42-49d4-becf-8d5a85d0431c",
                          "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                          "email_address": "jane.doe@example.com",
                          "first_name": "Jane",
                          "last_name": "Doe",
                          "gender": "f",
                          "position": "CFO",
                          "position_external": {
                            "id": "390034db-a2aa-4cce-a88d-7b0a17a0fb30",
                            "name": "CFO",
                            "source": "kolleno_api"
                          },
                          "phone_numbers": [
                            {
                              "country": "US",
                              "number": "2025550123",
                              "extension": "45",
                              "carrier_type": "mobile",
                              "phone_prefix": "1"
                            }
                          ],
                          "primary": false,
                          "external_id": "",
                          "source_id": "my_company_ref",
                          "source": "kolleno_api",
                          "date_modified": "2026-01-06T14:54:57.576058Z",
                          "date_created": "2026-01-06T14:54:57.576078Z"
                        }
                      ]
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          }
        }
      },
      "post": {
        "operationId": "person_create",
        "description": "This endpoint is deprecated. Use the endpoint of the Company, `/v1/person/company/{company}/`.\n\nCreate a Person. It will set the field `source` to `kolleno_api` automatically.\nThe Person belongs to the Customer of the URL. A `customer` in the body is\nignored.\n\nIf the Customer of the URL does not exist, or is not in the portfolios of the user,\nthe request returns 403.\n\n**Fields**\n\n- `email_address` can hold several addresses, separated by commas. Kolleno stores\n  them in lower case.\n- `first_name` and `last_name` have up to 100 characters. `position` has up to 255\n  characters.\n- `gender` is `m`, `f` or empty.\n- `position` is the name of the position. When you send a `position`, Kolleno also\n  sets `position_external` to the Position External with this name, and creates it\n  if it does not exist.\n- `position_external` is the UUID of a Position External of the Company (see **List\n  Position Externals**). The response shows it as an object, or null.\n- `phone_numbers` is a list of objects. `carrier_type` is one of: `mobile`,\n  `landline`, `voip`, `undefined`. `country` is the ISO code of the country, or\n  empty. On PUT and PATCH, the list replaces all the phone numbers of the Person. If\n  you do not send `phone_numbers`, they do not change.\n- `primary` is true when this is the main contact for the Customer.\n- `source_id` is the ID in your system so you can keep track of the Person. It has\n  to be unique among the Persons of the Company with the same `source`.\n- When you send `external_id`, Kolleno also copies its value to `source_id`.",
        "summary": "Create Person of a Customer",
        "parameters": [
          {
            "in": "path",
            "name": "customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Customer the records belong to.",
            "required": true
          }
        ],
        "tags": [
          "Person"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonByCustomerCreateRequest"
              },
              "examples": {
                "Person": {
                  "value": {
                    "email_address": "jane.doe@example.com",
                    "first_name": "Jane",
                    "last_name": "Doe",
                    "gender": "f",
                    "position": "CFO",
                    "phone_numbers": [
                      {
                        "carrier_type": "mobile",
                        "country": "US",
                        "number": "2025550123",
                        "extension": "45"
                      }
                    ],
                    "primary": false,
                    "source_id": "my_company_ref"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "deprecated": true,
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Person"
                },
                "examples": {
                  "Person": {
                    "value": {
                      "id": "a7ac6c0e-af42-49d4-becf-8d5a85d0431c",
                      "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                      "email_address": "jane.doe@example.com",
                      "first_name": "Jane",
                      "last_name": "Doe",
                      "gender": "f",
                      "position": "CFO",
                      "position_external": {
                        "id": "390034db-a2aa-4cce-a88d-7b0a17a0fb30",
                        "name": "CFO",
                        "source": "kolleno_api"
                      },
                      "phone_numbers": [
                        {
                          "country": "US",
                          "number": "2025550123",
                          "extension": "45",
                          "carrier_type": "mobile",
                          "phone_prefix": "1"
                        }
                      ],
                      "primary": false,
                      "external_id": "",
                      "source_id": "my_company_ref",
                      "source": "kolleno_api",
                      "date_modified": "2026-01-06T14:54:57.576058Z",
                      "date_created": "2026-01-06T14:54:57.576078Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "DuplicateSourceId": {
                    "value": {
                      "source_id": [
                        "There is an integrity error as this source_id already exists."
                      ]
                    },
                    "summary": "Duplicate source_id"
                  }
                }
              }
            },
            "description": "A value of the request is not valid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          }
        }
      }
    },
    "/v1/person/{customer}/{id}/": {
      "get": {
        "operationId": "person_retrieve",
        "description": "This endpoint is deprecated. Use the endpoint of the Company, `/v1/person/company/{company}/`.\n\nRetrieve a specific Person.\n\nIf the Customer of the URL does not exist, or is not in the portfolios of the user,\nthe request returns 403.",
        "summary": "Retrieve Person of a Customer",
        "parameters": [
          {
            "in": "path",
            "name": "customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Customer the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Person.",
            "required": true
          }
        ],
        "tags": [
          "Person"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "deprecated": true,
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Person"
                },
                "examples": {
                  "Person": {
                    "value": {
                      "id": "a7ac6c0e-af42-49d4-becf-8d5a85d0431c",
                      "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                      "email_address": "jane.doe@example.com",
                      "first_name": "Jane",
                      "last_name": "Doe",
                      "gender": "f",
                      "position": "CFO",
                      "position_external": {
                        "id": "390034db-a2aa-4cce-a88d-7b0a17a0fb30",
                        "name": "CFO",
                        "source": "kolleno_api"
                      },
                      "phone_numbers": [
                        {
                          "country": "US",
                          "number": "2025550123",
                          "extension": "45",
                          "carrier_type": "mobile",
                          "phone_prefix": "1"
                        }
                      ],
                      "primary": false,
                      "external_id": "",
                      "source_id": "my_company_ref",
                      "source": "kolleno_api",
                      "date_modified": "2026-01-06T14:54:57.576058Z",
                      "date_created": "2026-01-06T14:54:57.576078Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "RecordNotFound": {
                    "value": {
                      "detail": "No Invoice matches the given query."
                    },
                    "summary": "Record not found"
                  }
                }
              }
            },
            "description": "The record does not exist, or the user cannot see it. The `detail` names the type of the record."
          }
        }
      },
      "put": {
        "operationId": "person_update",
        "description": "This endpoint is deprecated. Use the endpoint of the Company, `/v1/person/company/{company}/`.\n\nReplace the fields of a specific Person. `customer` is required, as a UUID of an\nexisting Customer, but its value does not change the Customer of the Person. A\nfield that you do not send keeps its value.\n\nOnce you have created a Person, it is not possible to move it to another Customer.\nYou will need to delete the Person then re-create it with the correct Customer.\n\nYou can edit all the fields of a Person if `source` equals one of: `manual`,\n`kolleno_api`, `csv`. Otherwise, you can only update the fields `primary` and\n`position_external`, with PATCH. Any other field of such a Person returns 400. A PUT\non such a Person always returns 400, because PUT requires `customer`.\n\nIf the Customer of the URL does not exist, or is not in the portfolios of the user,\nthe request returns 403.\n\n**Fields**\n\n- `email_address` can hold several addresses, separated by commas. Kolleno stores\n  them in lower case.\n- `first_name` and `last_name` have up to 100 characters. `position` has up to 255\n  characters.\n- `gender` is `m`, `f` or empty.\n- `position` is the name of the position. When you send a `position`, Kolleno also\n  sets `position_external` to the Position External with this name, and creates it\n  if it does not exist.\n- `position_external` is the UUID of a Position External of the Company (see **List\n  Position Externals**). The response shows it as an object, or null.\n- `phone_numbers` is a list of objects. `carrier_type` is one of: `mobile`,\n  `landline`, `voip`, `undefined`. `country` is the ISO code of the country, or\n  empty. On PUT and PATCH, the list replaces all the phone numbers of the Person. If\n  you do not send `phone_numbers`, they do not change.\n- `primary` is true when this is the main contact for the Customer.\n- `source_id` is the ID in your system so you can keep track of the Person. It has\n  to be unique among the Persons of the Company with the same `source`.\n- When you send `external_id`, Kolleno also copies its value to `source_id`.",
        "summary": "Replace Person of a Customer",
        "parameters": [
          {
            "in": "path",
            "name": "customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Customer the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Person.",
            "required": true
          }
        ],
        "tags": [
          "Person"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonRequest"
              },
              "examples": {
                "Person": {
                  "value": {
                    "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                    "email_address": "jane.doe@example.com",
                    "first_name": "Jane",
                    "last_name": "Doe",
                    "gender": "f",
                    "position": "CFO",
                    "phone_numbers": [
                      {
                        "carrier_type": "mobile",
                        "country": "US",
                        "number": "2025550123",
                        "extension": "45"
                      }
                    ],
                    "primary": false,
                    "source_id": "my_company_ref"
                  }
                }
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "deprecated": true,
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Person"
                },
                "examples": {
                  "Person": {
                    "value": {
                      "id": "a7ac6c0e-af42-49d4-becf-8d5a85d0431c",
                      "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                      "email_address": "jane.doe@example.com",
                      "first_name": "Jane",
                      "last_name": "Doe",
                      "gender": "f",
                      "position": "CFO",
                      "position_external": {
                        "id": "390034db-a2aa-4cce-a88d-7b0a17a0fb30",
                        "name": "CFO",
                        "source": "kolleno_api"
                      },
                      "phone_numbers": [
                        {
                          "country": "US",
                          "number": "2025550123",
                          "extension": "45",
                          "carrier_type": "mobile",
                          "phone_prefix": "1"
                        }
                      ],
                      "primary": false,
                      "external_id": "",
                      "source_id": "my_company_ref",
                      "source": "kolleno_api",
                      "date_modified": "2026-01-06T14:54:57.576058Z",
                      "date_created": "2026-01-06T14:54:57.576078Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "FieldNotAllowedForTheSource": {
                    "value": {
                      "non_field_errors": [
                        "Only 'position_external' and 'primary' fields can be updated for persons imported from external sources. Attempted to update: first_name"
                      ]
                    },
                    "summary": "Field not allowed for the source"
                  }
                }
              }
            },
            "description": "A value of the request is not valid, or the request changes a field that the `source` of the Person does not allow."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "RecordNotFound": {
                    "value": {
                      "detail": "No Invoice matches the given query."
                    },
                    "summary": "Record not found"
                  }
                }
              }
            },
            "description": "The record does not exist, or the user cannot see it. The `detail` names the type of the record."
          }
        }
      },
      "patch": {
        "operationId": "person_partial_update",
        "description": "This endpoint is deprecated. Use the endpoint of the Company, `/v1/person/company/{company}/`.\n\nUpdate details about a specific Person. Send only the fields to change.\n\nOnce you have created a Person, it is not possible to move it to another Customer.\nYou will need to delete the Person then re-create it with the correct Customer.\n\nYou can edit all the fields of a Person if `source` equals one of: `manual`,\n`kolleno_api`, `csv`. Otherwise, you can only update the fields `primary` and\n`position_external`, with PATCH. Any other field of such a Person returns 400. A PUT\non such a Person always returns 400, because PUT requires `customer`.\n\nIf the Customer of the URL does not exist, or is not in the portfolios of the user,\nthe request returns 403.\n\n**Fields**\n\n- `email_address` can hold several addresses, separated by commas. Kolleno stores\n  them in lower case.\n- `first_name` and `last_name` have up to 100 characters. `position` has up to 255\n  characters.\n- `gender` is `m`, `f` or empty.\n- `position` is the name of the position. When you send a `position`, Kolleno also\n  sets `position_external` to the Position External with this name, and creates it\n  if it does not exist.\n- `position_external` is the UUID of a Position External of the Company (see **List\n  Position Externals**). The response shows it as an object, or null.\n- `phone_numbers` is a list of objects. `carrier_type` is one of: `mobile`,\n  `landline`, `voip`, `undefined`. `country` is the ISO code of the country, or\n  empty. On PUT and PATCH, the list replaces all the phone numbers of the Person. If\n  you do not send `phone_numbers`, they do not change.\n- `primary` is true when this is the main contact for the Customer.\n- `source_id` is the ID in your system so you can keep track of the Person. It has\n  to be unique among the Persons of the Company with the same `source`.\n- When you send `external_id`, Kolleno also copies its value to `source_id`.",
        "summary": "Update Person of a Customer",
        "parameters": [
          {
            "in": "path",
            "name": "customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Customer the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Person.",
            "required": true
          }
        ],
        "tags": [
          "Person"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedPersonRequest"
              },
              "examples": {
                "Person": {
                  "value": {
                    "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                    "email_address": "jane.doe@example.com",
                    "first_name": "Jane",
                    "last_name": "Doe",
                    "gender": "f",
                    "position": "CFO",
                    "phone_numbers": [
                      {
                        "carrier_type": "mobile",
                        "country": "US",
                        "number": "2025550123",
                        "extension": "45"
                      }
                    ],
                    "primary": false,
                    "source_id": "my_company_ref"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "deprecated": true,
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Person"
                },
                "examples": {
                  "Person": {
                    "value": {
                      "id": "a7ac6c0e-af42-49d4-becf-8d5a85d0431c",
                      "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                      "email_address": "jane.doe@example.com",
                      "first_name": "Jane",
                      "last_name": "Doe",
                      "gender": "f",
                      "position": "CFO",
                      "position_external": {
                        "id": "390034db-a2aa-4cce-a88d-7b0a17a0fb30",
                        "name": "CFO",
                        "source": "kolleno_api"
                      },
                      "phone_numbers": [
                        {
                          "country": "US",
                          "number": "2025550123",
                          "extension": "45",
                          "carrier_type": "mobile",
                          "phone_prefix": "1"
                        }
                      ],
                      "primary": false,
                      "external_id": "",
                      "source_id": "my_company_ref",
                      "source": "kolleno_api",
                      "date_modified": "2026-01-06T14:54:57.576058Z",
                      "date_created": "2026-01-06T14:54:57.576078Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "FieldNotAllowedForTheSource": {
                    "value": {
                      "non_field_errors": [
                        "Only 'position_external' and 'primary' fields can be updated for persons imported from external sources. Attempted to update: first_name"
                      ]
                    },
                    "summary": "Field not allowed for the source"
                  }
                }
              }
            },
            "description": "A value of the request is not valid, or the request changes a field that the `source` of the Person does not allow."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "RecordNotFound": {
                    "value": {
                      "detail": "No Invoice matches the given query."
                    },
                    "summary": "Record not found"
                  }
                }
              }
            },
            "description": "The record does not exist, or the user cannot see it. The `detail` names the type of the record."
          }
        }
      },
      "delete": {
        "operationId": "person_destroy",
        "description": "This endpoint is deprecated. Use the endpoint of the Company, `/v1/person/company/{company}/`.\n\nPermanently delete a specific Person. You can only delete Persons if `source`\nequals one of: `manual`, `kolleno_api`, `csv`. Any other source returns 400.\n\nIf the Customer of the URL does not exist, or is not in the portfolios of the user,\nthe request returns 403.",
        "summary": "Delete Person of a Customer",
        "parameters": [
          {
            "in": "path",
            "name": "customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Customer the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Person.",
            "required": true
          }
        ],
        "tags": [
          "Person"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "deprecated": true,
        "responses": {
          "204": {
            "description": "No response body"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "SourceDoesNotAllowDeletion": {
                    "value": {
                      "non_field_errors": [
                        "Person imported from external source cannot be deleted."
                      ]
                    },
                    "summary": "Source does not allow deletion"
                  }
                }
              }
            },
            "description": "The `source` of the Person does not allow a deletion."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "RecordNotFound": {
                    "value": {
                      "detail": "No Invoice matches the given query."
                    },
                    "summary": "Record not found"
                  }
                }
              }
            },
            "description": "The record does not exist, or the user cannot see it. The `detail` names the type of the record."
          }
        }
      }
    },
    "/v1/person/company/{company}/": {
      "get": {
        "operationId": "person_company_list",
        "description": "Retrieve all the Persons for a given Company. Ordered by `date_created`.\n\nWhen the Company enforces portfolios, you can only see and change the Persons of the\nCustomers in the portfolios of the user. Any other Person returns 404.",
        "summary": "List Persons",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "query",
            "name": "customer",
            "schema": {
              "type": "string"
            },
            "description": "UUID of the Customer, to get all the Persons attached to a specific Customer. With `?source_customer=`, the `source_id` of the Customer. Without `?source_customer=`, an unknown UUID returns 400."
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            },
            "description": "The maximum number of items in the page. The default is 200."
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer"
            },
            "description": "The position of the first item of the page in the full list. The default is 0."
          },
          {
            "in": "query",
            "name": "source_customer",
            "schema": {
              "type": "string"
            },
            "description": "Send the source of the Customer, for example `workday`. The `customer` is then the `source_id` of the Customer in that source, and the response has `customer_source_id`."
          }
        ],
        "tags": [
          "Person"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedPersonList"
                },
                "examples": {
                  "Person": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "id": "a7ac6c0e-af42-49d4-becf-8d5a85d0431c",
                          "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                          "email_address": "jane.doe@example.com",
                          "first_name": "Jane",
                          "last_name": "Doe",
                          "gender": "f",
                          "position": "CFO",
                          "position_external": {
                            "id": "390034db-a2aa-4cce-a88d-7b0a17a0fb30",
                            "name": "CFO",
                            "source": "kolleno_api"
                          },
                          "phone_numbers": [
                            {
                              "country": "US",
                              "number": "2025550123",
                              "extension": "45",
                              "carrier_type": "mobile",
                              "phone_prefix": "1"
                            }
                          ],
                          "primary": false,
                          "external_id": "",
                          "source_id": "my_company_ref",
                          "source": "kolleno_api",
                          "date_modified": "2026-01-06T14:54:57.576058Z",
                          "date_created": "2026-01-06T14:54:57.576078Z"
                        }
                      ]
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "UnknownCustomer": {
                    "value": {
                      "customer": [
                        "Select a valid choice. That choice is not one of the available choices."
                      ]
                    },
                    "summary": "Unknown customer"
                  }
                }
              }
            },
            "description": "The `customer` filter is not a valid UUID, or no Customer has this UUID."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      },
      "post": {
        "operationId": "person_company_create",
        "description": "Create a Person. It will set the field `source` to `kolleno_api` automatically.\n\nThe `customer` is required. It is the UUID of the Customer of the Person. With\n`?source_customer=`, it is the `source_id` of the Customer. The Customer has to\nbelong to the Company of the URL and to the portfolios of the user. Otherwise the\nrequest returns 400.\n\n**Fields**\n\n- `email_address` can hold several addresses, separated by commas. Kolleno stores\n  them in lower case.\n- `first_name` and `last_name` have up to 100 characters. `position` has up to 255\n  characters.\n- `gender` is `m`, `f` or empty.\n- `position` is the name of the position. When you send a `position`, Kolleno also\n  sets `position_external` to the Position External with this name, and creates it\n  if it does not exist.\n- `position_external` is the UUID of a Position External of the Company (see **List\n  Position Externals**). The response shows it as an object, or null.\n- `phone_numbers` is a list of objects. `carrier_type` is one of: `mobile`,\n  `landline`, `voip`, `undefined`. `country` is the ISO code of the country, or\n  empty. On PUT and PATCH, the list replaces all the phone numbers of the Person. If\n  you do not send `phone_numbers`, they do not change.\n- `primary` is true when this is the main contact for the Customer.\n- `source_id` is the ID in your system so you can keep track of the Person. It has\n  to be unique among the Persons of the Company with the same `source`.\n- When you send `external_id`, Kolleno also copies its value to `source_id`.",
        "summary": "Create Person",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "query",
            "name": "source_customer",
            "schema": {
              "type": "string"
            },
            "description": "Send the source of the Customer, for example `workday`. The `customer` is then the `source_id` of the Customer in that source, and the response has `customer_source_id`."
          }
        ],
        "tags": [
          "Person"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonCompanyCreateRequest"
              },
              "examples": {
                "Person": {
                  "value": {
                    "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                    "email_address": "jane.doe@example.com",
                    "first_name": "Jane",
                    "last_name": "Doe",
                    "gender": "f",
                    "position": "CFO",
                    "phone_numbers": [
                      {
                        "carrier_type": "mobile",
                        "country": "US",
                        "number": "2025550123",
                        "extension": "45"
                      }
                    ],
                    "primary": false,
                    "source_id": "my_company_ref"
                  }
                }
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Person"
                },
                "examples": {
                  "Person": {
                    "value": {
                      "id": "a7ac6c0e-af42-49d4-becf-8d5a85d0431c",
                      "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                      "email_address": "jane.doe@example.com",
                      "first_name": "Jane",
                      "last_name": "Doe",
                      "gender": "f",
                      "position": "CFO",
                      "position_external": {
                        "id": "390034db-a2aa-4cce-a88d-7b0a17a0fb30",
                        "name": "CFO",
                        "source": "kolleno_api"
                      },
                      "phone_numbers": [
                        {
                          "country": "US",
                          "number": "2025550123",
                          "extension": "45",
                          "carrier_type": "mobile",
                          "phone_prefix": "1"
                        }
                      ],
                      "primary": false,
                      "external_id": "",
                      "source_id": "my_company_ref",
                      "source": "kolleno_api",
                      "date_modified": "2026-01-06T14:54:57.576058Z",
                      "date_created": "2026-01-06T14:54:57.576078Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "CustomerNotFound": {
                    "value": {
                      "customer": [
                        "The customer ID could not be found."
                      ]
                    },
                    "summary": "Customer not found"
                  }
                }
              }
            },
            "description": "A value of the request is not valid, or the Customer is not in the Company or in the portfolios of the user."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      }
    },
    "/v1/person/company/{company}/{id}/": {
      "get": {
        "operationId": "person_company_retrieve",
        "description": "Retrieve a specific Person.\n\nWhen the Company enforces portfolios, you can only see and change the Persons of the\nCustomers in the portfolios of the user. Any other Person returns 404.",
        "summary": "Retrieve Person",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "description": "UUID of the Person. When `?source=` is sent, the `source_id` of the Person.",
            "required": true
          },
          {
            "in": "query",
            "name": "source",
            "schema": {
              "type": "string"
            },
            "description": "Send the source of the Person, for example `kolleno_api`. The `{id}` in the URL is then the `source_id` of the Person in that source."
          },
          {
            "in": "query",
            "name": "source_customer",
            "schema": {
              "type": "string"
            },
            "description": "Send any value, for example `workday`, to add `customer_source_id` to the response. On PUT and PATCH, the `customer` in the body stays a UUID."
          }
        ],
        "tags": [
          "Person"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Person"
                },
                "examples": {
                  "Person": {
                    "value": {
                      "id": "a7ac6c0e-af42-49d4-becf-8d5a85d0431c",
                      "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                      "email_address": "jane.doe@example.com",
                      "first_name": "Jane",
                      "last_name": "Doe",
                      "gender": "f",
                      "position": "CFO",
                      "position_external": {
                        "id": "390034db-a2aa-4cce-a88d-7b0a17a0fb30",
                        "name": "CFO",
                        "source": "kolleno_api"
                      },
                      "phone_numbers": [
                        {
                          "country": "US",
                          "number": "2025550123",
                          "extension": "45",
                          "carrier_type": "mobile",
                          "phone_prefix": "1"
                        }
                      ],
                      "primary": false,
                      "external_id": "",
                      "source_id": "my_company_ref",
                      "source": "kolleno_api",
                      "date_modified": "2026-01-06T14:54:57.576058Z",
                      "date_created": "2026-01-06T14:54:57.576078Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "RecordNotFound": {
                    "value": {
                      "detail": "No Invoice matches the given query."
                    },
                    "summary": "Record not found"
                  }
                }
              }
            },
            "description": "The record does not exist, or the user cannot see it. The `detail` names the type of the record."
          }
        }
      },
      "put": {
        "operationId": "person_company_update",
        "description": "Replace the fields of a specific Person. `customer` is required, as a UUID of an\nexisting Customer, but its value does not change the Customer of the Person. A\nfield that you do not send keeps its value.\n\nOnce you have created a Person, it is not possible to move it to another Customer.\nYou will need to delete the Person then re-create it with the correct Customer.\n\nYou can edit all the fields of a Person if `source` equals one of: `manual`,\n`kolleno_api`, `csv`. Otherwise, you can only update the fields `primary` and\n`position_external`, with PATCH. Any other field of such a Person returns 400. A PUT\non such a Person always returns 400, because PUT requires `customer`.\n\nWhen the Company enforces portfolios, you can only see and change the Persons of the\nCustomers in the portfolios of the user. Any other Person returns 404.\n\n**Fields**\n\n- `email_address` can hold several addresses, separated by commas. Kolleno stores\n  them in lower case.\n- `first_name` and `last_name` have up to 100 characters. `position` has up to 255\n  characters.\n- `gender` is `m`, `f` or empty.\n- `position` is the name of the position. When you send a `position`, Kolleno also\n  sets `position_external` to the Position External with this name, and creates it\n  if it does not exist.\n- `position_external` is the UUID of a Position External of the Company (see **List\n  Position Externals**). The response shows it as an object, or null.\n- `phone_numbers` is a list of objects. `carrier_type` is one of: `mobile`,\n  `landline`, `voip`, `undefined`. `country` is the ISO code of the country, or\n  empty. On PUT and PATCH, the list replaces all the phone numbers of the Person. If\n  you do not send `phone_numbers`, they do not change.\n- `primary` is true when this is the main contact for the Customer.\n- `source_id` is the ID in your system so you can keep track of the Person. It has\n  to be unique among the Persons of the Company with the same `source`.\n- When you send `external_id`, Kolleno also copies its value to `source_id`.",
        "summary": "Replace Person",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "description": "UUID of the Person. When `?source=` is sent, the `source_id` of the Person.",
            "required": true
          },
          {
            "in": "query",
            "name": "source",
            "schema": {
              "type": "string"
            },
            "description": "Send the source of the Person, for example `kolleno_api`. The `{id}` in the URL is then the `source_id` of the Person in that source."
          },
          {
            "in": "query",
            "name": "source_customer",
            "schema": {
              "type": "string"
            },
            "description": "Send any value, for example `workday`, to add `customer_source_id` to the response. On PUT and PATCH, the `customer` in the body stays a UUID."
          }
        ],
        "tags": [
          "Person"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonRequest"
              },
              "examples": {
                "Person": {
                  "value": {
                    "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                    "email_address": "jane.doe@example.com",
                    "first_name": "Jane",
                    "last_name": "Doe",
                    "gender": "f",
                    "position": "CFO",
                    "phone_numbers": [
                      {
                        "carrier_type": "mobile",
                        "country": "US",
                        "number": "2025550123",
                        "extension": "45"
                      }
                    ],
                    "primary": false,
                    "source_id": "my_company_ref"
                  }
                }
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Person"
                },
                "examples": {
                  "Person": {
                    "value": {
                      "id": "a7ac6c0e-af42-49d4-becf-8d5a85d0431c",
                      "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                      "email_address": "jane.doe@example.com",
                      "first_name": "Jane",
                      "last_name": "Doe",
                      "gender": "f",
                      "position": "CFO",
                      "position_external": {
                        "id": "390034db-a2aa-4cce-a88d-7b0a17a0fb30",
                        "name": "CFO",
                        "source": "kolleno_api"
                      },
                      "phone_numbers": [
                        {
                          "country": "US",
                          "number": "2025550123",
                          "extension": "45",
                          "carrier_type": "mobile",
                          "phone_prefix": "1"
                        }
                      ],
                      "primary": false,
                      "external_id": "",
                      "source_id": "my_company_ref",
                      "source": "kolleno_api",
                      "date_modified": "2026-01-06T14:54:57.576058Z",
                      "date_created": "2026-01-06T14:54:57.576078Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "FieldNotAllowedForTheSource": {
                    "value": {
                      "non_field_errors": [
                        "Only 'position_external' and 'primary' fields can be updated for persons imported from external sources. Attempted to update: first_name"
                      ]
                    },
                    "summary": "Field not allowed for the source"
                  }
                }
              }
            },
            "description": "A value of the request is not valid, or the request changes a field that the `source` of the Person does not allow."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "RecordNotFound": {
                    "value": {
                      "detail": "No Invoice matches the given query."
                    },
                    "summary": "Record not found"
                  }
                }
              }
            },
            "description": "The record does not exist, or the user cannot see it. The `detail` names the type of the record."
          }
        }
      },
      "patch": {
        "operationId": "person_company_partial_update",
        "description": "Update details about a specific Person. Send only the fields to change.\n\nOnce you have created a Person, it is not possible to move it to another Customer.\nYou will need to delete the Person then re-create it with the correct Customer.\n\nYou can edit all the fields of a Person if `source` equals one of: `manual`,\n`kolleno_api`, `csv`. Otherwise, you can only update the fields `primary` and\n`position_external`, with PATCH. Any other field of such a Person returns 400. A PUT\non such a Person always returns 400, because PUT requires `customer`.\n\nWhen the Company enforces portfolios, you can only see and change the Persons of the\nCustomers in the portfolios of the user. Any other Person returns 404.\n\n**Fields**\n\n- `email_address` can hold several addresses, separated by commas. Kolleno stores\n  them in lower case.\n- `first_name` and `last_name` have up to 100 characters. `position` has up to 255\n  characters.\n- `gender` is `m`, `f` or empty.\n- `position` is the name of the position. When you send a `position`, Kolleno also\n  sets `position_external` to the Position External with this name, and creates it\n  if it does not exist.\n- `position_external` is the UUID of a Position External of the Company (see **List\n  Position Externals**). The response shows it as an object, or null.\n- `phone_numbers` is a list of objects. `carrier_type` is one of: `mobile`,\n  `landline`, `voip`, `undefined`. `country` is the ISO code of the country, or\n  empty. On PUT and PATCH, the list replaces all the phone numbers of the Person. If\n  you do not send `phone_numbers`, they do not change.\n- `primary` is true when this is the main contact for the Customer.\n- `source_id` is the ID in your system so you can keep track of the Person. It has\n  to be unique among the Persons of the Company with the same `source`.\n- When you send `external_id`, Kolleno also copies its value to `source_id`.",
        "summary": "Update Person",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "description": "UUID of the Person. When `?source=` is sent, the `source_id` of the Person.",
            "required": true
          },
          {
            "in": "query",
            "name": "source",
            "schema": {
              "type": "string"
            },
            "description": "Send the source of the Person, for example `kolleno_api`. The `{id}` in the URL is then the `source_id` of the Person in that source."
          },
          {
            "in": "query",
            "name": "source_customer",
            "schema": {
              "type": "string"
            },
            "description": "Send any value, for example `workday`, to add `customer_source_id` to the response. On PUT and PATCH, the `customer` in the body stays a UUID."
          }
        ],
        "tags": [
          "Person"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedPersonRequest"
              },
              "examples": {
                "Person": {
                  "value": {
                    "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                    "email_address": "jane.doe@example.com",
                    "first_name": "Jane",
                    "last_name": "Doe",
                    "gender": "f",
                    "position": "CFO",
                    "phone_numbers": [
                      {
                        "carrier_type": "mobile",
                        "country": "US",
                        "number": "2025550123",
                        "extension": "45"
                      }
                    ],
                    "primary": false,
                    "source_id": "my_company_ref"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Person"
                },
                "examples": {
                  "Person": {
                    "value": {
                      "id": "a7ac6c0e-af42-49d4-becf-8d5a85d0431c",
                      "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                      "email_address": "jane.doe@example.com",
                      "first_name": "Jane",
                      "last_name": "Doe",
                      "gender": "f",
                      "position": "CFO",
                      "position_external": {
                        "id": "390034db-a2aa-4cce-a88d-7b0a17a0fb30",
                        "name": "CFO",
                        "source": "kolleno_api"
                      },
                      "phone_numbers": [
                        {
                          "country": "US",
                          "number": "2025550123",
                          "extension": "45",
                          "carrier_type": "mobile",
                          "phone_prefix": "1"
                        }
                      ],
                      "primary": false,
                      "external_id": "",
                      "source_id": "my_company_ref",
                      "source": "kolleno_api",
                      "date_modified": "2026-01-06T14:54:57.576058Z",
                      "date_created": "2026-01-06T14:54:57.576078Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "FieldNotAllowedForTheSource": {
                    "value": {
                      "non_field_errors": [
                        "Only 'position_external' and 'primary' fields can be updated for persons imported from external sources. Attempted to update: first_name"
                      ]
                    },
                    "summary": "Field not allowed for the source"
                  }
                }
              }
            },
            "description": "A value of the request is not valid, or the request changes a field that the `source` of the Person does not allow."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "RecordNotFound": {
                    "value": {
                      "detail": "No Invoice matches the given query."
                    },
                    "summary": "Record not found"
                  }
                }
              }
            },
            "description": "The record does not exist, or the user cannot see it. The `detail` names the type of the record."
          }
        }
      },
      "delete": {
        "operationId": "person_company_destroy",
        "description": "Permanently delete a specific Person. You can only delete Persons if `source`\nequals one of: `manual`, `kolleno_api`, `csv`. Any other source returns 400.\n\nWhen the Company enforces portfolios, you can only see and change the Persons of the\nCustomers in the portfolios of the user. Any other Person returns 404.",
        "summary": "Delete Person",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "description": "UUID of the Person. When `?source=` is sent, the `source_id` of the Person.",
            "required": true
          },
          {
            "in": "query",
            "name": "source",
            "schema": {
              "type": "string"
            },
            "description": "Send the source of the Person, for example `kolleno_api`. The `{id}` in the URL is then the `source_id` of the Person in that source."
          }
        ],
        "tags": [
          "Person"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "SourceDoesNotAllowDeletion": {
                    "value": {
                      "non_field_errors": [
                        "Person imported from external source cannot be deleted."
                      ]
                    },
                    "summary": "Source does not allow deletion"
                  }
                }
              }
            },
            "description": "The `source` of the Person does not allow a deletion."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "RecordNotFound": {
                    "value": {
                      "detail": "No Invoice matches the given query."
                    },
                    "summary": "Record not found"
                  }
                }
              }
            },
            "description": "The record does not exist, or the user cannot see it. The `detail` names the type of the record."
          }
        }
      }
    },
    "/v1/position-external/{company}/": {
      "get": {
        "operationId": "position_external_list",
        "description": "List all the external Positions (the roles) of a Company that you can assign to\nPerson objects. Ordered by `name`. A deleted Position is not in the list.",
        "summary": "List Position Externals",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            },
            "description": "The maximum number of items in the page. The default is 200."
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer"
            },
            "description": "The position of the first item of the page in the full list. The default is 0."
          }
        ],
        "tags": [
          "Position External"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedPositionExternalList"
                },
                "examples": {
                  "PositionExternal": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "id": "390034db-a2aa-4cce-a88d-7b0a17a0fb30",
                          "name": "Accounts Payable Manager",
                          "source": "kolleno_api"
                        }
                      ]
                    },
                    "summary": "Position External"
                  }
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      }
    },
    "/v1/report-file/{company}/": {
      "get": {
        "operationId": "report_file_list",
        "description": "List the completed report files of the Company that the user the API Key belongs\nto requested, or that were sent to that user (for example by a Report\nSchedule). Only report files with `status` `completed` and a file to download\nare listed. Ordered by `date_created`, newest first.\n\nReturns **400** if a date filter is not a valid date or datetime.",
        "summary": "List Report Files",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "query",
            "name": "date_created__date",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Only return report files created on this date (UTC), in `YYYY-MM-DD` format."
          },
          {
            "in": "query",
            "name": "date_created__gte",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Only return report files created on or after this ISO 8601 datetime."
          },
          {
            "in": "query",
            "name": "date_created__lte",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Only return report files created on or before this ISO 8601 datetime."
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            },
            "description": "The maximum number of items in the page. The default is 200."
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer"
            },
            "description": "The position of the first item of the page in the full list. The default is 0."
          },
          {
            "in": "query",
            "name": "var_name",
            "schema": {
              "type": "string"
            },
            "description": "Only return the report files of the Report Type with this `var_name` (exact match), for example `transactions_received_list`."
          }
        ],
        "tags": [
          "Report File"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedReportFileList"
                },
                "examples": {
                  "ReportFile": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "id": "473c6eeb-b2ee-478b-894c-30f5ebd9a508",
                          "var_name": "transactions_received_list",
                          "report_type_name": "Payments Received",
                          "extension": "xlsx",
                          "size": 32026,
                          "status": "completed",
                          "date_created": "2026-10-01T09:14:11.025264Z"
                        }
                      ]
                    },
                    "summary": "Report File"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "DateFilterNotValid": {
                    "value": {
                      "date_created__gte": [
                        "Enter a valid date/time."
                      ]
                    },
                    "summary": "Date filter not valid"
                  }
                }
              }
            },
            "description": "A date filter is not valid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      },
      "post": {
        "operationId": "report_file_create",
        "description": "Request a new report file. Kolleno generates the file in the background.\n\nSend the `var_name` of a Report Type from **List Report Types**, and the `filters`\nthat the Report Type accepts. You must send each filter that has\n`\"required\": true`. Dates are absolute, in `YYYY-MM-DD` format.\n\nReturns **202** with the `id` and the `status` of the new report file. Poll\n**Retrieve Report File Status** until `status` is `completed`, then download the\nfile with **Download Report File**. If `status` is `error`, Kolleno could not\ngenerate the file. When the file is ready, Kolleno also sends an email to the\nuser the API Key belongs to, if that user has an email address and has the\nemail notification for generated reports on.\n\nReturns **400** if `var_name` is missing or is not a Report Type you can\nrequest, if `filters` or `dynamic_filters` is not an object, or if a filter is\nmissing or has a value that is not valid. Returns **403** if the user the API\nKey belongs to does not have reporting access. Returns **429** if you already\nhave 3 report files for this Company that are queued\nor in progress and that you requested in the last 3 hours.\nWait for one to finish, then send the request again.",
        "summary": "Generate Report File",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          }
        ],
        "tags": [
          "Report File"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportFileCreateRequest"
              },
              "examples": {
                "ReportFile": {
                  "value": {
                    "var_name": "transactions_received_list",
                    "filters": {
                      "date_from": "2026-09-01",
                      "date_to": "2026-09-30"
                    }
                  },
                  "summary": "Report File"
                }
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportFileAccepted"
                },
                "examples": {
                  "ReportFile": {
                    "value": {
                      "id": "473c6eeb-b2ee-478b-894c-30f5ebd9a508",
                      "status": "received",
                      "var_name": "transactions_received_list"
                    },
                    "summary": "Report File"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "RequiredFilterMissing": {
                    "value": {
                      "date_from": [
                        "This field is required."
                      ]
                    },
                    "summary": "Required filter missing"
                  },
                  "DateFilterNotValid": {
                    "value": {
                      "date_to": [
                        "Incorrect date format, it should be YYYY-MM-DD."
                      ]
                    },
                    "summary": "Date filter not valid"
                  },
                  "UnknownReportType": {
                    "value": {
                      "var_name": [
                        "\"not_a_report\" is not a report type you can request."
                      ]
                    },
                    "summary": "Unknown report type"
                  }
                }
              }
            },
            "description": "The `var_name`, the `filters` or the `dynamic_filters` are not valid. The key of a filter error is the name of the filter."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "TooManyReportFilesBeingGenerated": {
                    "value": {
                      "detail": "You already have 3 report files being generated for this company. Wait for one to finish before requesting another."
                    },
                    "summary": "Too many report files being generated"
                  },
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "You already have 3 report files for this Company that are queued or in progress and that you requested in the last 3 hours, or the Company reached its rate limit. Only the rate limit sends a `Retry-After` header."
          }
        }
      }
    },
    "/v1/report-file/{company}/{id}/": {
      "get": {
        "operationId": "report_file_retrieve",
        "description": "Download a completed report file as an attachment. The `Content-Type` comes from\nthe extension of the file. The `Content-Disposition` header holds the file name,\nwhich is the name of the Report Type and the date period of the filters, for\nexample `Payments Received - 01 Sep 2026 - 30 Sep 2026.xlsx`.\n\nReturns **404** if the report file does not exist, is not `completed`, has no\nfile to download, or was not requested by or sent to the user the API Key\nbelongs to.",
        "summary": "Download Report File",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Report File (the `id` that **Generate Report File** returns).",
            "required": true
          }
        ],
        "tags": [
          "Report File"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            },
            "description": "The report file. The `Content-Type` comes from the extension of the file: `xlsx`, `pdf` or `csv`."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "report_file": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "report_file"
                  ]
                },
                "examples": {
                  "ReportFileNotFound": {
                    "value": {
                      "report_file": [
                        "This report file could not be found."
                      ]
                    },
                    "summary": "Report File not found"
                  }
                }
              }
            },
            "description": "The Report File does not exist, is not completed, has no file, or was not requested by or sent to the user the API Key belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      }
    },
    "/v1/report-file/{company}/{id}/status/": {
      "get": {
        "operationId": "report_file_status_retrieve",
        "description": "Get the progress of a report file that the user the API Key belongs to\nrequested, or that was sent to that user, in any status. Use it after\n**Generate Report File** to know when the file is ready.\n\nThe possible `status` are: `received`, `in_progress`, `completed` and `error`.\nWhen `status` is `completed` and `size` is more than 0, download the file with\n**Download Report File**. Until the file is generated, `extension` is an empty\nstring and `size` is 0.\n\nReturns **404** if the report file does not exist, or was not requested by or\nsent to the user the API Key belongs to.",
        "summary": "Retrieve Report File Status",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Report File (the `id` that **Generate Report File** returns).",
            "required": true
          }
        ],
        "tags": [
          "Report File"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportFile"
                },
                "examples": {
                  "ReportFile": {
                    "value": {
                      "id": "473c6eeb-b2ee-478b-894c-30f5ebd9a508",
                      "var_name": "transactions_received_list",
                      "report_type_name": "Payments Received",
                      "extension": "xlsx",
                      "size": 32026,
                      "status": "completed",
                      "date_created": "2026-10-01T09:14:11.025264Z"
                    },
                    "summary": "Report File"
                  }
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "report_file": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "report_file"
                  ]
                },
                "examples": {
                  "ReportFileNotFound": {
                    "value": {
                      "report_file": [
                        "This report file could not be found."
                      ]
                    },
                    "summary": "Report File not found"
                  }
                }
              }
            },
            "description": "The Report File does not exist, or was not requested by or sent to the user the API Key belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      }
    },
    "/v1/report-schedule/{company}/": {
      "get": {
        "operationId": "report_schedule_list",
        "description": "Retrieve the Report Schedules that are delivered to the user the API Key belongs\nto. Deleted Report Schedules are not listed. Ordered by `date_created`, newest\nfirst.\n\nReturns **403** if the user the API Key belongs to does not have reporting access.",
        "summary": "List Report Schedules",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            },
            "description": "The maximum number of items in the page. The default is 200."
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer"
            },
            "description": "The position of the first item of the page in the full list. The default is 0."
          }
        ],
        "tags": [
          "Report Schedule"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedReportScheduleList"
                },
                "examples": {
                  "ReportSchedule": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "id": "bf85e6cf-3732-476b-ad02-ae50ea2fc7ee",
                          "var_name": "transactions_received_list",
                          "report_type_name": "Payments Received",
                          "filters": {
                            "date_from": {
                              "interval": "week",
                              "value": "first_day",
                              "past": -1
                            },
                            "date_to": {
                              "interval": "week",
                              "value": "last_day",
                              "past": -1
                            }
                          },
                          "dynamic_filters": {},
                          "frequency": "weekly",
                          "day_number": 0,
                          "time": "08:00:00",
                          "date_created": "2026-10-19T09:20:41.512908Z"
                        }
                      ]
                    },
                    "summary": "Report Schedule"
                  }
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      },
      "post": {
        "operationId": "report_schedule_create",
        "description": "Create a Report Schedule. Kolleno then generates the report file on each scheduled\nday at the `time`, in the timezone of the Company. Kolleno sends the report file\nby email to the user the API Key belongs to, if that user has an email address.\nEach report file also shows in **List Report Files**.\n\nSend the `var_name` of a Report Type from **List Report Types**, the `frequency`,\nthe `day_number`, and the `filters` that the Report Type accepts. You must send\neach filter that has `\"required\": true`.\n\nThe dates in `filters` are relative to the day the report file is generated:\n\n- `{\"interval\": \"day\", \"value\": -30}`: a number of days before (negative) or after\n  (positive) that day.\n- `{\"interval\": \"week\", \"value\": \"first_day\", \"past\": -1}`: the first or last day\n  (`\"first_day\"` or `\"last_day\"`) of a week or a month (`\"week\"` or `\"month\"`).\n  `\"past\"` is 0 for the current week or month, -1 for the previous one, and so on.\n\nReturns **400** if `var_name` or `day_number` is missing, if `day_number` does not\nmatch the `frequency`, if `frequency` or `time` is not valid, if `filters` or\n`dynamic_filters` is not an object, or if a filter is missing or incorrect.\n\nReturns **403** if the user the API Key belongs to does not have reporting access.",
        "summary": "Create Report Schedule",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          }
        ],
        "tags": [
          "Report Schedule"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportScheduleCreateRequest"
              },
              "examples": {
                "ReportSchedule": {
                  "value": {
                    "var_name": "transactions_received_list",
                    "frequency": "weekly",
                    "day_number": 0,
                    "time": "08:00:00",
                    "filters": {
                      "date_from": {
                        "interval": "week",
                        "value": "first_day",
                        "past": -1
                      },
                      "date_to": {
                        "interval": "week",
                        "value": "last_day",
                        "past": -1
                      }
                    }
                  },
                  "summary": "Report Schedule"
                }
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportSchedule"
                },
                "examples": {
                  "ReportSchedule": {
                    "value": {
                      "id": "bf85e6cf-3732-476b-ad02-ae50ea2fc7ee",
                      "var_name": "transactions_received_list",
                      "report_type_name": "Payments Received",
                      "filters": {
                        "date_from": {
                          "interval": "week",
                          "value": "first_day",
                          "past": -1
                        },
                        "date_to": {
                          "interval": "week",
                          "value": "last_day",
                          "past": -1
                        }
                      },
                      "dynamic_filters": {},
                      "frequency": "weekly",
                      "day_number": 0,
                      "time": "08:00:00",
                      "date_created": "2026-10-19T09:20:41.512908Z"
                    },
                    "summary": "Report Schedule"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "RelativeDateRequired": {
                    "value": {
                      "date_from": [
                        "Enter a relative date, such as {\"interval\": \"day\", \"value\": -30} or {\"interval\": \"month\", \"value\": \"first_day\", \"past\": -1}."
                      ]
                    },
                    "summary": "Relative date required"
                  },
                  "DayNumberOutsideTheRange": {
                    "value": {
                      "day_number": [
                        "Value should be between 0 and 6 when frequency is 'weekly'."
                      ]
                    },
                    "summary": "Day number outside the range"
                  }
                }
              }
            },
            "description": "A value of the request is not valid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      }
    },
    "/v1/report-schedule/{company}/{id}/": {
      "get": {
        "operationId": "report_schedule_retrieve",
        "description": "Retrieve a specific Report Schedule.\n\nReturns **404** if the Report Schedule does not exist, was deleted, or is not\ndelivered to the user the API Key belongs to.\n\nReturns **403** if the user the API Key belongs to does not have reporting access.",
        "summary": "Retrieve Report Schedule",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Report Schedule.",
            "required": true
          }
        ],
        "tags": [
          "Report Schedule"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportSchedule"
                },
                "examples": {
                  "ReportSchedule": {
                    "value": {
                      "id": "bf85e6cf-3732-476b-ad02-ae50ea2fc7ee",
                      "var_name": "transactions_received_list",
                      "report_type_name": "Payments Received",
                      "filters": {
                        "date_from": {
                          "interval": "week",
                          "value": "first_day",
                          "past": -1
                        },
                        "date_to": {
                          "interval": "week",
                          "value": "last_day",
                          "past": -1
                        }
                      },
                      "dynamic_filters": {},
                      "frequency": "weekly",
                      "day_number": 0,
                      "time": "08:00:00",
                      "date_created": "2026-10-19T09:20:41.512908Z"
                    },
                    "summary": "Report Schedule"
                  }
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "ReportScheduleNotFound": {
                    "value": {
                      "detail": "No ReportSchedule matches the given query."
                    },
                    "summary": "Report Schedule not found"
                  }
                }
              }
            },
            "description": "The Report Schedule does not exist, was deleted, or is not delivered to the user the API Key belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      },
      "delete": {
        "operationId": "report_schedule_destroy",
        "description": "Delete a specific Report Schedule. Kolleno stops generating its report files. The\nreport files it already generated are kept.\n\nReturns **404** if the Report Schedule does not exist, was already deleted, or is\nnot delivered to the user the API Key belongs to.\n\nReturns **403** if the user the API Key belongs to does not have reporting access.",
        "summary": "Delete Report Schedule",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Report Schedule.",
            "required": true
          }
        ],
        "tags": [
          "Report Schedule"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "ReportScheduleNotFound": {
                    "value": {
                      "detail": "No ReportSchedule matches the given query."
                    },
                    "summary": "Report Schedule not found"
                  }
                }
              }
            },
            "description": "The Report Schedule does not exist, was deleted, or is not delivered to the user the API Key belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      }
    },
    "/v1/report-type/{company}/": {
      "get": {
        "operationId": "report_type_list",
        "description": "Retrieve the Report Types you can request through the API, with the filters each\none accepts. Ordered by `name`.\n\nUse the `var_name` to send **Generate Report File** or **Create Report Schedule**.\n\nReturns **403** if the user the API Key belongs to does not have reporting access.",
        "summary": "List Report Types",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            },
            "description": "The maximum number of items in the page. The default is 200."
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer"
            },
            "description": "The position of the first item of the page in the full list. The default is 0."
          }
        ],
        "tags": [
          "Report Type"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedReportTypeList"
                },
                "examples": {
                  "ReportType": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "var_name": "transactions_received_list",
                          "name": "Payments Received",
                          "description": "Get the list of all the payments you've received between two dates.",
                          "extension": "xlsx",
                          "filters": {
                            "date_from": {
                              "label": "From",
                              "type": "date",
                              "required": true
                            },
                            "date_to": {
                              "label": "To",
                              "type": "date",
                              "required": true
                            },
                            "pause_chasing": {
                              "label": "Pause chasing",
                              "type": "boolean",
                              "required": false
                            }
                          }
                        }
                      ]
                    },
                    "summary": "Report Type"
                  }
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      }
    },
    "/v1/step/{company}/": {
      "get": {
        "operationId": "step_list",
        "description": "Retrieve the Steps in a given Company. Ordered by `date_event`, newest first.\n\nSteps with the same `date_event` are ordered by `id`, so paging with `limit` and\n`offset` does not skip or repeat them.\n\nTo get more data of each Step, send `?extra_fields=` with one or both of:\ncontacts, content. Do not put spaces between the values.",
        "summary": "List of Steps",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "query",
            "name": "customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Filter to get only the Steps of a specific Customer. A value that is not a UUID, or a Customer that does not exist, returns 400."
          },
          {
            "in": "query",
            "name": "extra_fields",
            "schema": {
              "type": "string"
            },
            "description": "Get additional fields in the response (comma separated, with no spaces). The possible values are: contacts, content."
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            },
            "description": "The maximum number of items in the page. The default is 200."
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer"
            },
            "description": "The position of the first item of the page in the full list. The default is 0."
          }
        ],
        "tags": [
          "Timeline"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedStepList"
                },
                "examples": {
                  "Step": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "id": "d2c9ee92-762a-4566-a180-e808502a97ce",
                          "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                          "category": "email_sent",
                          "date_event": "2026-04-12T15:08:53.917108Z"
                        }
                      ]
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "UnknownCustomer": {
                    "value": {
                      "customer": [
                        "Select a valid choice. That choice is not one of the available choices."
                      ]
                    },
                    "summary": "Unknown customer"
                  }
                }
              }
            },
            "description": "The `customer` filter is not a UUID, or no Customer has this UUID."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      }
    },
    "/v1/tag/{company}/": {
      "get": {
        "operationId": "tag_list",
        "description": "Retrieve all the Tags in a given Company. Ordered by `name`.",
        "summary": "List Tags",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            },
            "description": "The maximum number of items in the page. The default is 200."
          },
          {
            "in": "query",
            "name": "name",
            "schema": {
              "type": "string"
            },
            "description": "Filter to get only the Tag with this exact name."
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer"
            },
            "description": "The position of the first item of the page in the full list. The default is 0."
          },
          {
            "in": "query",
            "name": "tag_category",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Filter to get only the Tags of a specific Tag Category. An unknown UUID returns 400."
          }
        ],
        "tags": [
          "Tag"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedTagList"
                },
                "examples": {
                  "Tag": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "id": "32fd143d-e5fc-4be5-a8f2-e4756e92edcf",
                          "name": "Disputed",
                          "color": "FF0000",
                          "description": "The customer raised a dispute",
                          "tag_category": {
                            "id": "5b10714b-66d0-4db4-b8bb-5bf0207fd5f9",
                            "name": "Collections"
                          }
                        }
                      ]
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "UnknownTagCategory": {
                    "value": {
                      "tag_category": [
                        "Select a valid choice. That choice is not one of the available choices."
                      ]
                    },
                    "summary": "Unknown tag category"
                  }
                }
              }
            },
            "description": "The `tag_category` filter is not a valid UUID, or no Tag Category has this UUID."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      },
      "post": {
        "operationId": "tag_create",
        "description": "Create a Tag. Only `name` is required.\n\nThe user the API Key belongs to needs the tag management access, exactly as in the user interface. Without it, the request returns 403.\n\n**Fields**\n\n- `name` has up to 100 characters. It has to be unique among the Tags of the Company\n  that are not deleted.\n- `color` is exactly 6 hexadecimal characters, without the leading `#`. The default\n  is `FFFFFF`.\n- `description` has up to 255 characters.\n- `tag_category` is the UUID of a Tag Category of the same Company, or null.",
        "summary": "Create Tag",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          }
        ],
        "tags": [
          "Tag"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TagRequest"
              },
              "examples": {
                "Tag": {
                  "value": {
                    "name": "Disputed",
                    "color": "FF0000",
                    "description": "The customer raised a dispute",
                    "tag_category": "5b10714b-66d0-4db4-b8bb-5bf0207fd5f9"
                  }
                }
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tag"
                },
                "examples": {
                  "Tag": {
                    "value": {
                      "id": "32fd143d-e5fc-4be5-a8f2-e4756e92edcf",
                      "name": "Disputed",
                      "color": "FF0000",
                      "description": "The customer raised a dispute",
                      "tag_category": {
                        "id": "5b10714b-66d0-4db4-b8bb-5bf0207fd5f9",
                        "name": "Collections"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "DuplicateName": {
                    "value": {
                      "name": [
                        "A tag with this name already exists."
                      ]
                    },
                    "summary": "Duplicate name"
                  }
                }
              }
            },
            "description": "A value of the request is not valid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      }
    },
    "/v1/tag/{company}/{id}/": {
      "get": {
        "operationId": "tag_retrieve",
        "description": "Retrieve a specific Tag.",
        "summary": "Retrieve Tag",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Tag.",
            "required": true
          }
        ],
        "tags": [
          "Tag"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tag"
                },
                "examples": {
                  "Tag": {
                    "value": {
                      "id": "32fd143d-e5fc-4be5-a8f2-e4756e92edcf",
                      "name": "Disputed",
                      "color": "FF0000",
                      "description": "The customer raised a dispute",
                      "tag_category": {
                        "id": "5b10714b-66d0-4db4-b8bb-5bf0207fd5f9",
                        "name": "Collections"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "RecordNotFound": {
                    "value": {
                      "detail": "No Invoice matches the given query."
                    },
                    "summary": "Record not found"
                  }
                }
              }
            },
            "description": "The record does not exist, or the user cannot see it. The `detail` names the type of the record."
          }
        }
      },
      "put": {
        "operationId": "tag_update",
        "description": "Update a specific Tag. `name` is required. A field that you do not send keeps its\nvalue. A new name or color shows everywhere the Tag is assigned.\n\nSend `\"tag_category\": null` to take the Tag out of its category.\n\nAny user with write access to the Company can update it. The tag management access is not needed.\n\n**Fields**\n\n- `name` has up to 100 characters. It has to be unique among the Tags of the Company\n  that are not deleted.\n- `color` is exactly 6 hexadecimal characters, without the leading `#`. The default\n  is `FFFFFF`.\n- `description` has up to 255 characters.\n- `tag_category` is the UUID of a Tag Category of the same Company, or null.",
        "summary": "Replace Tag",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Tag.",
            "required": true
          }
        ],
        "tags": [
          "Tag"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TagRequest"
              },
              "examples": {
                "Tag": {
                  "value": {
                    "name": "Disputed",
                    "color": "FF0000",
                    "description": "The customer raised a dispute",
                    "tag_category": "5b10714b-66d0-4db4-b8bb-5bf0207fd5f9"
                  }
                }
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tag"
                },
                "examples": {
                  "Tag": {
                    "value": {
                      "id": "32fd143d-e5fc-4be5-a8f2-e4756e92edcf",
                      "name": "Disputed",
                      "color": "FF0000",
                      "description": "The customer raised a dispute",
                      "tag_category": {
                        "id": "5b10714b-66d0-4db4-b8bb-5bf0207fd5f9",
                        "name": "Collections"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "DuplicateName": {
                    "value": {
                      "name": [
                        "A tag with this name already exists."
                      ]
                    },
                    "summary": "Duplicate name"
                  }
                }
              }
            },
            "description": "A value of the request is not valid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "RecordNotFound": {
                    "value": {
                      "detail": "No Invoice matches the given query."
                    },
                    "summary": "Record not found"
                  }
                }
              }
            },
            "description": "The record does not exist, or the user cannot see it. The `detail` names the type of the record."
          }
        }
      },
      "patch": {
        "operationId": "tag_partial_update",
        "description": "Update a specific Tag. Send only the fields to change. A new name or color shows\neverywhere the Tag is assigned.\n\nSend `\"tag_category\": null` to take the Tag out of its category.\n\nAny user with write access to the Company can update it. The tag management access is not needed.\n\n**Fields**\n\n- `name` has up to 100 characters. It has to be unique among the Tags of the Company\n  that are not deleted.\n- `color` is exactly 6 hexadecimal characters, without the leading `#`. The default\n  is `FFFFFF`.\n- `description` has up to 255 characters.\n- `tag_category` is the UUID of a Tag Category of the same Company, or null.",
        "summary": "Update Tag",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Tag.",
            "required": true
          }
        ],
        "tags": [
          "Tag"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedTagRequest"
              },
              "examples": {
                "Tag": {
                  "value": {
                    "name": "Disputed",
                    "color": "FF0000",
                    "description": "The customer raised a dispute",
                    "tag_category": "5b10714b-66d0-4db4-b8bb-5bf0207fd5f9"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tag"
                },
                "examples": {
                  "Tag": {
                    "value": {
                      "id": "32fd143d-e5fc-4be5-a8f2-e4756e92edcf",
                      "name": "Disputed",
                      "color": "FF0000",
                      "description": "The customer raised a dispute",
                      "tag_category": {
                        "id": "5b10714b-66d0-4db4-b8bb-5bf0207fd5f9",
                        "name": "Collections"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "DuplicateName": {
                    "value": {
                      "name": [
                        "A tag with this name already exists."
                      ]
                    },
                    "summary": "Duplicate name"
                  }
                }
              }
            },
            "description": "A value of the request is not valid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "RecordNotFound": {
                    "value": {
                      "detail": "No Invoice matches the given query."
                    },
                    "summary": "Record not found"
                  }
                }
              }
            },
            "description": "The record does not exist, or the user cannot see it. The `detail` names the type of the record."
          }
        }
      },
      "delete": {
        "operationId": "tag_destroy",
        "description": "Delete a specific Tag. The Tag is removed from everything it is assigned to,\nincluding the workflow steps that add or remove it, so the deletion cannot be\nundone. After the deletion, the Tag is not in the list and its ID returns 404.\n\nThe user the API Key belongs to needs the tag management access, exactly as in the user interface. Without it, the request returns 403.",
        "summary": "Delete Tag",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Tag.",
            "required": true
          }
        ],
        "tags": [
          "Tag"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "RecordNotFound": {
                    "value": {
                      "detail": "No Invoice matches the given query."
                    },
                    "summary": "Record not found"
                  }
                }
              }
            },
            "description": "The record does not exist, or the user cannot see it. The `detail` names the type of the record."
          }
        }
      }
    },
    "/v1/tag/category/{company}/": {
      "get": {
        "operationId": "tag_category_list",
        "description": "Retrieve all the Tag Categories in a given Company. Ordered by `name`.",
        "summary": "List Tag Categories",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            },
            "description": "The maximum number of items in the page. The default is 200."
          },
          {
            "in": "query",
            "name": "name",
            "schema": {
              "type": "string"
            },
            "description": "Filter to get only the Tag Category with this exact name."
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer"
            },
            "description": "The position of the first item of the page in the full list. The default is 0."
          }
        ],
        "tags": [
          "Tag Category"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedTagCategoryList"
                },
                "examples": {
                  "TagCategory": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "id": "5b10714b-66d0-4db4-b8bb-5bf0207fd5f9",
                          "name": "Collections"
                        }
                      ]
                    },
                    "summary": "Tag Category"
                  }
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      },
      "post": {
        "operationId": "tag_category_create",
        "description": "Create a Tag Category.\n\nThe `name` has up to 100 characters. It has to be unique among the Tag Categories of the Company that are not deleted.\n\nThe user the API Key belongs to needs the tag management access, exactly as in the user interface. Without it, the request returns 403.",
        "summary": "Create Tag Category",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          }
        ],
        "tags": [
          "Tag Category"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TagCategoryRequest"
              },
              "examples": {
                "TagCategory": {
                  "value": {
                    "name": "Collections"
                  },
                  "summary": "Tag Category"
                }
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TagCategory"
                },
                "examples": {
                  "TagCategory": {
                    "value": {
                      "id": "5b10714b-66d0-4db4-b8bb-5bf0207fd5f9",
                      "name": "Collections"
                    },
                    "summary": "Tag Category"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "DuplicateName": {
                    "value": {
                      "name": [
                        "A tag category with this name already exists."
                      ]
                    },
                    "summary": "Duplicate name"
                  }
                }
              }
            },
            "description": "A value of the request is not valid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      }
    },
    "/v1/tag/category/{company}/{id}/": {
      "get": {
        "operationId": "tag_category_retrieve",
        "description": "Retrieve a specific Tag Category.",
        "summary": "Retrieve Tag Category",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Tag Category.",
            "required": true
          }
        ],
        "tags": [
          "Tag Category"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TagCategory"
                },
                "examples": {
                  "TagCategory": {
                    "value": {
                      "id": "5b10714b-66d0-4db4-b8bb-5bf0207fd5f9",
                      "name": "Collections"
                    },
                    "summary": "Tag Category"
                  }
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "RecordNotFound": {
                    "value": {
                      "detail": "No Invoice matches the given query."
                    },
                    "summary": "Record not found"
                  }
                }
              }
            },
            "description": "The record does not exist, or the user cannot see it. The `detail` names the type of the record."
          }
        }
      },
      "put": {
        "operationId": "tag_category_update",
        "description": "Update a specific Tag Category. The `name` is required.\n\nThe `name` has up to 100 characters. It has to be unique among the Tag Categories of the Company that are not deleted.\n\nAny user with write access to the Company can update it. The tag management access is not needed.",
        "summary": "Replace Tag Category",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Tag Category.",
            "required": true
          }
        ],
        "tags": [
          "Tag Category"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TagCategoryRequest"
              },
              "examples": {
                "TagCategory": {
                  "value": {
                    "name": "Collections"
                  },
                  "summary": "Tag Category"
                }
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TagCategory"
                },
                "examples": {
                  "TagCategory": {
                    "value": {
                      "id": "5b10714b-66d0-4db4-b8bb-5bf0207fd5f9",
                      "name": "Collections"
                    },
                    "summary": "Tag Category"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "DuplicateName": {
                    "value": {
                      "name": [
                        "A tag category with this name already exists."
                      ]
                    },
                    "summary": "Duplicate name"
                  }
                }
              }
            },
            "description": "A value of the request is not valid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "RecordNotFound": {
                    "value": {
                      "detail": "No Invoice matches the given query."
                    },
                    "summary": "Record not found"
                  }
                }
              }
            },
            "description": "The record does not exist, or the user cannot see it. The `detail` names the type of the record."
          }
        }
      },
      "patch": {
        "operationId": "tag_category_partial_update",
        "description": "Update a specific Tag Category. Send only the fields to change.\n\nThe `name` has up to 100 characters. It has to be unique among the Tag Categories of the Company that are not deleted.\n\nAny user with write access to the Company can update it. The tag management access is not needed.",
        "summary": "Update Tag Category",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Tag Category.",
            "required": true
          }
        ],
        "tags": [
          "Tag Category"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedTagCategoryRequest"
              },
              "examples": {
                "TagCategory": {
                  "value": {
                    "name": "Collections"
                  },
                  "summary": "Tag Category"
                }
              }
            }
          }
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TagCategory"
                },
                "examples": {
                  "TagCategory": {
                    "value": {
                      "id": "5b10714b-66d0-4db4-b8bb-5bf0207fd5f9",
                      "name": "Collections"
                    },
                    "summary": "Tag Category"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "DuplicateName": {
                    "value": {
                      "name": [
                        "A tag category with this name already exists."
                      ]
                    },
                    "summary": "Duplicate name"
                  }
                }
              }
            },
            "description": "A value of the request is not valid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "RecordNotFound": {
                    "value": {
                      "detail": "No Invoice matches the given query."
                    },
                    "summary": "Record not found"
                  }
                }
              }
            },
            "description": "The record does not exist, or the user cannot see it. The `detail` names the type of the record."
          }
        }
      },
      "delete": {
        "operationId": "tag_category_destroy",
        "description": "Delete a specific Tag Category. Its Tags are kept, and are left without a\ncategory.\n\nThe user the API Key belongs to needs the tag management access, exactly as in the user interface. Without it, the request returns 403.",
        "summary": "Delete Tag Category",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Tag Category.",
            "required": true
          }
        ],
        "tags": [
          "Tag Category"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "RecordNotFound": {
                    "value": {
                      "detail": "No Invoice matches the given query."
                    },
                    "summary": "Record not found"
                  }
                }
              }
            },
            "description": "The record does not exist, or the user cannot see it. The `detail` names the type of the record."
          }
        }
      }
    },
    "/v1/template/{company}/": {
      "get": {
        "operationId": "template_list",
        "description": "Retrieve the Templates in a given Company that are not deleted. Ordered by `name`.\n\nUse it to get the name of the `template` of an email sent (see **Email Sent**).",
        "summary": "List Templates",
        "parameters": [
          {
            "in": "query",
            "name": "channel",
            "schema": {
              "type": "string",
              "enum": [
                "email",
                "text_message"
              ]
            },
            "description": "Filter to get only the Templates of a channel: `email` or `text_message`."
          },
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            },
            "description": "The maximum number of items in the page. The default is 200."
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer"
            },
            "description": "The position of the first item of the page in the full list. The default is 0."
          }
        ],
        "tags": [
          "Template"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedTemplateList"
                },
                "examples": {
                  "Template": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "id": "2d9d8667-51b1-47c9-b207-d930e88c19cd",
                          "name": "Overdue reminder",
                          "channel": "email",
                          "category": "overdue"
                        }
                      ]
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "UnknownChannel": {
                    "value": {
                      "channel": [
                        "Select a valid choice. fax is not one of the available choices."
                      ]
                    },
                    "summary": "Unknown channel"
                  }
                }
              }
            },
            "description": "The `channel` filter is not one of the possible values."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      }
    },
    "/v1/transaction/{customer}/": {
      "get": {
        "operationId": "transaction_list",
        "description": "Retrieve all the Transactions for a given Customer. Ordered by `date_created`.\n\nIf the Customer of the URL does not exist, or is outside the portfolios of the user,\nthe request returns **403**.",
        "summary": "List Transactions",
        "parameters": [
          {
            "in": "path",
            "name": "customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Customer the records belong to.",
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            },
            "description": "The maximum number of items in the page. The default is 200."
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer"
            },
            "description": "The position of the first item of the page in the full list. The default is 0."
          }
        ],
        "tags": [
          "Transaction"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedTransactionList"
                },
                "examples": {
                  "Transaction": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "id": "f56d1af5-107e-4996-87b8-a9f58b3fd330",
                          "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                          "transaction_invoices": [
                            {
                              "invoice": "a3f73037-33bf-4139-8e75-0da72b9d1e33",
                              "amount": "200.00"
                            },
                            {
                              "invoice": "f23c2589-0db6-4f88-b6d8-d3237e424c52",
                              "amount": "50.00"
                            }
                          ],
                          "amount": "250.00",
                          "currency": "USD",
                          "ref": "PAY-1045",
                          "date_paid": "2026-01-10",
                          "overpayment": false,
                          "prepayment": false,
                          "amount_remaining": "0.00",
                          "status": "paid",
                          "extra_data": {
                            "cheque_number": "004512",
                            "batch_id": "B-2026-01"
                          },
                          "source": "kolleno_api",
                          "source_id": "",
                          "date_modified": "2026-01-10T12:53:55.687545Z",
                          "date_created": "2026-01-10T12:53:55.687564Z"
                        }
                      ]
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          }
        }
      },
      "post": {
        "operationId": "transaction_create",
        "description": "Create a Transaction. It will set the field `source` to `kolleno_api`\nautomatically. The Transaction belongs to the Customer of the URL.\n\nIf the Customer of the URL does not exist, or is outside the portfolios of the user,\nthe request returns **403**.\n\n**Fields**\n\n- `amount` is a string or a number. It is `0.00` by default.\n- `currency` is the 3-letter ISO code of the currency, and is required. An unknown\n  code returns 400.\n- `transaction_invoices` is a list of Invoices (UUID) and the `amount` of the\n  Transaction assigned to each Invoice (string or number). Each Invoice must belong\n  to the Customer of the URL, or the request returns 400. On an update, the list\n  replaces the existing links. If you do not send it, the links do not change.\n- `ref` is a string of up to 255 characters, the reference of the Transaction.\n- `date_paid` has the format YYYY-MM-DD, and can be null.\n- `prepayment` and `overpayment` mark the Transaction as a prepayment or an\n  overpayment. Only one of the two can be `true`. `amount_remaining` is the amount\n  that can still be credited. It must be `0` if both are `false`.\n- `extra_data` is a JSON dictionary (key-value pairs). It is `{}` by default.\n- `status` is one of `paid`, `bounced`, `voided`, `pending_application`. It is\n  `paid` by default.",
        "summary": "Create Transaction",
        "parameters": [
          {
            "in": "path",
            "name": "customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Customer the records belong to.",
            "required": true
          }
        ],
        "tags": [
          "Transaction"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionCreateRequest"
              },
              "examples": {
                "Transaction": {
                  "value": {
                    "amount": "250.00",
                    "currency": "USD",
                    "transaction_invoices": [
                      {
                        "invoice": "a3f73037-33bf-4139-8e75-0da72b9d1e33",
                        "amount": "200.00"
                      },
                      {
                        "invoice": "f23c2589-0db6-4f88-b6d8-d3237e424c52",
                        "amount": "50.00"
                      }
                    ],
                    "ref": "PAY-1045",
                    "date_paid": "2026-01-10",
                    "prepayment": false,
                    "overpayment": false,
                    "extra_data": {
                      "cheque_number": "004512"
                    },
                    "amount_remaining": "0.00",
                    "status": "paid"
                  }
                }
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                },
                "examples": {
                  "Transaction": {
                    "value": {
                      "id": "f56d1af5-107e-4996-87b8-a9f58b3fd330",
                      "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                      "transaction_invoices": [
                        {
                          "invoice": "a3f73037-33bf-4139-8e75-0da72b9d1e33",
                          "amount": "200.00"
                        },
                        {
                          "invoice": "f23c2589-0db6-4f88-b6d8-d3237e424c52",
                          "amount": "50.00"
                        }
                      ],
                      "amount": "250.00",
                      "currency": "USD",
                      "ref": "PAY-1045",
                      "date_paid": "2026-01-10",
                      "overpayment": false,
                      "prepayment": false,
                      "amount_remaining": "0.00",
                      "status": "paid",
                      "extra_data": {
                        "cheque_number": "004512",
                        "batch_id": "B-2026-01"
                      },
                      "source": "kolleno_api",
                      "source_id": "",
                      "date_modified": "2026-01-10T12:53:55.687545Z",
                      "date_created": "2026-01-10T12:53:55.687564Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "UnknownCurrency": {
                    "value": {
                      "currency": [
                        "'XYZ' is not a valid ISO."
                      ]
                    },
                    "summary": "Unknown currency"
                  },
                  "PrepaymentAndOverpayment": {
                    "value": {
                      "prepayment": [
                        "Prepayment and overpayment cannot be the same."
                      ]
                    },
                    "summary": "Prepayment and overpayment"
                  }
                }
              }
            },
            "description": "A value of the request is not valid."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          }
        }
      }
    },
    "/v1/transaction/{customer}/{id}/": {
      "get": {
        "operationId": "transaction_retrieve",
        "description": "Retrieve a specific Transaction.\n\nIf the Customer of the URL does not exist, or is outside the portfolios of the user,\nthe request returns **403**.",
        "summary": "Retrieve Transaction",
        "parameters": [
          {
            "in": "path",
            "name": "customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Customer the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Transaction.",
            "required": true
          }
        ],
        "tags": [
          "Transaction"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                },
                "examples": {
                  "Transaction": {
                    "value": {
                      "id": "f56d1af5-107e-4996-87b8-a9f58b3fd330",
                      "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                      "transaction_invoices": [
                        {
                          "invoice": "a3f73037-33bf-4139-8e75-0da72b9d1e33",
                          "amount": "200.00"
                        },
                        {
                          "invoice": "f23c2589-0db6-4f88-b6d8-d3237e424c52",
                          "amount": "50.00"
                        }
                      ],
                      "amount": "250.00",
                      "currency": "USD",
                      "ref": "PAY-1045",
                      "date_paid": "2026-01-10",
                      "overpayment": false,
                      "prepayment": false,
                      "amount_remaining": "0.00",
                      "status": "paid",
                      "extra_data": {
                        "cheque_number": "004512",
                        "batch_id": "B-2026-01"
                      },
                      "source": "kolleno_api",
                      "source_id": "",
                      "date_modified": "2026-01-10T12:53:55.687545Z",
                      "date_created": "2026-01-10T12:53:55.687564Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "RecordNotFound": {
                    "value": {
                      "detail": "No Invoice matches the given query."
                    },
                    "summary": "Record not found"
                  }
                }
              }
            },
            "description": "The record does not exist, or the user cannot see it. The `detail` names the type of the record."
          }
        }
      },
      "put": {
        "operationId": "transaction_update",
        "description": "Update a specific Transaction. A PUT request must send the fields that are\nrequired: `customer` and `currency`. The `customer` must be a Customer of the\nsame Company, or the request returns 400. The Transaction keeps its own\nCustomer.\n\nYou can only edit Transactions if `source` equals one of: `manual`, `kolleno_api`,\n`csv`. Any other source returns 400. On Transactions with `source` `csv`,\n`extra_data` cannot be updated through the API: it comes from the CSV files, and the\nnext import would overwrite it.\n\nIf the Customer of the URL does not exist, or is outside the portfolios of the user,\nthe request returns **403**.\n\n**Fields**\n\n- `amount` is a string or a number. It is `0.00` by default.\n- `currency` is the 3-letter ISO code of the currency, and is required. An unknown\n  code returns 400.\n- `transaction_invoices` is a list of Invoices (UUID) and the `amount` of the\n  Transaction assigned to each Invoice (string or number). Each Invoice must belong\n  to the Customer of the URL, or the request returns 400. On an update, the list\n  replaces the existing links. If you do not send it, the links do not change.\n- `ref` is a string of up to 255 characters, the reference of the Transaction.\n- `date_paid` has the format YYYY-MM-DD, and can be null.\n- `prepayment` and `overpayment` mark the Transaction as a prepayment or an\n  overpayment. Only one of the two can be `true`. `amount_remaining` is the amount\n  that can still be credited. It must be `0` if both are `false`.\n- `extra_data` is a JSON dictionary (key-value pairs). It is `{}` by default.\n- `status` is one of `paid`, `bounced`, `voided`, `pending_application`. It is\n  `paid` by default.",
        "summary": "Replace Transaction",
        "parameters": [
          {
            "in": "path",
            "name": "customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Customer the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Transaction.",
            "required": true
          }
        ],
        "tags": [
          "Transaction"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionRequest"
              },
              "examples": {
                "Transaction": {
                  "value": {
                    "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                    "amount": "250.00",
                    "currency": "USD",
                    "transaction_invoices": [
                      {
                        "invoice": "a3f73037-33bf-4139-8e75-0da72b9d1e33",
                        "amount": "200.00"
                      },
                      {
                        "invoice": "f23c2589-0db6-4f88-b6d8-d3237e424c52",
                        "amount": "50.00"
                      }
                    ],
                    "ref": "PAY-1045",
                    "date_paid": "2026-01-10",
                    "prepayment": false,
                    "overpayment": false,
                    "extra_data": {
                      "cheque_number": "004512"
                    },
                    "amount_remaining": "0.00",
                    "status": "paid"
                  }
                }
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                },
                "examples": {
                  "Transaction": {
                    "value": {
                      "id": "f56d1af5-107e-4996-87b8-a9f58b3fd330",
                      "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                      "transaction_invoices": [
                        {
                          "invoice": "a3f73037-33bf-4139-8e75-0da72b9d1e33",
                          "amount": "200.00"
                        },
                        {
                          "invoice": "f23c2589-0db6-4f88-b6d8-d3237e424c52",
                          "amount": "50.00"
                        }
                      ],
                      "amount": "250.00",
                      "currency": "USD",
                      "ref": "PAY-1045",
                      "date_paid": "2026-01-10",
                      "overpayment": false,
                      "prepayment": false,
                      "amount_remaining": "0.00",
                      "status": "paid",
                      "extra_data": {
                        "cheque_number": "004512",
                        "batch_id": "B-2026-01"
                      },
                      "source": "kolleno_api",
                      "source_id": "",
                      "date_modified": "2026-01-10T12:53:55.687545Z",
                      "date_created": "2026-01-10T12:53:55.687564Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "UnknownCurrency": {
                    "value": {
                      "currency": [
                        "'XYZ' is not a valid ISO."
                      ]
                    },
                    "summary": "Unknown currency"
                  },
                  "PrepaymentAndOverpayment": {
                    "value": {
                      "prepayment": [
                        "Prepayment and overpayment cannot be the same."
                      ]
                    },
                    "summary": "Prepayment and overpayment"
                  },
                  "ImportedTransaction": {
                    "value": {
                      "non_field_errors": [
                        "Transaction imported from external source cannot be updated."
                      ]
                    },
                    "summary": "Imported Transaction"
                  }
                }
              }
            },
            "description": "A value of the request is not valid, or the `source` of the Transaction does not allow the change."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "RecordNotFound": {
                    "value": {
                      "detail": "No Invoice matches the given query."
                    },
                    "summary": "Record not found"
                  }
                }
              }
            },
            "description": "The record does not exist, or the user cannot see it. The `detail` names the type of the record."
          }
        }
      },
      "patch": {
        "operationId": "transaction_partial_update",
        "description": "Update details about a specific Transaction. Send only the fields to change.\n\nYou can only edit Transactions if `source` equals one of: `manual`, `kolleno_api`,\n`csv`. Any other source returns 400. On Transactions with `source` `csv`,\n`extra_data` cannot be updated through the API: it comes from the CSV files, and the\nnext import would overwrite it.\n\nIf the Customer of the URL does not exist, or is outside the portfolios of the user,\nthe request returns **403**.\n\n**Fields**\n\n- `amount` is a string or a number. It is `0.00` by default.\n- `currency` is the 3-letter ISO code of the currency, and is required. An unknown\n  code returns 400.\n- `transaction_invoices` is a list of Invoices (UUID) and the `amount` of the\n  Transaction assigned to each Invoice (string or number). Each Invoice must belong\n  to the Customer of the URL, or the request returns 400. On an update, the list\n  replaces the existing links. If you do not send it, the links do not change.\n- `ref` is a string of up to 255 characters, the reference of the Transaction.\n- `date_paid` has the format YYYY-MM-DD, and can be null.\n- `prepayment` and `overpayment` mark the Transaction as a prepayment or an\n  overpayment. Only one of the two can be `true`. `amount_remaining` is the amount\n  that can still be credited. It must be `0` if both are `false`.\n- `extra_data` is a JSON dictionary (key-value pairs). It is `{}` by default.\n- `status` is one of `paid`, `bounced`, `voided`, `pending_application`. It is\n  `paid` by default.",
        "summary": "Update Transaction",
        "parameters": [
          {
            "in": "path",
            "name": "customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Customer the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Transaction.",
            "required": true
          }
        ],
        "tags": [
          "Transaction"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedTransactionRequest"
              },
              "examples": {
                "Transaction": {
                  "value": {
                    "amount": "250.00",
                    "currency": "USD",
                    "transaction_invoices": [
                      {
                        "invoice": "a3f73037-33bf-4139-8e75-0da72b9d1e33",
                        "amount": "200.00"
                      },
                      {
                        "invoice": "f23c2589-0db6-4f88-b6d8-d3237e424c52",
                        "amount": "50.00"
                      }
                    ],
                    "ref": "PAY-1045",
                    "date_paid": "2026-01-10",
                    "prepayment": false,
                    "overpayment": false,
                    "extra_data": {
                      "cheque_number": "004512"
                    },
                    "amount_remaining": "0.00",
                    "status": "paid"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                },
                "examples": {
                  "Transaction": {
                    "value": {
                      "id": "f56d1af5-107e-4996-87b8-a9f58b3fd330",
                      "customer": "2f00370a-fb53-4a73-a4df-ccdd22bc103b",
                      "transaction_invoices": [
                        {
                          "invoice": "a3f73037-33bf-4139-8e75-0da72b9d1e33",
                          "amount": "200.00"
                        },
                        {
                          "invoice": "f23c2589-0db6-4f88-b6d8-d3237e424c52",
                          "amount": "50.00"
                        }
                      ],
                      "amount": "250.00",
                      "currency": "USD",
                      "ref": "PAY-1045",
                      "date_paid": "2026-01-10",
                      "overpayment": false,
                      "prepayment": false,
                      "amount_remaining": "0.00",
                      "status": "paid",
                      "extra_data": {
                        "cheque_number": "004512",
                        "batch_id": "B-2026-01"
                      },
                      "source": "kolleno_api",
                      "source_id": "",
                      "date_modified": "2026-01-10T12:53:55.687545Z",
                      "date_created": "2026-01-10T12:53:55.687564Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "UnknownCurrency": {
                    "value": {
                      "currency": [
                        "'XYZ' is not a valid ISO."
                      ]
                    },
                    "summary": "Unknown currency"
                  },
                  "PrepaymentAndOverpayment": {
                    "value": {
                      "prepayment": [
                        "Prepayment and overpayment cannot be the same."
                      ]
                    },
                    "summary": "Prepayment and overpayment"
                  },
                  "ImportedTransaction": {
                    "value": {
                      "non_field_errors": [
                        "Transaction imported from external source cannot be updated."
                      ]
                    },
                    "summary": "Imported Transaction"
                  }
                }
              }
            },
            "description": "A value of the request is not valid, or the `source` of the Transaction does not allow the change."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "RecordNotFound": {
                    "value": {
                      "detail": "No Invoice matches the given query."
                    },
                    "summary": "Record not found"
                  }
                }
              }
            },
            "description": "The record does not exist, or the user cannot see it. The `detail` names the type of the record."
          }
        }
      },
      "delete": {
        "operationId": "transaction_destroy",
        "description": "Permanently delete a specific Transaction. You can only delete Transactions if\n`source` equals one of: `manual`, `kolleno_api`, `csv`. Any other source returns\n400.\n\nIf the Customer of the URL does not exist, or is outside the portfolios of the user,\nthe request returns **403**.",
        "summary": "Delete Transaction",
        "parameters": [
          {
            "in": "path",
            "name": "customer",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Customer the records belong to.",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Transaction.",
            "required": true
          }
        ],
        "tags": [
          "Transaction"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The key is the name of a field, or `non_field_errors`. The value is a list of messages. For a nested field, the value is an object with the same shape, keyed by the field or the list position.",
                  "additionalProperties": {}
                },
                "examples": {
                  "ImportedTransaction": {
                    "value": {
                      "non_field_errors": [
                        "Transaction imported from external source cannot be deleted."
                      ]
                    },
                    "summary": "Imported Transaction"
                  }
                }
              }
            },
            "description": "The `source` of the Transaction does not allow the deletion."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDetail"
                },
                "examples": {
                  "RecordNotFound": {
                    "value": {
                      "detail": "No Invoice matches the given query."
                    },
                    "summary": "Record not found"
                  }
                }
              }
            },
            "description": "The record does not exist, or the user cannot see it. The `detail` names the type of the record."
          }
        }
      }
    },
    "/v1/workflow/{company}/": {
      "get": {
        "operationId": "workflow_list",
        "description": "Retrieve the Workflows in a given Company that are not deleted. Ordered by `name`.\n\nUse it to get the name of the `workflow` of an email sent (see **Email Sent**).",
        "summary": "List Workflows",
        "parameters": [
          {
            "in": "path",
            "name": "company",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID of the Company the records belong to.",
            "required": true
          },
          {
            "in": "query",
            "name": "is_active",
            "schema": {
              "type": "boolean"
            },
            "description": "Filter to get only the active (`true`) or inactive (`false`) Workflows. Any other value is ignored."
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            },
            "description": "The maximum number of items in the page. The default is 200."
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer"
            },
            "description": "The position of the first item of the page in the full list. The default is 0."
          }
        ],
        "tags": [
          "Workflow"
        ],
        "security": [
          {
            "KollenoApiKey": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedWorkflowList"
                },
                "examples": {
                  "Workflow": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "id": "8ec8c055-a2c4-4866-8688-8b610cd8ad37",
                          "name": "Overdue chasing",
                          "level": "invoice_level",
                          "is_active": true
                        }
                      ]
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "NoPermission": {
                    "value": {
                      "detail": "You do not have permission to perform this action."
                    },
                    "summary": "No permission"
                  },
                  "NoAPIKey": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    },
                    "summary": "No API key"
                  },
                  "IPAddressNotAllowed": {
                    "value": {
                      "detail": "Requests to this API are not permitted from this IP address."
                    },
                    "summary": "IP address not allowed"
                  }
                }
              }
            },
            "description": "The API key is missing or not accepted, the user has no access to the Company or to the record, or the IP allowlist of the Company refused the address. On some routes, an ID in the URL that does not exist also gives 403."
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "Two-factorAuthenticationRequired": {
                    "value": {
                      "detail": "Two Factor Authentication setup required."
                    },
                    "summary": "Two-factor authentication required"
                  }
                }
              }
            },
            "description": "The Company requires two-factor authentication, and the user of the API key did not set it up."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "RateLimitReached": {
                    "value": {
                      "detail": "Request was throttled. Expected available in 43 seconds."
                    },
                    "summary": "Rate limit reached"
                  }
                }
              }
            },
            "description": "The Company reached its rate limit. The `Retry-After` header holds the number of seconds to wait."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AccountTransactionMatch": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "amount": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,12}(?:\\.\\d{0,2})?$"
          },
          "currency": {
            "type": "string",
            "readOnly": true,
            "description": "The 3-letter ISO code of the currency of the bank transaction."
          },
          "reference": {
            "type": "string",
            "maxLength": 100
          },
          "date_paid": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When the bank received the payment."
          },
          "description": {
            "type": "string",
            "readOnly": true,
            "description": "The description that the bank sent."
          }
        },
        "required": [
          "currency",
          "date_paid",
          "description",
          "id"
        ]
      },
      "AutomationLevelEnum": {
        "enum": [
          "call_level",
          "credit_note_level",
          "custom_form_submission_level",
          "custom_object_level",
          "custom_record_level",
          "customer_group_level",
          "customer_level",
          "email_received_level",
          "email_sent_level",
          "file_upload_level",
          "invoice_level",
          "note_level",
          "person_level",
          "payment_charge_level",
          "payment_plan_level",
          "text_message_sent_level",
          "transaction_level"
        ],
        "type": "string",
        "description": "* `call_level` - Call Level\n* `credit_note_level` - Credit Note Level\n* `custom_form_submission_level` - Form Submission Level\n* `custom_object_level` - Custom Object Level\n* `custom_record_level` - Custom Record Level\n* `customer_group_level` - Customer Group Level\n* `customer_level` - Customer Level\n* `email_received_level` - Email Received Level\n* `email_sent_level` - Email Sent Level\n* `file_upload_level` - File Upload Level\n* `invoice_level` - Invoice Level\n* `note_level` - Note Level\n* `person_level` - Person Level\n* `payment_charge_level` - Payment Charge Level\n* `payment_plan_level` - Payment Plan Level\n* `text_message_sent_level` - Text Message Sent Level\n* `transaction_level` - Transaction Level"
      },
      "BlankEnum": {
        "enum": [
          ""
        ]
      },
      "CardDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "customer": {
            "type": "string",
            "format": "uuid"
          },
          "card_issuer": {
            "type": "string",
            "maxLength": 80
          },
          "card_number_mask": {
            "type": "string",
            "maxLength": 20
          },
          "exp_month": {
            "type": "string",
            "description": "The month of expiry for the date.",
            "maxLength": 2
          },
          "exp_year": {
            "type": "string",
            "description": "The year of expiry for the date.",
            "maxLength": 2
          },
          "country": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "UUID of the Country of the card in Kolleno, not its ISO code. Null if the payment provider gave no country."
          },
          "source": {
            "$ref": "#/components/schemas/CardDetailSourceEnum"
          },
          "source_id": {
            "type": "string",
            "maxLength": 255
          },
          "is_valid": {
            "type": "boolean",
            "description": "Can this card be charged?"
          },
          "date_created": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "card_issuer",
          "card_number_mask",
          "customer",
          "date_created",
          "id",
          "source_id"
        ]
      },
      "CardDetailSourceEnum": {
        "enum": [
          "adyen",
          "fidelity",
          "fortis",
          "nuvei",
          "stripe"
        ],
        "type": "string",
        "description": "* `adyen` - Adyen\n* `fidelity` - Fidelity\n* `fortis` - Fortis\n* `nuvei` - Nuvei\n* `stripe` - Stripe"
      },
      "CarrierTypeEnum": {
        "enum": [
          "mobile",
          "landline",
          "voip",
          "undefined"
        ],
        "type": "string",
        "description": "* `mobile` - mobile\n* `landline` - landline\n* `voip` - voip\n* `undefined` - undefined"
      },
      "ChannelEnum": {
        "enum": [
          "email",
          "text_message"
        ],
        "type": "string",
        "description": "* `email` - Email\n* `text_message` - Text Message"
      },
      "Company": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "readOnly": true
          },
          "address_line_1": {
            "type": "string",
            "readOnly": true
          },
          "address_line_2": {
            "type": "string",
            "readOnly": true
          },
          "postal_code": {
            "type": "string",
            "readOnly": true
          },
          "city": {
            "type": "string",
            "readOnly": true
          },
          "country": {
            "type": "string",
            "readOnly": true,
            "description": "The ISO code of the country (2 characters), or an empty string."
          },
          "currency": {
            "type": "string",
            "readOnly": true,
            "description": "The ISO code of the currency (3 characters), or an empty string."
          },
          "date_modified": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "date_created": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "address_line_1",
          "address_line_2",
          "city",
          "country",
          "currency",
          "date_created",
          "date_modified",
          "id",
          "name",
          "postal_code"
        ]
      },
      "CreditNoteCreateRequest": {
        "type": "object",
        "properties": {
          "credit_note_invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreditNoteInvoiceRequest"
            },
            "description": "List of objects with invoice ID and amount assigned"
          },
          "amount": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,12}(?:\\.\\d{0,2})?$"
          },
          "amount_remaining": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,12}(?:\\.\\d{0,2})?$",
            "description": "The amount not allocated to Invoices and Transactions in the case of Quickbooks."
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3
          },
          "ref": {
            "type": "string",
            "description": "Credit Note's reference",
            "maxLength": 255
          },
          "date_issued": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "List of Tag UUIDs (see the Tag endpoints). The list replaces all the tags of the Credit Note, and an empty list removes them all. If you do not send `tags`, the tags do not change. A Tag of another Company, or a deleted Tag, returns 400."
          }
        },
        "required": [
          "currency"
        ]
      },
      "CreditNoteInvoice": {
        "type": "object",
        "properties": {
          "invoice": {
            "type": "string",
            "format": "uuid"
          },
          "amount": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,12}(?:\\.\\d{0,2})?$"
          }
        },
        "required": [
          "invoice"
        ]
      },
      "CreditNoteInvoiceRequest": {
        "type": "object",
        "properties": {
          "invoice": {
            "type": "string",
            "format": "uuid"
          },
          "amount": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,12}(?:\\.\\d{0,2})?$"
          }
        },
        "required": [
          "invoice"
        ]
      },
      "CreditNote": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "customer": {
            "type": "string",
            "format": "uuid"
          },
          "credit_note_invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreditNoteInvoice"
            },
            "description": "List of objects with invoice ID and amount assigned"
          },
          "amount": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,12}(?:\\.\\d{0,2})?$"
          },
          "amount_remaining": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,12}(?:\\.\\d{0,2})?$",
            "description": "The amount not allocated to Invoices and Transactions in the case of Quickbooks."
          },
          "currency": {
            "type": "string",
            "maxLength": 3,
            "minLength": 3
          },
          "ref": {
            "type": "string",
            "description": "Credit Note's reference",
            "maxLength": 255
          },
          "date_issued": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tag"
            },
            "readOnly": true
          },
          "source": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UpdateFieldSourceEnum"
              }
            ],
            "readOnly": true
          },
          "source_id": {
            "type": "string",
            "readOnly": true,
            "description": "The ID from the source it was imported from"
          },
          "date_modified": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "date_created": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "currency",
          "customer",
          "date_created",
          "date_modified",
          "id",
          "source",
          "source_id",
          "tags"
        ]
      },
      "CreditNoteUpdateRequest": {
        "type": "object",
        "properties": {
          "customer": {
            "type": "string",
            "format": "uuid"
          },
          "credit_note_invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreditNoteInvoiceRequest"
            },
            "description": "List of objects with invoice ID and amount assigned"
          },
          "amount": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,12}(?:\\.\\d{0,2})?$"
          },
          "amount_remaining": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,12}(?:\\.\\d{0,2})?$",
            "description": "The amount not allocated to Invoices and Transactions in the case of Quickbooks."
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3
          },
          "ref": {
            "type": "string",
            "description": "Credit Note's reference",
            "maxLength": 255
          },
          "date_issued": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "List of Tag UUIDs (see the Tag endpoints). The list replaces all the tags of the Credit Note, and an empty list removes them all. If you do not send `tags`, the tags do not change. A Tag of another Company, or a deleted Tag, returns 400."
          }
        },
        "required": [
          "currency",
          "customer"
        ]
      },
      "Customer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "address_line_1": {
            "type": "string",
            "maxLength": 255
          },
          "address_line_2": {
            "type": "string",
            "maxLength": 255
          },
          "postal_code": {
            "type": "string",
            "maxLength": 255
          },
          "city": {
            "type": "string",
            "maxLength": 255
          },
          "state": {
            "type": "string",
            "maxLength": 255
          },
          "country": {
            "type": "string",
            "readOnly": true,
            "description": "The ISO code of the country (2 characters), or an empty string."
          },
          "ref": {
            "type": "string",
            "description": "Customer's reference. Used by users in some systems, often different than the external system ID.",
            "maxLength": 255
          },
          "currency": {
            "type": "string",
            "readOnly": true,
            "description": "The ISO code of the currency (3 characters), or an empty string."
          },
          "balance": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,12}(?:\\.\\d{0,2})?$",
            "readOnly": true
          },
          "pause_chasing": {
            "type": "boolean",
            "description": "Whether we should stop contacting that customer"
          },
          "warning_level": {
            "type": "integer",
            "maximum": 10,
            "minimum": 0,
            "description": "When user wants to manually classify a Customer in a risk group / notify warning have been sent."
          },
          "extra_data": {
            "type": "object",
            "additionalProperties": {},
            "readOnly": true,
            "description": "Store extra data about this customer"
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tag"
            },
            "readOnly": true
          },
          "source": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UpdateFieldSourceEnum"
              }
            ],
            "readOnly": true,
            "default": "manual"
          },
          "source_id": {
            "type": "string",
            "default": "",
            "description": "The ID from the source it was imported from"
          },
          "date_modified": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "date_created": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "gocardless_customer_id": {
            "type": "string",
            "description": "Only with `gocardless_customer_id` in `?extra_fields=` or `?fields=`. The ID of the Customer in GoCardless, or an empty string."
          },
          "has_direct_debit_detail": {
            "type": "boolean",
            "description": "Only with `has_direct_debit_detail` in `?extra_fields=` or `?fields=`. Whether the Customer has a direct debit set up."
          },
          "bank_account_setup_url": {
            "type": "string",
            "format": "uri",
            "description": "Only with `bank_account_setup_url` in `?extra_fields=` or `?fields=`. The URL where the Customer sets up a direct debit."
          }
        },
        "required": [
          "balance",
          "country",
          "currency",
          "date_created",
          "date_modified",
          "extra_data",
          "id",
          "name",
          "source",
          "tags"
        ]
      },
      "CustomerCreateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "address_line_1": {
            "type": "string",
            "maxLength": 255
          },
          "address_line_2": {
            "type": "string",
            "maxLength": 255
          },
          "postal_code": {
            "type": "string",
            "maxLength": 255
          },
          "city": {
            "type": "string",
            "maxLength": 255
          },
          "state": {
            "type": "string",
            "maxLength": 255
          },
          "country": {
            "type": "string",
            "description": "The ISO code of the country: 2 upper-case letters, for example `GB`. An empty string removes the country. An unknown code returns 400.",
            "maxLength": 2
          },
          "ref": {
            "type": "string",
            "description": "Customer's reference. Used by users in some systems, often different than the external system ID.",
            "maxLength": 255
          },
          "currency": {
            "type": "string",
            "description": "The ISO code of the currency: 3 upper-case letters, for example `GBP`. An empty string removes the currency. An unknown code returns 400.",
            "maxLength": 3
          },
          "pause_chasing": {
            "type": "boolean",
            "description": "Whether we should stop contacting that customer"
          },
          "warning_level": {
            "type": "integer",
            "maximum": 10,
            "minimum": 0,
            "description": "When user wants to manually classify a Customer in a risk group / notify warning have been sent."
          },
          "extra_data": {
            "type": "object",
            "additionalProperties": {},
            "description": "A JSON object with any data that you want to keep with the Customer. Any other JSON type, or null, returns 400."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "List of Tag UUIDs (see the Tag endpoints). The list replaces all the tags of the Customer, and an empty list removes them all. If you do not send `tags`, the tags do not change. A Tag of another Company, or a deleted Tag, returns 400."
          },
          "source_id": {
            "type": "string",
            "description": "The ID of the Customer in your system. It is unique in the Company for each `source`: a `source_id` that another Customer of the same `source` has returns 400. On PUT, if you do not send it, it becomes an empty string.",
            "maxLength": 255
          }
        },
        "required": [
          "name"
        ]
      },
      "CustomerListItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "address_line_1": {
            "type": "string",
            "maxLength": 255
          },
          "address_line_2": {
            "type": "string",
            "maxLength": 255
          },
          "postal_code": {
            "type": "string",
            "maxLength": 255
          },
          "city": {
            "type": "string",
            "maxLength": 255
          },
          "state": {
            "type": "string",
            "maxLength": 255
          },
          "country": {
            "type": "string",
            "description": "The ISO code of the country (2 characters), or an empty string."
          },
          "ref": {
            "type": "string",
            "description": "Customer's reference. Used by users in some systems, often different than the external system ID.",
            "maxLength": 255
          },
          "currency": {
            "type": "string",
            "description": "The ISO code of the currency (3 characters), or an empty string."
          },
          "balance": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,12}(?:\\.\\d{0,2})?$"
          },
          "pause_chasing": {
            "type": "boolean",
            "description": "Whether we should stop contacting that customer"
          },
          "warning_level": {
            "type": "integer",
            "maximum": 10,
            "minimum": 0,
            "description": "When user wants to manually classify a Customer in a risk group / notify warning have been sent."
          },
          "extra_data": {
            "type": "object",
            "additionalProperties": {},
            "description": "Store extra data about this customer"
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tag"
            }
          },
          "source": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UpdateFieldSourceEnum"
              }
            ],
            "default": "manual"
          },
          "source_id": {
            "type": "string",
            "default": "",
            "description": "The ID from the source it was imported from"
          },
          "date_modified": {
            "type": "string",
            "format": "date-time"
          },
          "date_created": {
            "type": "string",
            "format": "date-time"
          },
          "gocardless_customer_id": {
            "type": "string",
            "description": "Only with `gocardless_customer_id` in `?extra_fields=` or `?fields=`. The ID of the Customer in GoCardless, or an empty string."
          },
          "has_direct_debit_detail": {
            "type": "boolean",
            "description": "Only with `has_direct_debit_detail` in `?extra_fields=` or `?fields=`. Whether the Customer has a direct debit set up."
          },
          "bank_account_setup_url": {
            "type": "string",
            "format": "uri",
            "description": "Only with `bank_account_setup_url` in `?extra_fields=` or `?fields=`. The URL where the Customer sets up a direct debit."
          }
        },
        "required": [
          "id"
        ]
      },
      "CustomerPortal": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "customer_portal_url": {
            "type": "string",
            "format": "uri",
            "readOnly": true,
            "description": "The URL of the Customer Portal of the Customer."
          }
        },
        "required": [
          "customer_portal_url",
          "id"
        ]
      },
      "CustomerUpdateRequest": {
        "type": "object",
        "properties": {
          "company": {
            "type": "string",
            "format": "uuid",
            "writeOnly": true,
            "description": "The UUID of the Company of the URL. Required on PUT. Any other value returns 400."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "address_line_1": {
            "type": "string",
            "maxLength": 255
          },
          "address_line_2": {
            "type": "string",
            "maxLength": 255
          },
          "postal_code": {
            "type": "string",
            "maxLength": 255
          },
          "city": {
            "type": "string",
            "maxLength": 255
          },
          "state": {
            "type": "string",
            "maxLength": 255
          },
          "country": {
            "type": "string",
            "description": "The ISO code of the country: 2 upper-case letters, for example `GB`. An empty string removes the country. An unknown code returns 400.",
            "maxLength": 2
          },
          "ref": {
            "type": "string",
            "description": "Customer's reference. Used by users in some systems, often different than the external system ID.",
            "maxLength": 255
          },
          "currency": {
            "type": "string",
            "description": "The ISO code of the currency: 3 upper-case letters, for example `GBP`. An empty string removes the currency. An unknown code returns 400.",
            "maxLength": 3
          },
          "pause_chasing": {
            "type": "boolean",
            "description": "Whether we should stop contacting that customer"
          },
          "warning_level": {
            "type": "integer",
            "maximum": 10,
            "minimum": 0,
            "description": "When user wants to manually classify a Customer in a risk group / notify warning have been sent."
          },
          "extra_data": {
            "type": "object",
            "additionalProperties": {},
            "description": "A JSON object with any data that you want to keep with the Customer. Any other JSON type, or null, returns 400."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "List of Tag UUIDs (see the Tag endpoints). The list replaces all the tags of the Customer, and an empty list removes them all. If you do not send `tags`, the tags do not change. A Tag of another Company, or a deleted Tag, returns 400."
          },
          "source_id": {
            "type": "string",
            "description": "The ID of the Customer in your system. It is unique in the Company for each `source`: a `source_id` that another Customer of the same `source` has returns 400. On PUT, if you do not send it, it becomes an empty string.",
            "maxLength": 255
          }
        },
        "required": [
          "company",
          "name"
        ]
      },
      "DirectDebitDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "customer": {
            "type": "string",
            "format": "uuid"
          },
          "country": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "UUID of the Country of the bank account in Kolleno, not its ISO code. Null if the payment provider gave no country."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "UUID of the Currency of the mandate in Kolleno, not its ISO code. Null if the payment provider gave no currency. With GoCardless, all the payments of the mandate are in this currency."
          },
          "bank_name": {
            "type": "string",
            "maxLength": 80
          },
          "account_type": {
            "type": "string",
            "maxLength": 128
          },
          "account_holder_name": {
            "type": "string",
            "maxLength": 255
          },
          "account_number_ending": {
            "type": "string",
            "maxLength": 4
          },
          "mandate_ref": {
            "type": "string",
            "description": "The reference of the mandate visible to both the customer and merchant.",
            "maxLength": 128
          },
          "mandate_scheme": {
            "type": "string",
            "description": "Bank payment scheme to which this mandate and associated payments are submitted.",
            "maxLength": 128
          },
          "mandate_status": {
            "$ref": "#/components/schemas/MandateStatusEnum"
          },
          "next_possible_charge_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The earliest date that can be used as a charge_date on any newly created payment for this mandate."
          },
          "payments_require_approval": {
            "type": "boolean",
            "description": "Whether payments under this mandate require approval via an automated email before being processed."
          },
          "source": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DirectDebitDetailSourceEnum"
              },
              {
                "$ref": "#/components/schemas/BlankEnum"
              }
            ]
          },
          "source_id": {
            "type": "string",
            "description": "The primary key of the mandate from the source.",
            "maxLength": 255
          },
          "date_created": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "customer",
          "date_created",
          "id"
        ]
      },
      "DirectDebitDetailSourceEnum": {
        "enum": [
          "bottomline",
          "fortis",
          "gocardless",
          "nuvei",
          "stripe"
        ],
        "type": "string",
        "description": "* `bottomline` - Bottomline\n* `fortis` - Fortis\n* `gocardless` - GoCardless\n* `nuvei` - Nuvei\n* `stripe` - Stripe"
      },
      "EmailSent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "customer": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "step": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true
          },
          "invoices": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "readOnly": true
          },
          "email_address_from": {
            "type": "string",
            "format": "email",
            "maxLength": 254
          },
          "name_from": {
            "type": "string",
            "maxLength": 255
          },
          "to_recipients": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "email_address": {
                  "type": "string",
                  "format": "email"
                }
              }
            },
            "description": "The recipients of the email."
          },
          "cc_recipients": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "email_address": {
                  "type": "string",
                  "format": "email"
                }
              }
            },
            "description": "The recipients in copy (Cc)."
          },
          "bcc_recipients": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "email_address": {
                  "type": "string",
                  "format": "email"
                }
              }
            },
            "description": "The recipients in blind copy (Bcc)."
          },
          "subject": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/EmailSentStatusEnum"
          },
          "workflow": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "If it was sent automatically by a Workflow (parent of the Node)."
          },
          "template": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The template the body was rendered from, when sent by a Node."
          },
          "date_sent": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "date_created": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "body": {
            "type": "string",
            "description": "The HTML of the email. Only with `?extra_fields=body`."
          },
          "body_text": {
            "type": "string",
            "description": "The plain text of the email. Only with `?extra_fields=body_text`."
          }
        },
        "required": [
          "bcc_recipients",
          "cc_recipients",
          "date_created",
          "email_address_from",
          "id",
          "invoices",
          "step",
          "to_recipients"
        ]
      },
      "EmailSentStatusEnum": {
        "enum": [
          "draft",
          "scheduled",
          "sending",
          "delivered",
          "read",
          "read_clicked",
          "bounced",
          "complained",
          "error",
          "error_retrying_sending"
        ],
        "type": "string",
        "description": "* `draft` - Draft\n* `scheduled` - Scheduled\n* `sending` - Sending\n* `delivered` - Delivered\n* `read` - Read\n* `read_clicked` - Read and Clicked\n* `bounced` - Bounced\n* `complained` - Complained\n* `error` - Error\n* `error_retrying_sending` - Error and Retrying Sending"
      },
      "ErrorDetail": {
        "type": "object",
        "properties": {
          "detail": {
            "type": "string"
          }
        },
        "required": [
          "detail"
        ]
      },
      "ExtensionEnum": {
        "enum": [
          "csv",
          "pdf",
          "xlsx"
        ],
        "type": "string",
        "description": "* `csv` - CSV\n* `pdf` - PDF\n* `xlsx` - Excel"
      },
      "FrequencyEnum": {
        "enum": [
          "daily",
          "weekly",
          "monthly"
        ],
        "type": "string",
        "description": "* `daily` - Daily\n* `weekly` - Weekly\n* `monthly` - Monthly"
      },
      "GenderEnum": {
        "enum": [
          "m",
          "f"
        ],
        "type": "string",
        "description": "* `m` - Male\n* `f` - Female"
      },
      "Invoice": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "customer": {
            "type": "string",
            "format": "uuid"
          },
          "amount": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,12}(?:\\.\\d{0,2})?$"
          },
          "balance": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,12}(?:\\.\\d{0,2})?$"
          },
          "currency": {
            "type": "string",
            "maxLength": 3,
            "minLength": 3
          },
          "ref": {
            "type": "string",
            "description": "Invoice's reference",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "description": "Short description describing the invoice.",
            "maxLength": 255
          },
          "payment_status": {
            "$ref": "#/components/schemas/InvoicePaymentStatusEnum"
          },
          "date_invoice": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "date_due": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "date_promise_to_pay_valid": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "readOnly": true,
            "description": "If a valid promise to pay is assigned to the invoice, record the date it is promsied to be paid."
          },
          "pause_chasing": {
            "type": "boolean",
            "description": "Whether we should stop chasing this invoice"
          },
          "extra_data": {
            "description": "Store extra data about this invoice"
          },
          "persons": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "List of person UUIDs that are assigned to this invoice."
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tag"
            },
            "readOnly": true
          },
          "source": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UpdateFieldSourceEnum"
              }
            ],
            "readOnly": true
          },
          "source_id": {
            "type": "string",
            "description": "The ID from the source it was imported from",
            "maxLength": 255
          },
          "date_modified": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "date_created": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "currency",
          "customer",
          "date_created",
          "date_modified",
          "date_promise_to_pay_valid",
          "id",
          "source",
          "tags"
        ]
      },
      "InvoicePaymentStatusEnum": {
        "enum": [
          "paid",
          "partially_paid",
          "paid_pending_confirmation",
          "payment_scheduled",
          "installments",
          "open",
          "dispute",
          "draft",
          "closed",
          "hold_back",
          "bad_debt",
          "credited"
        ],
        "type": "string",
        "description": "* `paid` - Paid\n* `partially_paid` - Partially Paid\n* `paid_pending_confirmation` - Paid - Pending Confirmation\n* `payment_scheduled` - Payment Scheduled\n* `installments` - Installments\n* `open` - Unpaid\n* `dispute` - Dispute\n* `draft` - Draft\n* `closed` - Closed\n* `hold_back` - Hold Back\n* `bad_debt` - Bad Debt\n* `credited` - Credited"
      },
      "InvoicePdf": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "invoice": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "readOnly": true
          },
          "extension": {
            "type": "string",
            "readOnly": true
          },
          "size": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": 0
          },
          "date_created": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "date_created",
          "extension",
          "id",
          "invoice",
          "name"
        ]
      },
      "InvoiceRequest": {
        "type": "object",
        "properties": {
          "customer": {
            "type": "string",
            "format": "uuid"
          },
          "amount": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,12}(?:\\.\\d{0,2})?$"
          },
          "balance": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,12}(?:\\.\\d{0,2})?$"
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3
          },
          "ref": {
            "type": "string",
            "description": "Invoice's reference",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "description": "Short description describing the invoice.",
            "maxLength": 255
          },
          "payment_status": {
            "$ref": "#/components/schemas/InvoicePaymentStatusEnum"
          },
          "date_invoice": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "date_due": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "pause_chasing": {
            "type": "boolean",
            "description": "Whether we should stop chasing this invoice"
          },
          "extra_data": {
            "description": "Store extra data about this invoice"
          },
          "persons": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "List of person UUIDs that are assigned to this invoice."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "List of Tag UUIDs (see the Tag endpoints). The list replaces all the tags of the Invoice, and an empty list removes them all. If you do not send `tags`, the tags do not change. A Tag of another Company, or a deleted Tag, returns 400."
          },
          "source_id": {
            "type": "string",
            "description": "The ID from the source it was imported from",
            "maxLength": 255
          }
        },
        "required": [
          "currency",
          "customer"
        ]
      },
      "MandateStatusEnum": {
        "enum": [
          "active",
          "inactive",
          "pending"
        ],
        "type": "string",
        "description": "* `active` - Active\n* `inactive` - Inactive\n* `pending` - Pending"
      },
      "Match": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "customer": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true,
            "description": "UUID of the Customer of the Match. Null if the Match has no Customer."
          },
          "account": {
            "type": "string",
            "format": "uuid",
            "readOnly": true,
            "description": "The account that the match is associated with."
          },
          "account_transaction": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AccountTransactionMatch"
              }
            ],
            "readOnly": true,
            "description": "The bank transaction of the Match."
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MatchStatusEnum"
              }
            ],
            "readOnly": true
          },
          "date_created": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "date_modified": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "account",
          "account_transaction",
          "customer",
          "date_created",
          "date_modified",
          "id",
          "status"
        ]
      },
      "MatchStatusEnum": {
        "enum": [
          "matched",
          "confirmed",
          "sync_incomplete",
          "reconciled"
        ],
        "type": "string",
        "description": "* `matched` - Matched\n* `confirmed` - Confirmed\n* `sync_incomplete` - Sync Incomplete\n* `reconciled` - Reconciled"
      },
      "NotFoundDetail": {
        "type": "object",
        "properties": {
          "detail": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          }
        },
        "required": [
          "detail"
        ]
      },
      "PaginatedCardDetailList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer"
          },
          "next": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "previous": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CardDetail"
            }
          }
        }
      },
      "PaginatedCompanyList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer"
          },
          "next": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "previous": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Company"
            }
          }
        }
      },
      "PaginatedCreditNoteList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer"
          },
          "next": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "previous": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreditNote"
            }
          }
        }
      },
      "PaginatedCustomerListItemList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer"
          },
          "next": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "previous": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomerListItem"
            }
          }
        }
      },
      "PaginatedDirectDebitDetailList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer"
          },
          "next": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "previous": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DirectDebitDetail"
            }
          }
        }
      },
      "PaginatedEmailSentList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer"
          },
          "next": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "previous": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmailSent"
            }
          }
        }
      },
      "PaginatedInvoiceList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer"
          },
          "next": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "previous": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Invoice"
            }
          }
        }
      },
      "PaginatedInvoicePdfList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer"
          },
          "next": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "previous": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoicePdf"
            }
          }
        }
      },
      "PaginatedMatchList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer"
          },
          "next": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "previous": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Match"
            }
          }
        }
      },
      "PaginatedPersonList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer"
          },
          "next": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "previous": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Person"
            }
          }
        }
      },
      "PaginatedPositionExternalList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer"
          },
          "next": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "previous": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PositionExternal"
            }
          }
        }
      },
      "PaginatedReportFileList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer"
          },
          "next": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "previous": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportFile"
            }
          }
        }
      },
      "PaginatedReportScheduleList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer"
          },
          "next": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "previous": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportSchedule"
            }
          }
        }
      },
      "PaginatedReportTypeList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer"
          },
          "next": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "previous": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportType"
            }
          }
        }
      },
      "PaginatedStepList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer"
          },
          "next": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "previous": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Step"
            }
          }
        }
      },
      "PaginatedTagCategoryList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer"
          },
          "next": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "previous": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TagCategory"
            }
          }
        }
      },
      "PaginatedTagList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer"
          },
          "next": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "previous": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tag"
            }
          }
        }
      },
      "PaginatedTemplateList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer"
          },
          "next": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "previous": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Template"
            }
          }
        }
      },
      "PaginatedTransactionList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer"
          },
          "next": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "previous": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Transaction"
            }
          }
        }
      },
      "PaginatedWorkflowList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer"
          },
          "next": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "previous": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Workflow"
            }
          }
        }
      },
      "PatchedCreditNoteUpdateRequest": {
        "type": "object",
        "properties": {
          "customer": {
            "type": "string",
            "format": "uuid"
          },
          "credit_note_invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreditNoteInvoiceRequest"
            },
            "description": "List of objects with invoice ID and amount assigned"
          },
          "amount": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,12}(?:\\.\\d{0,2})?$"
          },
          "amount_remaining": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,12}(?:\\.\\d{0,2})?$",
            "description": "The amount not allocated to Invoices and Transactions in the case of Quickbooks."
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3
          },
          "ref": {
            "type": "string",
            "description": "Credit Note's reference",
            "maxLength": 255
          },
          "date_issued": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "List of Tag UUIDs (see the Tag endpoints). The list replaces all the tags of the Credit Note, and an empty list removes them all. If you do not send `tags`, the tags do not change. A Tag of another Company, or a deleted Tag, returns 400."
          }
        }
      },
      "PatchedCustomerUpdateRequest": {
        "type": "object",
        "properties": {
          "company": {
            "type": "string",
            "format": "uuid",
            "writeOnly": true,
            "description": "The UUID of the Company of the URL. Required on PUT. Any other value returns 400."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "address_line_1": {
            "type": "string",
            "maxLength": 255
          },
          "address_line_2": {
            "type": "string",
            "maxLength": 255
          },
          "postal_code": {
            "type": "string",
            "maxLength": 255
          },
          "city": {
            "type": "string",
            "maxLength": 255
          },
          "state": {
            "type": "string",
            "maxLength": 255
          },
          "country": {
            "type": "string",
            "description": "The ISO code of the country: 2 upper-case letters, for example `GB`. An empty string removes the country. An unknown code returns 400.",
            "maxLength": 2
          },
          "ref": {
            "type": "string",
            "description": "Customer's reference. Used by users in some systems, often different than the external system ID.",
            "maxLength": 255
          },
          "currency": {
            "type": "string",
            "description": "The ISO code of the currency: 3 upper-case letters, for example `GBP`. An empty string removes the currency. An unknown code returns 400.",
            "maxLength": 3
          },
          "pause_chasing": {
            "type": "boolean",
            "description": "Whether we should stop contacting that customer"
          },
          "warning_level": {
            "type": "integer",
            "maximum": 10,
            "minimum": 0,
            "description": "When user wants to manually classify a Customer in a risk group / notify warning have been sent."
          },
          "extra_data": {
            "type": "object",
            "additionalProperties": {},
            "description": "A JSON object with any data that you want to keep with the Customer. Any other JSON type, or null, returns 400."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "List of Tag UUIDs (see the Tag endpoints). The list replaces all the tags of the Customer, and an empty list removes them all. If you do not send `tags`, the tags do not change. A Tag of another Company, or a deleted Tag, returns 400."
          },
          "source_id": {
            "type": "string",
            "description": "The ID of the Customer in your system. It is unique in the Company for each `source`: a `source_id` that another Customer of the same `source` has returns 400. On PUT, if you do not send it, it becomes an empty string.",
            "maxLength": 255
          }
        }
      },
      "PatchedInvoiceRequest": {
        "type": "object",
        "properties": {
          "customer": {
            "type": "string",
            "format": "uuid"
          },
          "amount": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,12}(?:\\.\\d{0,2})?$"
          },
          "balance": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,12}(?:\\.\\d{0,2})?$"
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3
          },
          "ref": {
            "type": "string",
            "description": "Invoice's reference",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "description": "Short description describing the invoice.",
            "maxLength": 255
          },
          "payment_status": {
            "$ref": "#/components/schemas/InvoicePaymentStatusEnum"
          },
          "date_invoice": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "date_due": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "pause_chasing": {
            "type": "boolean",
            "description": "Whether we should stop chasing this invoice"
          },
          "extra_data": {
            "description": "Store extra data about this invoice"
          },
          "persons": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "List of person UUIDs that are assigned to this invoice."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "List of Tag UUIDs (see the Tag endpoints). The list replaces all the tags of the Invoice, and an empty list removes them all. If you do not send `tags`, the tags do not change. A Tag of another Company, or a deleted Tag, returns 400."
          },
          "source_id": {
            "type": "string",
            "description": "The ID from the source it was imported from",
            "maxLength": 255
          }
        }
      },
      "PatchedPersonRequest": {
        "type": "object",
        "properties": {
          "customer": {
            "type": "string",
            "format": "uuid"
          },
          "email_address": {
            "type": "string",
            "description": "Multiple email addresses can be separated by commas"
          },
          "first_name": {
            "type": "string",
            "maxLength": 100
          },
          "last_name": {
            "type": "string",
            "maxLength": 100
          },
          "gender": {
            "description": "\"m\" or \"f\" or empty\n\n* `m` - Male\n* `f` - Female",
            "oneOf": [
              {
                "$ref": "#/components/schemas/GenderEnum"
              },
              {
                "$ref": "#/components/schemas/BlankEnum"
              }
            ]
          },
          "position": {
            "type": "string",
            "maxLength": 255
          },
          "position_external": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "phone_numbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PersonPhoneNumberRequest"
            },
            "description": "List of objects with country, number, extension, carrier_type (mobile, landline, voip, undefined)"
          },
          "primary": {
            "type": "boolean",
            "description": "Is this the primary contact?"
          },
          "external_id": {
            "type": "string",
            "description": "External ID used by company",
            "maxLength": 255
          },
          "source_id": {
            "type": "string",
            "description": "The ID from the source it was imported from",
            "maxLength": 500
          }
        }
      },
      "PatchedTagCategoryRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          }
        }
      },
      "PatchedTagRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "color": {
            "type": "string",
            "minLength": 1,
            "description": "Exactly 6 hexadecimal characters, without the leading `#`.",
            "maxLength": 6
          },
          "description": {
            "type": "string",
            "maxLength": 255
          },
          "tag_category": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        }
      },
      "PatchedTransactionRequest": {
        "type": "object",
        "properties": {
          "customer": {
            "type": "string",
            "format": "uuid"
          },
          "transaction_invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransactionInvoiceRequest"
            },
            "description": "List of objects with invoice ID and amount assigned"
          },
          "amount": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,12}(?:\\.\\d{0,2})?$"
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3
          },
          "ref": {
            "type": "string",
            "description": "Reference for this transaction",
            "maxLength": 255
          },
          "date_paid": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "When the payment was done."
          },
          "overpayment": {
            "type": "boolean",
            "description": "Whether the transaction is an overpayment."
          },
          "prepayment": {
            "type": "boolean",
            "description": "Whether the transaction is a prepayment."
          },
          "amount_remaining": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,12}(?:\\.\\d{0,2})?$",
            "description": "The amount not allocated to Invoices."
          },
          "status": {
            "$ref": "#/components/schemas/PaymentTransactionStatusEnum"
          },
          "extra_data": {
            "description": "Store extra data about this transaction"
          }
        }
      },
      "PaymentTransactionStatusEnum": {
        "enum": [
          "paid",
          "bounced",
          "voided",
          "pending_application"
        ],
        "type": "string",
        "description": "* `paid` - Paid\n* `bounced` - Bounced\n* `voided` - Voided\n* `pending_application` - Pending application"
      },
      "Person": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "customer": {
            "type": "string",
            "format": "uuid"
          },
          "email_address": {
            "type": "string",
            "description": "Multiple email addresses can be separated by commas"
          },
          "first_name": {
            "type": "string",
            "maxLength": 100
          },
          "last_name": {
            "type": "string",
            "maxLength": 100
          },
          "gender": {
            "description": "\"m\" or \"f\" or empty\n\n* `m` - Male\n* `f` - Female",
            "oneOf": [
              {
                "$ref": "#/components/schemas/GenderEnum"
              },
              {
                "$ref": "#/components/schemas/BlankEnum"
              }
            ]
          },
          "position": {
            "type": "string",
            "maxLength": 255
          },
          "position_external": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PositionExternal"
              },
              {
                "type": "null"
              }
            ],
            "readOnly": true
          },
          "phone_numbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PersonPhoneNumber"
            }
          },
          "primary": {
            "type": "boolean",
            "description": "Is this the primary contact?"
          },
          "external_id": {
            "type": "string",
            "description": "External ID used by company",
            "maxLength": 255
          },
          "source_id": {
            "type": "string",
            "description": "The ID from the source it was imported from",
            "maxLength": 500
          },
          "source": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UpdateFieldSourceEnum"
              }
            ],
            "readOnly": true
          },
          "date_modified": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "date_created": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "customer_source_id": {
            "type": "string",
            "description": "The `source_id` of the Customer. Only with `?source_customer=`."
          }
        },
        "required": [
          "customer",
          "date_created",
          "date_modified",
          "email_address",
          "external_id",
          "first_name",
          "gender",
          "id",
          "last_name",
          "phone_numbers",
          "position",
          "position_external",
          "primary",
          "source",
          "source_id"
        ]
      },
      "PersonByCustomerCreateRequest": {
        "type": "object",
        "properties": {
          "email_address": {
            "type": "string",
            "description": "Multiple email addresses can be separated by commas"
          },
          "first_name": {
            "type": "string",
            "maxLength": 100
          },
          "last_name": {
            "type": "string",
            "maxLength": 100
          },
          "gender": {
            "description": "\"m\" or \"f\" or empty\n\n* `m` - Male\n* `f` - Female",
            "oneOf": [
              {
                "$ref": "#/components/schemas/GenderEnum"
              },
              {
                "$ref": "#/components/schemas/BlankEnum"
              }
            ]
          },
          "position": {
            "type": "string",
            "maxLength": 255
          },
          "position_external": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "phone_numbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PersonPhoneNumberRequest"
            },
            "description": "List of objects with country, number, extension, carrier_type (mobile, landline, voip, undefined)"
          },
          "primary": {
            "type": "boolean",
            "description": "Is this the primary contact?"
          },
          "external_id": {
            "type": "string",
            "description": "External ID used by company",
            "maxLength": 255
          },
          "source_id": {
            "type": "string",
            "description": "The ID from the source it was imported from",
            "maxLength": 500
          }
        }
      },
      "PersonCompanyCreateRequest": {
        "type": "object",
        "properties": {
          "customer": {
            "type": "string",
            "minLength": 1,
            "description": "The UUID of the Customer, or its `source_id` with `?source_customer=`."
          },
          "email_address": {
            "type": "string",
            "description": "Multiple email addresses can be separated by commas"
          },
          "first_name": {
            "type": "string",
            "maxLength": 100
          },
          "last_name": {
            "type": "string",
            "maxLength": 100
          },
          "gender": {
            "description": "\"m\" or \"f\" or empty\n\n* `m` - Male\n* `f` - Female",
            "oneOf": [
              {
                "$ref": "#/components/schemas/GenderEnum"
              },
              {
                "$ref": "#/components/schemas/BlankEnum"
              }
            ]
          },
          "position": {
            "type": "string",
            "maxLength": 255
          },
          "position_external": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "phone_numbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PersonPhoneNumberRequest"
            },
            "description": "List of objects with country, number, extension, carrier_type (mobile, landline, voip, undefined)"
          },
          "primary": {
            "type": "boolean",
            "description": "Is this the primary contact?"
          },
          "external_id": {
            "type": "string",
            "description": "External ID used by company",
            "maxLength": 255
          },
          "source_id": {
            "type": "string",
            "description": "The ID from the source it was imported from",
            "maxLength": 500
          }
        },
        "required": [
          "customer"
        ]
      },
      "PersonInvoiceCreateRequest": {
        "type": "object",
        "properties": {
          "person": {
            "type": "string",
            "format": "uuid"
          },
          "invoice": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "invoice",
          "person"
        ]
      },
      "PersonInvoice": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "person": {
            "type": "string",
            "format": "uuid"
          },
          "invoice": {
            "type": "string",
            "format": "uuid"
          },
          "date_created": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "date_modified": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "date_created",
          "date_modified",
          "id",
          "invoice",
          "person"
        ]
      },
      "PersonRequest": {
        "type": "object",
        "properties": {
          "customer": {
            "type": "string",
            "format": "uuid"
          },
          "email_address": {
            "type": "string",
            "description": "Multiple email addresses can be separated by commas"
          },
          "first_name": {
            "type": "string",
            "maxLength": 100
          },
          "last_name": {
            "type": "string",
            "maxLength": 100
          },
          "gender": {
            "description": "\"m\" or \"f\" or empty\n\n* `m` - Male\n* `f` - Female",
            "oneOf": [
              {
                "$ref": "#/components/schemas/GenderEnum"
              },
              {
                "$ref": "#/components/schemas/BlankEnum"
              }
            ]
          },
          "position": {
            "type": "string",
            "maxLength": 255
          },
          "position_external": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "phone_numbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PersonPhoneNumberRequest"
            },
            "description": "List of objects with country, number, extension, carrier_type (mobile, landline, voip, undefined)"
          },
          "primary": {
            "type": "boolean",
            "description": "Is this the primary contact?"
          },
          "external_id": {
            "type": "string",
            "description": "External ID used by company",
            "maxLength": 255
          },
          "source_id": {
            "type": "string",
            "description": "The ID from the source it was imported from",
            "maxLength": 500
          }
        },
        "required": [
          "customer"
        ]
      },
      "PersonPhoneNumber": {
        "type": "object",
        "properties": {
          "country": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 2,
                "minLength": 2
              },
              {
                "type": "string",
                "maxLength": 0
              }
            ]
          },
          "number": {
            "type": "string",
            "maxLength": 100
          },
          "extension": {
            "type": "string",
            "maxLength": 10
          },
          "carrier_type": {
            "$ref": "#/components/schemas/CarrierTypeEnum"
          },
          "phone_prefix": {
            "type": "string",
            "readOnly": true,
            "description": "The phone prefix of the country."
          }
        },
        "required": [
          "phone_prefix"
        ]
      },
      "PersonPhoneNumberRequest": {
        "type": "object",
        "properties": {
          "country": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 2,
                "minLength": 2
              },
              {
                "type": "string",
                "maxLength": 0
              }
            ]
          },
          "number": {
            "type": "string",
            "maxLength": 100
          },
          "extension": {
            "type": "string",
            "maxLength": 10
          },
          "carrier_type": {
            "$ref": "#/components/schemas/CarrierTypeEnum"
          }
        }
      },
      "PositionExternal": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "source": {
            "$ref": "#/components/schemas/UpdateFieldSourceEnum"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "ReportFileAccepted": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the new Report File."
          },
          "status": {
            "type": "string",
            "description": "The status of the new Report File. It is always `received`."
          },
          "var_name": {
            "type": "string",
            "description": "The `var_name` of the Report Type."
          }
        },
        "required": [
          "id",
          "status",
          "var_name"
        ]
      },
      "ReportFileCreateRequest": {
        "type": "object",
        "properties": {
          "var_name": {
            "type": "string",
            "minLength": 1,
            "description": "The `var_name` of a Report Type from **List Report Types**."
          },
          "filters": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {},
            "description": "The filters the Report Type accepts, see its `filters`. A `date` filter is an absolute date in `YYYY-MM-DD` format, a `boolean` filter is `true` or `false`, and a `UUID` filter is the UUID of a record."
          },
          "dynamic_filters": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {},
            "description": "Optional extra filters on the rows of the report."
          }
        },
        "required": [
          "var_name"
        ]
      },
      "ReportFile": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "var_name": {
            "type": "string",
            "readOnly": true,
            "description": "The `var_name` of the Report Type of the file."
          },
          "report_type_name": {
            "type": "string",
            "readOnly": true,
            "description": "The name of the Report Type of the file."
          },
          "extension": {
            "type": "string",
            "readOnly": true,
            "description": "The extension of the file: `xlsx`, `pdf` or `csv`. An empty string until the file is generated."
          },
          "size": {
            "type": "integer",
            "readOnly": true,
            "description": "The size of the file in bytes. 0 until the file is generated."
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ReportFileStatusEnum"
              }
            ],
            "readOnly": true
          },
          "date_created": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "date_created",
          "extension",
          "id",
          "report_type_name",
          "size",
          "status",
          "var_name"
        ]
      },
      "ReportFileStatusEnum": {
        "enum": [
          "received",
          "in_progress",
          "completed",
          "error"
        ],
        "type": "string",
        "description": "* `received` - Received\n* `in_progress` - In Progress\n* `completed` - Completed\n* `error` - Error"
      },
      "ReportScheduleCreateRequest": {
        "type": "object",
        "properties": {
          "var_name": {
            "type": "string",
            "minLength": 1,
            "description": "The `var_name` of a Report Type from **List Report Types**."
          },
          "frequency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FrequencyEnum"
              }
            ],
            "description": "The default is `weekly`.\n\n* `daily` - Daily\n* `weekly` - Weekly\n* `monthly` - Monthly"
          },
          "day_number": {
            "type": "integer",
            "minimum": 0,
            "description": "0 for `daily`, 0 (Monday) to 6 (Sunday) for `weekly`, the day of the month from 1 to 28 for `monthly`."
          },
          "time": {
            "type": "string",
            "format": "time",
            "description": "The time of the day, in the timezone of the Company, in `hh:mm` or `hh:mm:ss` format. The default is `08:00:00`."
          },
          "filters": {
            "type": "object",
            "additionalProperties": {},
            "description": "The filters the Report Type accepts, with relative dates."
          },
          "dynamic_filters": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {},
            "description": "Optional extra filters on the rows of the report."
          }
        },
        "required": [
          "day_number",
          "var_name"
        ]
      },
      "ReportSchedule": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "var_name": {
            "type": "string",
            "readOnly": true,
            "description": "The `var_name` of the Report Type of the schedule."
          },
          "report_type_name": {
            "type": "string",
            "readOnly": true,
            "description": "The name of the Report Type of the schedule."
          },
          "filters": {
            "type": "object",
            "additionalProperties": true,
            "readOnly": true,
            "description": "The filters of the Report Type, with relative dates."
          },
          "dynamic_filters": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true,
            "readOnly": true,
            "description": "The extra filters on the rows of the report."
          },
          "frequency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FrequencyEnum"
              }
            ],
            "readOnly": true
          },
          "day_number": {
            "type": "integer",
            "readOnly": true,
            "description": "0 for `daily`, 0 (Monday) to 6 (Sunday) for `weekly`, the day of the month from 1 to 28 for `monthly`."
          },
          "time": {
            "type": "string",
            "format": "time",
            "readOnly": true,
            "description": "The time of the day, in the timezone of the Company."
          },
          "date_created": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "date_created",
          "day_number",
          "dynamic_filters",
          "filters",
          "frequency",
          "id",
          "report_type_name",
          "time",
          "var_name"
        ]
      },
      "ReportType": {
        "type": "object",
        "properties": {
          "var_name": {
            "type": "string",
            "readOnly": true,
            "description": "The identifier of the Report Type. Send it as `var_name` to request a Report File or to create a Report Schedule."
          },
          "name": {
            "type": "string",
            "readOnly": true
          },
          "description": {
            "type": "string",
            "readOnly": true
          },
          "extension": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ExtensionEnum"
              }
            ],
            "readOnly": true
          },
          "filters": {
            "type": "object",
            "additionalProperties": true,
            "readOnly": true,
            "description": "The filters that the Report Type accepts. The key is the name of the filter. The value holds its `label`, its `type` (for example `date`, `boolean` or `UUID`) and `required`."
          }
        },
        "required": [
          "description",
          "extension",
          "filters",
          "name",
          "var_name"
        ]
      },
      "Step": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "customer": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true,
            "description": "The UUID of the Customer of the Step. Null for a Task Step that has no Customer."
          },
          "category": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StepCategoryEnum"
              }
            ],
            "readOnly": true
          },
          "date_event": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "contacts": {
            "description": "Only with `contacts` in `?extra_fields=`. The contacts of the Step, for example the recipients of an email."
          },
          "content": {
            "type": "string",
            "description": "Only with `content` in `?extra_fields=`. The text of the Step, or an empty string."
          }
        },
        "required": [
          "category",
          "customer",
          "date_event",
          "id"
        ]
      },
      "StepCategoryEnum": {
        "enum": [
          "call_inbound",
          "call_outbound",
          "credit_note",
          "custom_form_submission",
          "custom_object",
          "email_sent",
          "email_received",
          "invoice",
          "letter",
          "note",
          "promise_to_pay",
          "task",
          "text_message_sent",
          "text_message_received",
          "transaction"
        ],
        "type": "string",
        "description": "* `call_inbound` - Call Inbound\n* `call_outbound` - Call Outbound\n* `credit_note` - Credit Note\n* `custom_form_submission` - Form submitted\n* `custom_object` - Record\n* `email_sent` - Email sent\n* `email_received` - Email received\n* `invoice` - Invoice\n* `letter` - Letter\n* `note` - Note\n* `promise_to_pay` - Promise to pay\n* `task` - Task\n* `text_message_sent` - Text message sent\n* `text_message_received` - Text message received\n* `transaction` - Payment (ERP)"
      },
      "Tag": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "color": {
            "type": "string",
            "description": "Exactly 6 hexadecimal characters, without the leading `#`.",
            "maxLength": 6
          },
          "description": {
            "type": "string",
            "maxLength": 255
          },
          "tag_category": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TagCategory"
              },
              {
                "type": "null"
              }
            ],
            "readOnly": true
          }
        },
        "required": [
          "color",
          "description",
          "id",
          "name",
          "tag_category"
        ]
      },
      "TagCategory": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 100
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "TagCategoryRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          }
        },
        "required": [
          "name"
        ]
      },
      "TagRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "color": {
            "type": "string",
            "minLength": 1,
            "description": "Exactly 6 hexadecimal characters, without the leading `#`.",
            "maxLength": 6
          },
          "description": {
            "type": "string",
            "maxLength": 255
          },
          "tag_category": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        },
        "required": [
          "name"
        ]
      },
      "Template": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "channel": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ChannelEnum"
              }
            ],
            "description": "Communication channel\n\n* `email` - Email\n* `text_message` - Text Message"
          },
          "category": {
            "$ref": "#/components/schemas/TemplateCategoryEnum"
          }
        },
        "required": [
          "category",
          "channel",
          "id",
          "name"
        ]
      },
      "TemplateCategoryEnum": {
        "enum": [
          "other",
          "reminder",
          "overdue",
          "escalation"
        ],
        "type": "string",
        "description": "* `other` - Other\n* `reminder` - Reminder\n* `overdue` - Overdue\n* `escalation` - Escalation"
      },
      "TransactionCreateRequest": {
        "type": "object",
        "properties": {
          "transaction_invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransactionInvoiceRequest"
            },
            "description": "List of objects with invoice ID and amount assigned"
          },
          "amount": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,12}(?:\\.\\d{0,2})?$"
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3
          },
          "ref": {
            "type": "string",
            "description": "Reference for this transaction",
            "maxLength": 255
          },
          "date_paid": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "When the payment was done."
          },
          "overpayment": {
            "type": "boolean",
            "description": "Whether the transaction is an overpayment."
          },
          "prepayment": {
            "type": "boolean",
            "description": "Whether the transaction is a prepayment."
          },
          "amount_remaining": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,12}(?:\\.\\d{0,2})?$",
            "description": "The amount not allocated to Invoices."
          },
          "status": {
            "$ref": "#/components/schemas/PaymentTransactionStatusEnum"
          },
          "extra_data": {
            "description": "Store extra data about this transaction"
          }
        },
        "required": [
          "currency"
        ]
      },
      "TransactionInvoice": {
        "type": "object",
        "properties": {
          "invoice": {
            "type": "string",
            "format": "uuid"
          },
          "amount": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,12}(?:\\.\\d{0,2})?$"
          }
        },
        "required": [
          "invoice"
        ]
      },
      "TransactionInvoiceRequest": {
        "type": "object",
        "properties": {
          "invoice": {
            "type": "string",
            "format": "uuid"
          },
          "amount": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,12}(?:\\.\\d{0,2})?$"
          }
        },
        "required": [
          "invoice"
        ]
      },
      "Transaction": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "customer": {
            "type": "string",
            "format": "uuid"
          },
          "transaction_invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransactionInvoice"
            },
            "description": "List of objects with invoice ID and amount assigned"
          },
          "amount": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,12}(?:\\.\\d{0,2})?$"
          },
          "currency": {
            "type": "string",
            "maxLength": 3,
            "minLength": 3
          },
          "ref": {
            "type": "string",
            "description": "Reference for this transaction",
            "maxLength": 255
          },
          "date_paid": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "When the payment was done."
          },
          "overpayment": {
            "type": "boolean",
            "description": "Whether the transaction is an overpayment."
          },
          "prepayment": {
            "type": "boolean",
            "description": "Whether the transaction is a prepayment."
          },
          "amount_remaining": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,12}(?:\\.\\d{0,2})?$",
            "description": "The amount not allocated to Invoices."
          },
          "status": {
            "$ref": "#/components/schemas/PaymentTransactionStatusEnum"
          },
          "extra_data": {
            "description": "Store extra data about this transaction"
          },
          "source": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UpdateFieldSourceEnum"
              }
            ],
            "readOnly": true
          },
          "source_id": {
            "type": "string",
            "readOnly": true,
            "description": "The ID from the source it was imported from"
          },
          "date_modified": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "date_created": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "currency",
          "customer",
          "date_created",
          "date_modified",
          "id",
          "source",
          "source_id"
        ]
      },
      "TransactionRequest": {
        "type": "object",
        "properties": {
          "customer": {
            "type": "string",
            "format": "uuid"
          },
          "transaction_invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransactionInvoiceRequest"
            },
            "description": "List of objects with invoice ID and amount assigned"
          },
          "amount": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,12}(?:\\.\\d{0,2})?$"
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3
          },
          "ref": {
            "type": "string",
            "description": "Reference for this transaction",
            "maxLength": 255
          },
          "date_paid": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "When the payment was done."
          },
          "overpayment": {
            "type": "boolean",
            "description": "Whether the transaction is an overpayment."
          },
          "prepayment": {
            "type": "boolean",
            "description": "Whether the transaction is a prepayment."
          },
          "amount_remaining": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,12}(?:\\.\\d{0,2})?$",
            "description": "The amount not allocated to Invoices."
          },
          "status": {
            "$ref": "#/components/schemas/PaymentTransactionStatusEnum"
          },
          "extra_data": {
            "description": "Store extra data about this transaction"
          }
        },
        "required": [
          "currency",
          "customer"
        ]
      },
      "UpdateFieldSourceEnum": {
        "enum": [
          "business_central",
          "clio",
          "csv",
          "custom_form",
          "custom_integration",
          "kolleno_api",
          "light",
          "manual",
          "netsuite",
          "quickbooks",
          "stripe",
          "workday",
          "xero",
          "salesforce",
          "zuora"
        ],
        "type": "string",
        "description": "* `business_central` - Microsoft Business Central\n* `clio` - Clio\n* `csv` - CSV\n* `custom_form` - Custom form\n* `custom_integration` - Custom integration\n* `kolleno_api` - Kolleno API\n* `light` - Light\n* `manual` - Manual import\n* `netsuite` - NetSuite\n* `quickbooks` - QuickBooks\n* `stripe` - Stripe\n* `workday` - Workday\n* `xero` - Xero\n* `salesforce` - Salesforce\n* `zuora` - Zuora"
      },
      "Workflow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 120
          },
          "level": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AutomationLevelEnum"
              }
            ],
            "description": "Whether actions in this workflow are performed on a customer or invoice level.\n\n* `call_level` - Call Level\n* `credit_note_level` - Credit Note Level\n* `custom_form_submission_level` - Form Submission Level\n* `custom_object_level` - Custom Object Level\n* `custom_record_level` - Custom Record Level\n* `customer_group_level` - Customer Group Level\n* `customer_level` - Customer Level\n* `email_received_level` - Email Received Level\n* `email_sent_level` - Email Sent Level\n* `file_upload_level` - File Upload Level\n* `invoice_level` - Invoice Level\n* `note_level` - Note Level\n* `person_level` - Person Level\n* `payment_charge_level` - Payment Charge Level\n* `payment_plan_level` - Payment Plan Level\n* `text_message_sent_level` - Text Message Sent Level\n* `transaction_level` - Transaction Level"
          },
          "is_active": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "is_active",
          "level",
          "name"
        ]
      }
    },
    "securitySchemes": {
      "KollenoApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Send your API key in the `Authorization` header. The value is `API`, a space, the `client_id`, a colon and the `client_secret`.\n\nExample: `Authorization: API <client_id>:<client_secret>`"
      }
    }
  },
  "tags": [
    {
      "name": "Card Detail",
      "description": "Card Details belong to a Customer."
    },
    {
      "name": "Company",
      "description": "Companies are the central point of Kolleno. It is your organization to whom\nCustomers are attached to. A user (API key) can have access to several\nCompanies."
    },
    {
      "name": "Credit Note",
      "description": "The Credit Notes (or 'Credit Memos') belong to a Customer but have Invoices\nrelated to them.\n\nThe `credit_note_invoices` list holds the amount of the Credit Note that was\nassigned to each Invoice. The `amount_remaining` is the amount that is not\nallocated yet."
    },
    {
      "name": "Credit Note PDF",
      "description": "Every Credit Note can have up to one PDF."
    },
    {
      "name": "Customer",
      "description": "Customers belong to a company.\n\nIn addition to its fields, a Customer has the following extra fields. Ask for\nthem with `?extra_fields=` (or `?fields=` on the list endpoint):\n\n- `gocardless_customer_id`: ID coming from GoCardless.\n- `has_direct_debit_detail`: boolean whether direct debit details have been set up.\n- `bank_account_setup_url`: string returning the URL to set up the direct debit.\n\n### Query Parameter Behavior Matrix\n\nThe `/v1/customer/{company}/` endpoint supports an optional `?source=` query\nparameter that enables source-based ID resolution. `?source=` controls how\n`{id}` in the URL is resolved (UUID vs source_id).\n\n| HTTP Method | ?source | Behavior |\n| --- | --- | --- |\n| POST | No effect | Creates the customer with `source` = `kolleno_api` |\n| GET list | No effect | Returns all customers. `?source_id=` filters by source_id |\n| GET retrieve | Not set | `{id}` = customer UUID |\n| GET retrieve | kolleno_api | `{id}` = customer's source_id where source=kolleno_api |\n| PATCH/PUT | Not set | `{id}` = customer UUID |\n| PATCH/PUT | kolleno_api | `{id}` = customer's source_id where source=kolleno_api |\n| DELETE | Not set | `{id}` = customer UUID. Returns 204 |\n| DELETE | kolleno_api | `{id}` = customer's source_id. Returns 204 |\n\nSummary: `?source` accepts any source value (for example `kolleno_api` or\n`csv`). If no customer matches that source and source_id, the endpoint returns\n404 with `{\"detail\": \"No customer found with the given source_id.\"}`."
    },
    {
      "name": "Customer Custom Fields",
      "description": "This endpoint is used for you to update values for your Custom Fields on\nCustomer records.\n\nSee: [Add custom fields to your Kolleno Customers](https://help.kolleno.com/en/articles/11660969-add-custom-fields-to-your-kolleno-customers)\n\nIf you are unsure about the fields API names, please reach out to support."
    },
    {
      "name": "Direct Debit Detail",
      "description": "Direct Debit Details belong to a Customer."
    },
    {
      "name": "Email Sent",
      "description": "The emails Kolleno sent to your Customers, from a workflow or by a user.\n\nThe `step` is the Step of the email in the Customer's timeline (see\n**Timeline**), and is null when the email has no Customer. The `invoices` are\nthe Invoices the email is about, in no fixed order. The `workflow` is null\nwhen no workflow sent the email.\n\nThe `template` is the Template the workflow used to send the email. It is null\nwhen no workflow sent the email, and for emails sent before this field was\nadded.\n\nTo get the names of the `workflow` and the `template`, use **List Workflows**\nand **List Templates**.\n\nThe `status` shows the delivery of the email, for example: delivered, read,\nread_clicked, bounced or error.\n\nAdd `?extra_fields=body,body_text` to also get the HTML `body` and the plain\ntext `body_text` of the email."
    },
    {
      "name": "Invoice",
      "description": "Invoices belong to a Customer.\n\nThe `tags` are returned as objects, but you send a list of Tag UUIDs to assign\nthem. Sending `tags` replaces the whole list, so send an empty list to remove\nthem all. The Tags have to belong to the same Company as the Invoice.\n\nThe `date_promise_to_pay_valid` is the date of the active promise to pay on\nthe Invoice, and is null when there is none. It is read-only, and can take a\nfew seconds to show a new promise to pay."
    },
    {
      "name": "Invoice Custom Fields",
      "description": "This endpoint is used to update values for your Custom Fields on Invoice\nrecords.\n\nSee: [Add custom fields to your Kolleno Customers](https://help.kolleno.com/en/articles/11660969-add-custom-fields-to-your-kolleno-customers)\n(the same configuration mechanism is used for invoice-scoped custom fields).\n\nIf you are unsure about the fields API names, please reach out to support."
    },
    {
      "name": "Invoice PDF",
      "description": "Every Invoice can have up to one PDF."
    },
    {
      "name": "Match",
      "description": "Matches represent a reconciliation record for a bank transaction. A Match\nlinks an account_transaction (the bank/payment movement) to a customer, and\ntracks where that reconciliation is in its lifecycle.\n\nTypical lifecycle:\n\n- matched: automatically or manually identified as a likely match\n- confirmed: reviewed/approved and ready to push\n- reconciled: successfully reconciled in the accounting platform\n\nA Match object includes the customer reference, the matched account\ntransaction details, and audit timestamps.\n\nThe Match endpoints require the user the API Key belongs to to have\nreconciliation access."
    },
    {
      "name": "Person",
      "description": "The contact Persons belong to a Customer (who belongs to a Company).\n\n### Query Parameter Behavior Matrix\n\nThe `/v1/person/company/{company}/` endpoint supports two optional query\nparameters that enable source-based ID resolution. `?source=` controls how\n`{person}` in the URL is resolved (UUID vs `source_id`), while\n`?source_customer=` controls how customer references are resolved and enriches\nthe response with `customer_source_id`. Both parameters are independent and\ncan be combined.\n\n| HTTP Method | `?source` | `?source_customer` | Behavior |\n| --- | --- | --- | --- |\n| **POST** | _No effect_ | _Not set_ | `customer` in body = UUID |\n| **POST** | _No effect_ | `workday` | `customer` in body = customer's Workday `source_id`, resolved to UUID. Response includes `customer_source_id` |\n| **GET list** | _No effect_ | _Not set_ | Returns all persons. `?customer=` filters by UUID |\n| **GET list** | _No effect_ | `workday` | Returns all persons. `?customer=` filters by customer's Workday `source_id`. Response items include `customer_source_id` |\n| **GET retrieve** | _Not set_ | _Not set_ | `{person}` = person UUID |\n| **GET retrieve** | `kolleno_api` | _Not set_ | `{person}` = person's `source_id` where `source=kolleno_api` |\n| **GET retrieve** | _Not set_ | `workday` | `{person}` = person UUID. Response includes `customer_source_id` |\n| **GET retrieve** | `kolleno_api` | `workday` | `{person}` = person's `source_id`. Response includes `customer_source_id` |\n| **PATCH/PUT** | _Not set_ | _Not set_ | `{person}` = person UUID |\n| **PATCH/PUT** | `kolleno_api` | _Not set_ | `{person}` = person's `source_id` where `source=kolleno_api` |\n| **PATCH/PUT** | _Not set_ | `workday` | `{person}` = person UUID. Response includes `customer_source_id` |\n| **PATCH/PUT** | `kolleno_api` | `workday` | `{person}` = person's `source_id`. Response includes `customer_source_id` |\n| **DELETE** | _Not set_ | _Not set_ | `{person}` = person UUID. Returns 204 |\n| **DELETE** | `kolleno_api` | _Not set_ | `{person}` = person's `source_id`. Returns 204 |\n| **DELETE** | _Not set_ | `workday` | `{person}` = person UUID. Returns 204 (no response body, so `customer_source_id` irrelevant) |\n| **DELETE** | `kolleno_api` | `workday` | `{person}` = person's `source_id`. Returns 204 |\n\n**Summary**: `?source` controls how `{person}` is resolved (UUID vs\nsource_id). `?source_customer` controls how customer references are resolved\nand adds `customer_source_id` to responses. They work independently."
    },
    {
      "name": "Person <> Invoice",
      "description": "Mark a contact person as the related contact of an invoice. It is a\nmany-to-many relationship."
    },
    {
      "name": "Position External",
      "description": "List all the external Positions (= roles) that you can assign to Person objects."
    },
    {
      "name": "Report File",
      "description": "Generated report files (e.g. aging reports, exported tables, Copilot outputs).\nListed by the report type's `var_name` and downloaded directly from the same\npath.\n\nTo get a new report file:\n\n1. Get the `var_name` and the `filters` of the report you want from **List\n   Report Types**.\n2. Send **Generate Report File**. Kolleno generates the file in the background.\n3. Poll **Retrieve Report File Status** until `status` is `completed`.\n4. Download the file with **Download Report File**.\n\nTo get a report file on a schedule instead, see **Report Schedule**.\n\nGenerating a report file requires the user the API Key belongs to to have\nreporting access."
    },
    {
      "name": "Report Schedule",
      "description": "Report Schedules generate a report file every day, every week or every month.\nThe user the API Key belongs to gets each report file by email, and also finds\nit in **List Report Files**.\n\nThe `frequency` is one of: `daily`, `weekly`, `monthly`. The `day_number`\ndepends on it: 0 for daily, 0 (Monday) to 6 (Sunday) for weekly, 1 to 28 for\nmonthly. The `time` is in the Company's timezone.\n\nThe dates in `filters` are relative to the day the report file is generated,\nsee **Create Report Schedule**. The `dynamic_filters` are optional extra\nfilters on the rows of the report, and are empty by default.\n\nYou only see and delete the Report Schedules delivered to the user the API Key\nbelongs to. Managing Report Schedules requires reporting access."
    },
    {
      "name": "Report Type",
      "description": "Report Types are the reports you can request through the API. Use the\n`var_name` of a Report Type to send **Generate Report File** or **Create\nReport Schedule**.\n\nThe `filters` are the filters the Report Type accepts, each with its `label`,\nits `type` and whether it is `required`. Send the filters with the same keys.\n\nListing Report Types requires the user the API Key belongs to to have\nreporting access."
    },
    {
      "name": "Tag",
      "description": "Tags are labels owned by Kolleno that you can assign to your Invoices,\nCustomers and Credit Notes. A Tag optionally belongs to a Tag Category.\n\nThe `tag_category` is returned as an object, and is null when the Tag has no\ncategory. To create or update a Tag, send the UUID of the Tag Category\ninstead.\n\nCreating and deleting Tags requires the user the API Key belongs to to have\ntag management access, exactly as in the user interface. Updating a Tag\ndoes not."
    },
    {
      "name": "Tag Category",
      "description": "Tag Categories group the Tags of a Company. They are optional: a Tag can exist\nwithout one.\n\nCreating and deleting Tag Categories requires the user the API Key belongs\nto to have tag management access, exactly as in the user interface. Updating\na Tag Category does not."
    },
    {
      "name": "Template",
      "description": "Templates are the emails and text messages your workflows send to your\nCustomers. Use them to get the name of the `template` of an email sent (see\n**Email Sent**).\n\nThe possible `channel` are: email, text_message\n\nThe possible `category` are: other, reminder, overdue, escalation\n\nDeleted Templates are not returned, so the `template` of an older email sent\ncan be missing from the list."
    },
    {
      "name": "Timeline",
      "description": "Get the list of Steps (events in the Customers timelines).\n\nThe possible `category` are:\n\ncall_inbound, call_outbound, credit_note, email_sent, email_received, invoice,\nnote, promise_to_pay, text_message_sent, text_message_received, transaction,\ninvoice_due"
    },
    {
      "name": "Transaction",
      "description": "The Transactions (equivalent to payments in other systems) belong to a\nCustomer but have Invoices related to them.\n\nThe `transaction_invoices` list holds the amount of the Transaction that was\nassigned to each Invoice. The `extra_data` is a JSON dictionary (key-value\npairs); for CSV imports, it holds every column outside the standard ones."
    },
    {
      "name": "Workflow",
      "description": "Workflows are the automations that contact your Customers and update their\nrecords. Use them to get the name of the `workflow` of an email sent (see\n**Email Sent**).\n\nThe `level` is the type of record the Workflow runs on. The possible `level`\nare:\n\ncall_level, credit_note_level, custom_form_submission_level,\ncustom_object_level, custom_record_level, customer_group_level,\ncustomer_level, email_received_level, email_sent_level, file_upload_level,\ninvoice_level, note_level, payment_charge_level, payment_plan_level,\nperson_level, text_message_sent_level, transaction_level\n\nDeleted Workflows are not returned, so the `workflow` of an older email sent\ncan be missing from the list."
    }
  ]
}