{
  "openapi": "3.0.0",
  "paths": {
    "/v4/core/organizations/sync-config": {
      "get": {
        "operationId": "OrganizationController_getSyncConfigForIntegration",
        "parameters": [
          {
            "name": "integration_type",
            "required": false,
            "in": "query",
            "schema": {
              "example": "QUICKBOOKS",
              "type": "string",
              "enum": [
                "BUSY",
                "CLEARBOOKS",
                "FREEAGENT",
                "FRESHBOOKS",
                "KASHFLOW",
                "MEKARI_JURNAL",
                "MS_DYNAMICS_365",
                "MS_DYNAMICS_365_FO",
                "MYOB_BUSINESS",
                "NETSUITE",
                "ODOO_ACCOUNTING",
                "QOYOD",
                "QUICKBOOKS",
                "QUICKBOOKS_SANDBOX",
                "ROOTFI_SANDBOX",
                "SAGE_CLOUD_ACCOUNTING",
                "SAGE_ZA_CLOUD_ACCOUNTING",
                "SAGE_INTACCT",
                "TALLY",
                "WAFEQ",
                "WAVE",
                "XERO",
                "ZOHO_BOOKS",
                "PUZZLE_SANDBOX",
                "PUZZLE",
                "RILLET",
                "RILLET_SANDBOX",
                "AMAZON",
                "BIG_COMMERCE",
                "SHOPIFY",
                "SQUARESPACE",
                "WIX",
                "WOO_COMMERCE",
                "GOOGLE_PLAYSTORE",
                "CHARGEBEE",
                "MOLLIE",
                "PAYPAL",
                "PAYPAL_SANDBOX",
                "RAZORPAY",
                "SQUARE",
                "SQUARE_SANDBOX",
                "STRIPE",
                "STRIPE_TEST",
                "STRIPE_SANDBOX",
                "ZOHO_INVOICE",
                "PADDLE",
                "PADDLE_SANDBOX",
                "HUBSPOT",
                "PIPEDRIVE",
                "SALES_FORCE",
                "ZOHO_CRM",
                "GUSTO"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetSyncConfigForIntegrationResponse"
                }
              }
            }
          }
        },
        "summary": "Get sync config",
        "tags": [
          "Organization"
        ],
        "x-audience": "customer"
      },
      "post": {
        "operationId": "OrganizationController_updateSyncConfig",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrgSyncConfigDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          }
        },
        "summary": "Update sync config",
        "tags": [
          "Organization"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/invite-links": {
      "post": {
        "description": "Creates an invite link a customer uses to connect their integration.",
        "operationId": "InviteLinkCoreController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInviteLinkDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created invite link.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreateInviteLinkResponse"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Create",
        "tags": [
          "Invite Links"
        ],
        "x-audience": "customer"
      },
      "get": {
        "operationId": "InviteLinkCoreController_list",
        "parameters": [
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of invite links.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ListInviteLinksResponse"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "List",
        "tags": [
          "Invite Links"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/invite-links/{inviteLinkUuid}": {
      "get": {
        "operationId": "InviteLinkCoreController_getByInviteLinkUuid",
        "parameters": [
          {
            "name": "inviteLinkUuid",
            "required": true,
            "in": "path",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested invite link with its data model configs.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/InviteLinkDetailResponse"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Get",
        "tags": [
          "Invite Links"
        ],
        "x-audience": "customer"
      },
      "patch": {
        "operationId": "InviteLinkCoreController_updateByInviteLinkUuid",
        "parameters": [
          {
            "name": "inviteLinkUuid",
            "required": true,
            "in": "path",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateInviteLinkDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated invite link.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/InviteLinkDetailResponse"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Update",
        "tags": [
          "Invite Links"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/invite-links/{id}": {
      "delete": {
        "operationId": "InviteLinkCoreController_delete",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The invite link was deleted."
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Delete",
        "tags": [
          "Invite Links"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/companies": {
      "get": {
        "description": "Returns a cursor-paginated list of the organisation's companies.",
        "operationId": "CompanyController_list",
        "parameters": [
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "type": "number"
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "schema": {
              "example": "Acme",
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "type": "number"
            }
          },
          {
            "name": "connectionStatus",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "PENDING",
                "HEALTHY",
                "DISCONNECTED",
                "EXPIRED",
                "RATE_LIMIT_EXCEEDED"
              ]
            }
          },
          {
            "name": "integration",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "BUSY",
                "CLEARBOOKS",
                "FREEAGENT",
                "FRESHBOOKS",
                "KASHFLOW",
                "MEKARI_JURNAL",
                "MS_DYNAMICS_365",
                "MS_DYNAMICS_365_FO",
                "MYOB_BUSINESS",
                "NETSUITE",
                "ODOO_ACCOUNTING",
                "QOYOD",
                "QUICKBOOKS",
                "QUICKBOOKS_SANDBOX",
                "ROOTFI_SANDBOX",
                "SAGE_CLOUD_ACCOUNTING",
                "SAGE_ZA_CLOUD_ACCOUNTING",
                "SAGE_INTACCT",
                "TALLY",
                "WAFEQ",
                "WAVE",
                "XERO",
                "ZOHO_BOOKS",
                "PUZZLE_SANDBOX",
                "PUZZLE",
                "RILLET",
                "RILLET_SANDBOX",
                "AMAZON",
                "BIG_COMMERCE",
                "SHOPIFY",
                "SQUARESPACE",
                "WIX",
                "WOO_COMMERCE",
                "GOOGLE_PLAYSTORE",
                "CHARGEBEE",
                "MOLLIE",
                "PAYPAL",
                "PAYPAL_SANDBOX",
                "RAZORPAY",
                "SQUARE",
                "SQUARE_SANDBOX",
                "STRIPE",
                "STRIPE_TEST",
                "STRIPE_SANDBOX",
                "ZOHO_INVOICE",
                "PADDLE",
                "PADDLE_SANDBOX",
                "HUBSPOT",
                "PIPEDRIVE",
                "SALES_FORCE",
                "ZOHO_CRM",
                "GUSTO"
              ]
            }
          },
          {
            "name": "integrationCategory",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "ACCOUNTING",
                "PAYMENTS",
                "ECOMMERCE",
                "CRM",
                "HRIS"
              ]
            }
          },
          {
            "name": "syncState",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "IDLE",
                "SYNCING"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of companies.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ListCompaniesResponse"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "List",
        "tags": [
          "Companies"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/companies/{companyId}": {
      "get": {
        "operationId": "CompanyController_get",
        "parameters": [
          {
            "name": "companyId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested company.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/GetCompanyResponse"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Get",
        "tags": [
          "Companies"
        ],
        "x-audience": "customer"
      },
      "patch": {
        "operationId": "CompanyController_update",
        "parameters": [
          {
            "name": "companyId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCompanyDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The company was updated."
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Update",
        "tags": [
          "Companies"
        ],
        "x-audience": "customer"
      },
      "delete": {
        "operationId": "CompanyController_archive",
        "parameters": [
          {
            "name": "companyId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The company was archived."
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Archive",
        "tags": [
          "Companies"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/companies/{companyId}/sync-config": {
      "patch": {
        "operationId": "CompanyController_updateSyncConfig",
        "parameters": [
          {
            "name": "companyId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCompanySyncConfigDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The sync config was updated."
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Update sync config",
        "tags": [
          "Companies"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/companies/{companyId}/sync-config/reset": {
      "post": {
        "operationId": "CompanyController_resetSyncConfig",
        "parameters": [
          {
            "name": "companyId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The sync config was reset."
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Reset sync config",
        "tags": [
          "Companies"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/companies/{companyId}/sync-config/reset/{dataModel}": {
      "post": {
        "operationId": "CompanyController_resetSingleModelConfig",
        "parameters": [
          {
            "name": "companyId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "dataModel",
            "required": true,
            "in": "path",
            "schema": {
              "enum": [
                "ACCOUNT",
                "BALANCE_SHEET",
                "BANK_ACCOUNT",
                "BANK_TRANSACTION",
                "BILL",
                "BILL_CREDIT_NOTE",
                "BILL_PAYMENT",
                "CASH_FLOW_STATEMENT",
                "COMPANY_INFO",
                "CONTACT",
                "CURRENCY",
                "DOCUMENT",
                "EXPENSE",
                "GOODS_RECEIPT_NOTE",
                "INCOME_STATEMENT",
                "INVOICE",
                "INVOICE_CREDIT_NOTE",
                "INVOICE_PAYMENT",
                "ITEM",
                "JOURNAL_ENTRY",
                "JOURNAL_LINE",
                "PROJECT",
                "PURCHASE_ORDER",
                "SALES_ORDER",
                "ESTIMATE",
                "TAX_RATE",
                "TRACKING_CATEGORY",
                "CASH_SALE",
                "CASH_REFUND",
                "BALANCE",
                "DISPUTE",
                "ORDER",
                "PAYOUT",
                "SUBSCRIPTION",
                "TRANSACTION",
                "EVENT",
                "FULFILLMENT",
                "INVENTORY",
                "COMPANY",
                "LEAD",
                "OPPORTUNITY",
                "PIPELINE",
                "PIPELINE_STAGE",
                "NOTE",
                "TASK",
                "OWNER",
                "ENGAGEMENT",
                "ADDRESS",
                "EXTERNAL_LINK",
                "LINE_ITEM",
                "PHONE_NUMBER",
                "VARIANT"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The data model's sync config was reset."
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Reset a data model's sync config",
        "tags": [
          "Companies"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/companies/{companyId}/disconnect": {
      "put": {
        "operationId": "CompanyController_disconnect",
        "parameters": [
          {
            "name": "companyId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The company's integration was disconnected."
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Disconnect integration",
        "tags": [
          "Companies"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/disconnect-requests": {
      "get": {
        "operationId": "DisconnectRequestController_list",
        "parameters": [
          {
            "name": "status",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "PENDING",
                "CANCELLED",
                "APPROVED",
                "REJECTED"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListDisconnectRequestsResponse"
                }
              }
            }
          }
        },
        "summary": "List",
        "tags": [
          "DisconnectRequest"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/disconnect-requests/{id}": {
      "patch": {
        "operationId": "DisconnectRequestController_resolve",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveDisconnectRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisconnectRequestResponse"
                }
              }
            }
          }
        },
        "summary": "Resolve",
        "tags": [
          "DisconnectRequest"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/companies/{companyId}/syncs": {
      "post": {
        "description": "Starts a sync for the company's active connection.",
        "operationId": "SyncController_initSync",
        "parameters": [
          {
            "name": "companyId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InitSyncBodyDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The sync that was started.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/InitSyncResponse"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Trigger",
        "tags": [
          "Syncs"
        ],
        "x-audience": "customer"
      },
      "get": {
        "operationId": "SyncController_list",
        "parameters": [
          {
            "name": "companyId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobType",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "PUSH",
                "PULL",
                "CUSTOM"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of syncs for the company.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ListSyncsResponse"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "List",
        "tags": [
          "Syncs"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/syncs/{syncId}/cancel": {
      "post": {
        "operationId": "SyncActionController_cancelSync",
        "parameters": [
          {
            "name": "syncId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        },
        "summary": "Cancel",
        "tags": [
          "SyncAction"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/syncs/{syncId}/retry": {
      "post": {
        "operationId": "SyncActionController_retrySync",
        "parameters": [
          {
            "name": "syncId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitSyncResponse"
                }
              }
            }
          }
        },
        "summary": "Retry",
        "tags": [
          "SyncAction"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/syncs/{syncId}/jobs": {
      "get": {
        "operationId": "JobController_list",
        "parameters": [
          {
            "name": "syncId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": true,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 500,
              "default": 200,
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListJobsResponse"
                }
              }
            }
          }
        },
        "summary": "List",
        "tags": [
          "Job"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/companies/{companyId}/documents": {
      "post": {
        "operationId": "DocumentWriteController_uploadDocument",
        "parameters": [
          {
            "name": "companyId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "File to upload (multipart form field `file`)."
                  },
                  "document_type": {
                    "type": "string",
                    "example": "INVOICE",
                    "description": "Parent record type."
                  },
                  "document_type_id": {
                    "type": "string",
                    "example": "inv_123",
                    "description": "Platform ID of the parent record."
                  },
                  "base64_file": {
                    "type": "string",
                    "description": "Base64-encoded file content, as an alternative to a multipart `file`."
                  },
                  "file_name": {
                    "type": "string",
                    "example": "invoice.pdf",
                    "description": "File name, required when using `base64_file`."
                  }
                }
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "File to upload (multipart form field `file`)."
                  },
                  "document_type": {
                    "type": "string",
                    "example": "INVOICE",
                    "description": "Parent record type."
                  },
                  "document_type_id": {
                    "type": "string",
                    "example": "inv_123",
                    "description": "Platform ID of the parent record."
                  },
                  "base64_file": {
                    "type": "string",
                    "description": "Base64-encoded file content, as an alternative to a multipart `file`."
                  },
                  "file_name": {
                    "type": "string",
                    "example": "invoice.pdf",
                    "description": "File name, required when using `base64_file`."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "tags": [
          "DocumentWrite"
        ],
        "x-audience": "customer"
      },
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "List documents",
        "operationId": "list_documents",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "file_name[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on file_name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "file_name[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated file_name values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "file_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on file_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "file_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated file_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "document_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on document_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "document_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated document_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of documents.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Document"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/stats": {
      "get": {
        "operationId": "StatsController_get",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardStatsResponse"
                }
              }
            }
          }
        },
        "summary": "Get",
        "tags": [
          "Stats"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/integrations": {
      "get": {
        "operationId": "IntegrationController_list",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListIntegrationsResponse"
                }
              }
            }
          }
        },
        "summary": "List",
        "tags": [
          "Integration"
        ],
        "x-audience": "customer"
      },
      "post": {
        "operationId": "IntegrationController_save",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveIntegrationDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SaveIntegrationResponse"
                }
              }
            }
          }
        },
        "summary": "Save settings",
        "tags": [
          "Integration"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/integrations/{integrationType}/webhook-topics": {
      "get": {
        "operationId": "IntegrationController_getWebhookTopics",
        "parameters": [
          {
            "name": "integrationType",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetWebhookTopicsResponse"
                }
              }
            }
          }
        },
        "summary": "List webhook topics",
        "tags": [
          "Integration"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/integrations/{integrationType}/webhook-setup": {
      "get": {
        "operationId": "IntegrationController_getWebhookSetup",
        "parameters": [
          {
            "name": "integrationType",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetWebhookSetupResponse"
                }
              }
            }
          }
        },
        "summary": "Get webhook setup",
        "tags": [
          "Integration"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/integrations/{integrationType}": {
      "get": {
        "operationId": "IntegrationController_get",
        "parameters": [
          {
            "name": "integrationType",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetIntegrationResponse"
                }
              }
            }
          }
        },
        "summary": "Get",
        "tags": [
          "Integration"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/passthrough": {
      "post": {
        "operationId": "PassthroughController_execute",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PassthroughRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "summary": "Make a request",
        "tags": [
          "Passthrough"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/webhook-config": {
      "get": {
        "operationId": "WebhookConfigController_list",
        "parameters": [
          {
            "name": "integration_type",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "BUSY",
                "CLEARBOOKS",
                "FREEAGENT",
                "FRESHBOOKS",
                "KASHFLOW",
                "MEKARI_JURNAL",
                "MS_DYNAMICS_365",
                "MS_DYNAMICS_365_FO",
                "MYOB_BUSINESS",
                "NETSUITE",
                "ODOO_ACCOUNTING",
                "QOYOD",
                "QUICKBOOKS",
                "QUICKBOOKS_SANDBOX",
                "ROOTFI_SANDBOX",
                "SAGE_CLOUD_ACCOUNTING",
                "SAGE_ZA_CLOUD_ACCOUNTING",
                "SAGE_INTACCT",
                "TALLY",
                "WAFEQ",
                "WAVE",
                "XERO",
                "ZOHO_BOOKS",
                "PUZZLE_SANDBOX",
                "PUZZLE",
                "RILLET",
                "RILLET_SANDBOX",
                "AMAZON",
                "BIG_COMMERCE",
                "SHOPIFY",
                "SQUARESPACE",
                "WIX",
                "WOO_COMMERCE",
                "GOOGLE_PLAYSTORE",
                "CHARGEBEE",
                "MOLLIE",
                "PAYPAL",
                "PAYPAL_SANDBOX",
                "RAZORPAY",
                "SQUARE",
                "SQUARE_SANDBOX",
                "STRIPE",
                "STRIPE_TEST",
                "STRIPE_SANDBOX",
                "ZOHO_INVOICE",
                "PADDLE",
                "PADDLE_SANDBOX",
                "HUBSPOT",
                "PIPEDRIVE",
                "SALES_FORCE",
                "ZOHO_CRM",
                "GUSTO"
              ]
            }
          },
          {
            "name": "webhook_type",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "DATA_MODEL_CHANGES",
                "CONNECTION_CHANGED",
                "SYNC_COMPLETED",
                "SYNC_STARTED",
                "INTEGRATION",
                "DISCONNECT_REQUESTED"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListWebhookConfigsResponse"
                }
              }
            }
          }
        },
        "summary": "List",
        "tags": [
          "WebhookConfig"
        ],
        "x-audience": "customer"
      },
      "post": {
        "operationId": "WebhookConfigController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWebhookConfigDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateWebhookConfigResponse"
                }
              }
            }
          }
        },
        "summary": "Create",
        "tags": [
          "WebhookConfig"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/webhook-config/platform-topics": {
      "get": {
        "operationId": "WebhookConfigController_getPlatformTopics",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformTopicsResponse"
                }
              }
            }
          }
        },
        "summary": "List platform topics",
        "tags": [
          "WebhookConfig"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/webhook-config/{webhookConfigId}": {
      "get": {
        "operationId": "WebhookConfigController_get",
        "parameters": [
          {
            "name": "webhookConfigId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetWebhookConfigResponse"
                }
              }
            }
          }
        },
        "summary": "Get",
        "tags": [
          "WebhookConfig"
        ],
        "x-audience": "customer"
      },
      "put": {
        "operationId": "WebhookConfigController_update",
        "parameters": [
          {
            "name": "webhookConfigId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWebhookConfigDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetWebhookConfigResponse"
                }
              }
            }
          }
        },
        "summary": "Update",
        "tags": [
          "WebhookConfig"
        ],
        "x-audience": "customer"
      },
      "delete": {
        "operationId": "WebhookConfigController_delete",
        "parameters": [
          {
            "name": "webhookConfigId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          }
        },
        "summary": "Delete",
        "tags": [
          "WebhookConfig"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/webhook-credential": {
      "get": {
        "operationId": "WebhookCredentialController_list",
        "parameters": [
          {
            "name": "integration_type",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "BUSY",
                "CLEARBOOKS",
                "FREEAGENT",
                "FRESHBOOKS",
                "KASHFLOW",
                "MEKARI_JURNAL",
                "MS_DYNAMICS_365",
                "MS_DYNAMICS_365_FO",
                "MYOB_BUSINESS",
                "NETSUITE",
                "ODOO_ACCOUNTING",
                "QOYOD",
                "QUICKBOOKS",
                "QUICKBOOKS_SANDBOX",
                "ROOTFI_SANDBOX",
                "SAGE_CLOUD_ACCOUNTING",
                "SAGE_ZA_CLOUD_ACCOUNTING",
                "SAGE_INTACCT",
                "TALLY",
                "WAFEQ",
                "WAVE",
                "XERO",
                "ZOHO_BOOKS",
                "PUZZLE_SANDBOX",
                "PUZZLE",
                "RILLET",
                "RILLET_SANDBOX",
                "AMAZON",
                "BIG_COMMERCE",
                "SHOPIFY",
                "SQUARESPACE",
                "WIX",
                "WOO_COMMERCE",
                "GOOGLE_PLAYSTORE",
                "CHARGEBEE",
                "MOLLIE",
                "PAYPAL",
                "PAYPAL_SANDBOX",
                "RAZORPAY",
                "SQUARE",
                "SQUARE_SANDBOX",
                "STRIPE",
                "STRIPE_TEST",
                "STRIPE_SANDBOX",
                "ZOHO_INVOICE",
                "PADDLE",
                "PADDLE_SANDBOX",
                "HUBSPOT",
                "PIPEDRIVE",
                "SALES_FORCE",
                "ZOHO_CRM",
                "GUSTO"
              ]
            }
          },
          {
            "name": "rootfi_company_id",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "nullable": true,
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListWebhookCredentialsResponse"
                }
              }
            }
          }
        },
        "summary": "List",
        "tags": [
          "WebhookCredential"
        ],
        "x-audience": "customer"
      },
      "post": {
        "operationId": "WebhookCredentialController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWebhookCredentialDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateWebhookCredentialResponse"
                }
              }
            }
          }
        },
        "summary": "Create",
        "tags": [
          "WebhookCredential"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/webhook-credential/{webhookCredentialId}": {
      "get": {
        "operationId": "WebhookCredentialController_get",
        "parameters": [
          {
            "name": "webhookCredentialId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetWebhookCredentialResponse"
                }
              }
            }
          }
        },
        "summary": "Get",
        "tags": [
          "WebhookCredential"
        ],
        "x-audience": "customer"
      },
      "put": {
        "operationId": "WebhookCredentialController_update",
        "parameters": [
          {
            "name": "webhookCredentialId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWebhookCredentialDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetWebhookCredentialResponse"
                }
              }
            }
          }
        },
        "summary": "Update",
        "tags": [
          "WebhookCredential"
        ],
        "x-audience": "customer"
      },
      "delete": {
        "operationId": "WebhookCredentialController_delete",
        "parameters": [
          {
            "name": "webhookCredentialId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          }
        },
        "summary": "Delete",
        "tags": [
          "WebhookCredential"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/members": {
      "get": {
        "operationId": "MemberController_listMembers",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListMembersResponse"
                }
              }
            }
          }
        },
        "summary": "List",
        "tags": [
          "Member"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/members/invite": {
      "post": {
        "operationId": "MemberController_addMemberToOrganization",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InviteMemberDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InviteMemberResponse"
                }
              }
            }
          }
        },
        "summary": "Invite",
        "tags": [
          "Member"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/members/{memberId}": {
      "delete": {
        "operationId": "MemberController_delete",
        "parameters": [
          {
            "name": "memberId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          }
        },
        "summary": "Remove",
        "tags": [
          "Member"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/api-log": {
      "get": {
        "operationId": "ApiLogController_list",
        "parameters": [
          {
            "name": "limit",
            "required": true,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "FAILED",
                "SUCCESS"
              ]
            }
          },
          {
            "name": "fromDate",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "type": "number"
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "syncId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "logType",
            "required": false,
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "API",
                  "DASHBOARD",
                  "CONNECTION",
                  "INTERNAL",
                  "SDK",
                  "SYNC_API",
                  "PASSTHROUGH"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListApiLogsResponse"
                }
              }
            }
          }
        },
        "summary": "List",
        "tags": [
          "ApiLog"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/api-log/{logId}": {
      "get": {
        "operationId": "ApiLogController_findById",
        "parameters": [
          {
            "name": "logId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetApiLogResponse"
                }
              }
            }
          }
        },
        "summary": "Get",
        "tags": [
          "ApiLog"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/webhook-logs": {
      "get": {
        "operationId": "WebhookLogController_list",
        "parameters": [
          {
            "name": "limit",
            "required": true,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "PENDING",
                "FAILED",
                "PROCESSING",
                "DELIVERED"
              ]
            }
          },
          {
            "name": "fromDate",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhookId",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "type": "number"
            }
          },
          {
            "name": "syncId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListWebhookLogsResponse"
                }
              }
            }
          }
        },
        "summary": "List",
        "tags": [
          "WebhookLog"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/webhook-logs/{deliveryId}": {
      "get": {
        "operationId": "WebhookLogController_findById",
        "parameters": [
          {
            "name": "deliveryId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetWebhookLogResponse"
                }
              }
            }
          }
        },
        "summary": "Get",
        "tags": [
          "WebhookLog"
        ],
        "x-audience": "customer"
      }
    },
    "/v4/core/companies/{companyId}/contacts": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting",
          "Payments",
          "E-Commerce",
          "CRM"
        ],
        "summary": "List contacts",
        "operationId": "list_contacts",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand: addresses, phone_numbers, external_links.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on type.",
            "schema": {
              "type": "string",
              "enum": [
                "CUSTOMER",
                "VENDOR",
                "BOTH",
                "UNKNOWN"
              ]
            }
          },
          {
            "name": "type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on status.",
            "schema": {
              "type": "string",
              "enum": [
                "ACTIVE",
                "INACTIVE",
                "SUSPENDED",
                "ARCHIVED",
                "UNKNOWN"
              ]
            }
          },
          {
            "name": "status[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated status values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated name values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on email.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated email values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phone[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on phone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phone[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated phone values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on created_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated created_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[gte]",
            "in": "query",
            "required": false,
            "description": "created_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[lte]",
            "in": "query",
            "required": false,
            "description": "created_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of contacts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Contact"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "x-audience": "customer",
        "tags": [
          "Accounting",
          "Payments",
          "E-Commerce",
          "CRM"
        ],
        "summary": "Create a contact",
        "operationId": "create_contacts",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ContactWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/ContactWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created contacts record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/Contact"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "x-audience": "customer",
        "tags": [
          "Accounting",
          "Payments",
          "E-Commerce",
          "CRM"
        ],
        "summary": "Update a contact",
        "operationId": "update_contacts",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ContactWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/ContactWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated contacts record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/Contact"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/contacts/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting",
          "Payments",
          "E-Commerce",
          "CRM"
        ],
        "summary": "Get a contact",
        "operationId": "get_contacts",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single contacts record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Contact"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/transactions": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Payments",
          "E-Commerce"
        ],
        "summary": "List transactions",
        "operationId": "list_transactions",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on type.",
            "schema": {
              "type": "string",
              "enum": [
                "PAYMENT",
                "REFUND",
                "CREDIT_NOTE",
                "FEE",
                "CHARGEBACK",
                "PAYOUT",
                "ADJUSTMENT"
              ]
            }
          },
          {
            "name": "type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on status.",
            "schema": {
              "type": "string",
              "enum": [
                "REQUIRES_ACTION",
                "PENDING",
                "AUTHORIZED",
                "PAID",
                "FAILED",
                "CANCELED",
                "REFUNDED",
                "UNKNOWN",
                "REVERSED"
              ]
            }
          },
          {
            "name": "status[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated status values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "payment_method_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on payment_method_type.",
            "schema": {
              "type": "string",
              "enum": [
                "CARD",
                "BANK_TRANSFER",
                "WIRE_TRANSFER",
                "PAYPAL",
                "APPLE_PAY",
                "GOOGLE_PAY",
                "CHECK",
                "CASH",
                "CRYPTO",
                "OTHER",
                "UNKNOWN"
              ]
            }
          },
          {
            "name": "payment_method_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated payment_method_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "invoice_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on invoice_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "invoice_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated invoice_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on order_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated order_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subscription_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on subscription_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subscription_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated subscription_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on contact_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated contact_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "gateway[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on gateway.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "gateway[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated gateway values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on created_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated created_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[gte]",
            "in": "query",
            "required": false,
            "description": "created_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[lte]",
            "in": "query",
            "required": false,
            "description": "created_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of transactions.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Transaction"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/transactions/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Payments",
          "E-Commerce"
        ],
        "summary": "Get a transaction",
        "operationId": "get_transactions",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single transactions record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Transaction"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/invoices": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting",
          "Payments"
        ],
        "summary": "List invoices",
        "operationId": "list_invoices",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand: line_items, addresses, documents.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on status.",
            "schema": {
              "type": "string",
              "enum": [
                "DRAFT",
                "SUBMITTED",
                "PARTIALLY_PAID",
                "PAID",
                "OVERDUE",
                "VOID",
                "UNKNOWN"
              ]
            }
          },
          {
            "name": "status[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated status values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on contact_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated contact_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subscription_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on subscription_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subscription_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated subscription_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on currency_id.",
            "schema": {
              "type": "string",
              "enum": [
                "AED",
                "AFN",
                "ALL",
                "AMD",
                "ANG",
                "AOA",
                "ARS",
                "AUD",
                "AWG",
                "AZN",
                "BAM",
                "BBD",
                "BDT",
                "BGN",
                "BHD",
                "BIF",
                "BMD",
                "BND",
                "BOB",
                "BOV",
                "BRL",
                "BSD",
                "BTN",
                "BWP",
                "BYN",
                "BZD",
                "CAD",
                "CDF",
                "CHE",
                "CHF",
                "CHW",
                "CLF",
                "CLP",
                "CNY",
                "COP",
                "COU",
                "CRC",
                "CUC",
                "CUP",
                "CVE",
                "CZK",
                "DJF",
                "DKK",
                "DOP",
                "DZD",
                "EGP",
                "ERN",
                "ETB",
                "EUR",
                "FJD",
                "FKP",
                "GBP",
                "GEL",
                "GHS",
                "GIP",
                "GMD",
                "GNF",
                "GTQ",
                "GYD",
                "HKD",
                "HNL",
                "HTG",
                "HUF",
                "IDR",
                "ILS",
                "INR",
                "IQD",
                "IRR",
                "ISK",
                "JMD",
                "JOD",
                "JPY",
                "KES",
                "KGS",
                "KHR",
                "KMF",
                "KPW",
                "KRW",
                "KWD",
                "KYD",
                "KZT",
                "LAK",
                "LBP",
                "LKR",
                "LRD",
                "LSL",
                "LYD",
                "MAD",
                "MDL",
                "MGA",
                "MKD",
                "MMK",
                "MNT",
                "MOP",
                "MRU",
                "MUR",
                "MVR",
                "MWK",
                "MXN",
                "MXV",
                "MYR",
                "MZN",
                "NAD",
                "NGN",
                "NIO",
                "NOK",
                "NPR",
                "NZD",
                "OMR",
                "PAB",
                "PEN",
                "PGK",
                "PHP",
                "PKR",
                "PLN",
                "PYG",
                "QAR",
                "RON",
                "RSD",
                "RUB",
                "RWF",
                "SAR",
                "SBD",
                "SCR",
                "SDG",
                "SEK",
                "SGD",
                "SHP",
                "SLE",
                "SOS",
                "SRD",
                "SSP",
                "STN",
                "SVC",
                "SYP",
                "SZL",
                "THB",
                "TJS",
                "TMT",
                "TND",
                "TOP",
                "TRY",
                "TTD",
                "TWD",
                "TZS",
                "UAH",
                "UGX",
                "USD",
                "USN",
                "UYI",
                "UYU",
                "UYW",
                "UZS",
                "VED",
                "VES",
                "VND",
                "VUV",
                "WST",
                "XAF",
                "XAG",
                "XAU",
                "XBA",
                "XBB",
                "XBC",
                "XBD",
                "XCD",
                "XDR",
                "XOF",
                "XPD",
                "XPF",
                "XPT",
                "XSU",
                "XTS",
                "XUA",
                "XXX",
                "YER",
                "ZAR",
                "ZMW",
                "ZWG"
              ]
            }
          },
          {
            "name": "currency_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated currency_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "document_number[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on document_number.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "document_number[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated document_number values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on posted_date.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated posted_date values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[gte]",
            "in": "query",
            "required": false,
            "description": "posted_date greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[lte]",
            "in": "query",
            "required": false,
            "description": "posted_date less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on created_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated created_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[gte]",
            "in": "query",
            "required": false,
            "description": "created_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[lte]",
            "in": "query",
            "required": false,
            "description": "created_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of invoices.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Invoice"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "x-audience": "customer",
        "tags": [
          "Accounting",
          "Payments"
        ],
        "summary": "Create an invoice",
        "operationId": "create_invoices",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/InvoiceWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/InvoiceWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created invoices record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/Invoice"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "x-audience": "customer",
        "tags": [
          "Accounting",
          "Payments"
        ],
        "summary": "Update an invoice",
        "operationId": "update_invoices",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/InvoiceWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/InvoiceWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated invoices record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/Invoice"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/invoices/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting",
          "Payments"
        ],
        "summary": "Get an invoice",
        "operationId": "get_invoices",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single invoices record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Invoice"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/items": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting",
          "Payments",
          "E-Commerce"
        ],
        "summary": "List items",
        "operationId": "list_items",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand: variants.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated name values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sku[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on sku.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sku[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated sku values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on code.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated code values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on type.",
            "schema": {
              "type": "string",
              "enum": [
                "INVENTORY",
                "NON_INVENTORY",
                "SERVICE",
                "DIGITAL",
                "UNKNOWN"
              ]
            }
          },
          {
            "name": "type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on status.",
            "schema": {
              "type": "string",
              "enum": [
                "DRAFT",
                "ACTIVE",
                "ARCHIVED",
                "UNKNOWN"
              ]
            }
          },
          {
            "name": "status[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated status values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_bill_item[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on is_bill_item.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_bill_item[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated is_bill_item values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_invoice_item[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on is_invoice_item.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_invoice_item[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated is_invoice_item values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on currency_id.",
            "schema": {
              "type": "string",
              "enum": [
                "AED",
                "AFN",
                "ALL",
                "AMD",
                "ANG",
                "AOA",
                "ARS",
                "AUD",
                "AWG",
                "AZN",
                "BAM",
                "BBD",
                "BDT",
                "BGN",
                "BHD",
                "BIF",
                "BMD",
                "BND",
                "BOB",
                "BOV",
                "BRL",
                "BSD",
                "BTN",
                "BWP",
                "BYN",
                "BZD",
                "CAD",
                "CDF",
                "CHE",
                "CHF",
                "CHW",
                "CLF",
                "CLP",
                "CNY",
                "COP",
                "COU",
                "CRC",
                "CUC",
                "CUP",
                "CVE",
                "CZK",
                "DJF",
                "DKK",
                "DOP",
                "DZD",
                "EGP",
                "ERN",
                "ETB",
                "EUR",
                "FJD",
                "FKP",
                "GBP",
                "GEL",
                "GHS",
                "GIP",
                "GMD",
                "GNF",
                "GTQ",
                "GYD",
                "HKD",
                "HNL",
                "HTG",
                "HUF",
                "IDR",
                "ILS",
                "INR",
                "IQD",
                "IRR",
                "ISK",
                "JMD",
                "JOD",
                "JPY",
                "KES",
                "KGS",
                "KHR",
                "KMF",
                "KPW",
                "KRW",
                "KWD",
                "KYD",
                "KZT",
                "LAK",
                "LBP",
                "LKR",
                "LRD",
                "LSL",
                "LYD",
                "MAD",
                "MDL",
                "MGA",
                "MKD",
                "MMK",
                "MNT",
                "MOP",
                "MRU",
                "MUR",
                "MVR",
                "MWK",
                "MXN",
                "MXV",
                "MYR",
                "MZN",
                "NAD",
                "NGN",
                "NIO",
                "NOK",
                "NPR",
                "NZD",
                "OMR",
                "PAB",
                "PEN",
                "PGK",
                "PHP",
                "PKR",
                "PLN",
                "PYG",
                "QAR",
                "RON",
                "RSD",
                "RUB",
                "RWF",
                "SAR",
                "SBD",
                "SCR",
                "SDG",
                "SEK",
                "SGD",
                "SHP",
                "SLE",
                "SOS",
                "SRD",
                "SSP",
                "STN",
                "SVC",
                "SYP",
                "SZL",
                "THB",
                "TJS",
                "TMT",
                "TND",
                "TOP",
                "TRY",
                "TTD",
                "TWD",
                "TZS",
                "UAH",
                "UGX",
                "USD",
                "USN",
                "UYI",
                "UYU",
                "UYW",
                "UZS",
                "VED",
                "VES",
                "VND",
                "VUV",
                "WST",
                "XAF",
                "XAG",
                "XAU",
                "XBA",
                "XBB",
                "XBC",
                "XBD",
                "XCD",
                "XDR",
                "XOF",
                "XPD",
                "XPF",
                "XPT",
                "XSU",
                "XTS",
                "XUA",
                "XXX",
                "YER",
                "ZAR",
                "ZMW",
                "ZWG"
              ]
            }
          },
          {
            "name": "currency_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated currency_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on created_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated created_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[gte]",
            "in": "query",
            "required": false,
            "description": "created_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[lte]",
            "in": "query",
            "required": false,
            "description": "created_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of items.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Item"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "x-audience": "customer",
        "tags": [
          "Accounting",
          "Payments",
          "E-Commerce"
        ],
        "summary": "Create an item",
        "operationId": "create_items",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ItemWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/ItemWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created items record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/Item"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "x-audience": "customer",
        "tags": [
          "Accounting",
          "Payments",
          "E-Commerce"
        ],
        "summary": "Update an item",
        "operationId": "update_items",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ItemWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/ItemWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated items record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/Item"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/items/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting",
          "Payments",
          "E-Commerce"
        ],
        "summary": "Get an item",
        "operationId": "get_items",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single items record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Item"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/line_item": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting",
          "Payments",
          "E-Commerce"
        ],
        "summary": "List line item",
        "operationId": "list_line_item",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand: item, tax, account, variant.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "parent_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on parent_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "parent_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated parent_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "parent_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on parent_type.",
            "schema": {
              "type": "string",
              "enum": [
                "BILL",
                "INVOICE",
                "BILL_CREDIT_NOTE",
                "INVOICE_CREDIT_NOTE",
                "GOODS_RECEIPT_NOTE",
                "EXPENSE",
                "PURCHASE_ORDER",
                "SALES_ORDER",
                "CASH_REFUND",
                "CASH_SALE",
                "JOURNAL_ENTRY",
                "ORDER",
                "SUBSCRIPTION",
                "ESTIMATE"
              ]
            }
          },
          {
            "name": "parent_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated parent_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "item_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on item_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "item_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated item_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tax_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on tax_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tax_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated tax_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on account_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated account_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "variant_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on variant_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "variant_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated variant_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated name values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on description.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated description values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on created_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated created_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[gte]",
            "in": "query",
            "required": false,
            "description": "created_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[lte]",
            "in": "query",
            "required": false,
            "description": "created_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of line_item.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/LineItem"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/line_item/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting",
          "Payments",
          "E-Commerce"
        ],
        "summary": "Get a line item",
        "operationId": "get_line_item",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single line_item record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/LineItem"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/disputes": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Payments"
        ],
        "summary": "List disputes",
        "operationId": "list_disputes",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "status[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on status.",
            "schema": {
              "type": "string",
              "enum": [
                "OPEN",
                "UNDER_REVIEW",
                "WON",
                "LOST",
                "WARNING_CLOSED",
                "UNKNOWN"
              ]
            }
          },
          {
            "name": "status[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated status values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reason[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on reason.",
            "schema": {
              "type": "string",
              "enum": [
                "FRAUDULENT",
                "DUPLICATE",
                "UNRECOGNIZED",
                "QUALITY_ISSUE",
                "NOT_RECEIVED",
                "CANCELED",
                "OTHER"
              ]
            }
          },
          {
            "name": "reason[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated reason values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on currency_id.",
            "schema": {
              "type": "string",
              "enum": [
                "AED",
                "AFN",
                "ALL",
                "AMD",
                "ANG",
                "AOA",
                "ARS",
                "AUD",
                "AWG",
                "AZN",
                "BAM",
                "BBD",
                "BDT",
                "BGN",
                "BHD",
                "BIF",
                "BMD",
                "BND",
                "BOB",
                "BOV",
                "BRL",
                "BSD",
                "BTN",
                "BWP",
                "BYN",
                "BZD",
                "CAD",
                "CDF",
                "CHE",
                "CHF",
                "CHW",
                "CLF",
                "CLP",
                "CNY",
                "COP",
                "COU",
                "CRC",
                "CUC",
                "CUP",
                "CVE",
                "CZK",
                "DJF",
                "DKK",
                "DOP",
                "DZD",
                "EGP",
                "ERN",
                "ETB",
                "EUR",
                "FJD",
                "FKP",
                "GBP",
                "GEL",
                "GHS",
                "GIP",
                "GMD",
                "GNF",
                "GTQ",
                "GYD",
                "HKD",
                "HNL",
                "HTG",
                "HUF",
                "IDR",
                "ILS",
                "INR",
                "IQD",
                "IRR",
                "ISK",
                "JMD",
                "JOD",
                "JPY",
                "KES",
                "KGS",
                "KHR",
                "KMF",
                "KPW",
                "KRW",
                "KWD",
                "KYD",
                "KZT",
                "LAK",
                "LBP",
                "LKR",
                "LRD",
                "LSL",
                "LYD",
                "MAD",
                "MDL",
                "MGA",
                "MKD",
                "MMK",
                "MNT",
                "MOP",
                "MRU",
                "MUR",
                "MVR",
                "MWK",
                "MXN",
                "MXV",
                "MYR",
                "MZN",
                "NAD",
                "NGN",
                "NIO",
                "NOK",
                "NPR",
                "NZD",
                "OMR",
                "PAB",
                "PEN",
                "PGK",
                "PHP",
                "PKR",
                "PLN",
                "PYG",
                "QAR",
                "RON",
                "RSD",
                "RUB",
                "RWF",
                "SAR",
                "SBD",
                "SCR",
                "SDG",
                "SEK",
                "SGD",
                "SHP",
                "SLE",
                "SOS",
                "SRD",
                "SSP",
                "STN",
                "SVC",
                "SYP",
                "SZL",
                "THB",
                "TJS",
                "TMT",
                "TND",
                "TOP",
                "TRY",
                "TTD",
                "TWD",
                "TZS",
                "UAH",
                "UGX",
                "USD",
                "USN",
                "UYI",
                "UYU",
                "UYW",
                "UZS",
                "VED",
                "VES",
                "VND",
                "VUV",
                "WST",
                "XAF",
                "XAG",
                "XAU",
                "XBA",
                "XBB",
                "XBC",
                "XBD",
                "XCD",
                "XDR",
                "XOF",
                "XPD",
                "XPF",
                "XPT",
                "XSU",
                "XTS",
                "XUA",
                "XXX",
                "YER",
                "ZAR",
                "ZMW",
                "ZWG"
              ]
            }
          },
          {
            "name": "currency_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated currency_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "gateway[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on gateway.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "gateway[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated gateway values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on created_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated created_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[gte]",
            "in": "query",
            "required": false,
            "description": "created_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[lte]",
            "in": "query",
            "required": false,
            "description": "created_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of disputes.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Dispute"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/disputes/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Payments"
        ],
        "summary": "Get a dispute",
        "operationId": "get_disputes",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single disputes record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Dispute"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/subscriptions": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting",
          "Payments"
        ],
        "summary": "List subscriptions",
        "operationId": "list_subscriptions",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand: line_items.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on status.",
            "schema": {
              "type": "string",
              "enum": [
                "ACTIVE",
                "IN_TRIAL",
                "CANCELED",
                "PAUSED",
                "PAST_DUE",
                "INCOMPLETE",
                "UNKNOWN"
              ]
            }
          },
          {
            "name": "status[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated status values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "interval[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on interval.",
            "schema": {
              "type": "string",
              "enum": [
                "DAY",
                "WEEK",
                "MONTH",
                "YEAR"
              ]
            }
          },
          {
            "name": "interval[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated interval values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on currency_id.",
            "schema": {
              "type": "string",
              "enum": [
                "AED",
                "AFN",
                "ALL",
                "AMD",
                "ANG",
                "AOA",
                "ARS",
                "AUD",
                "AWG",
                "AZN",
                "BAM",
                "BBD",
                "BDT",
                "BGN",
                "BHD",
                "BIF",
                "BMD",
                "BND",
                "BOB",
                "BOV",
                "BRL",
                "BSD",
                "BTN",
                "BWP",
                "BYN",
                "BZD",
                "CAD",
                "CDF",
                "CHE",
                "CHF",
                "CHW",
                "CLF",
                "CLP",
                "CNY",
                "COP",
                "COU",
                "CRC",
                "CUC",
                "CUP",
                "CVE",
                "CZK",
                "DJF",
                "DKK",
                "DOP",
                "DZD",
                "EGP",
                "ERN",
                "ETB",
                "EUR",
                "FJD",
                "FKP",
                "GBP",
                "GEL",
                "GHS",
                "GIP",
                "GMD",
                "GNF",
                "GTQ",
                "GYD",
                "HKD",
                "HNL",
                "HTG",
                "HUF",
                "IDR",
                "ILS",
                "INR",
                "IQD",
                "IRR",
                "ISK",
                "JMD",
                "JOD",
                "JPY",
                "KES",
                "KGS",
                "KHR",
                "KMF",
                "KPW",
                "KRW",
                "KWD",
                "KYD",
                "KZT",
                "LAK",
                "LBP",
                "LKR",
                "LRD",
                "LSL",
                "LYD",
                "MAD",
                "MDL",
                "MGA",
                "MKD",
                "MMK",
                "MNT",
                "MOP",
                "MRU",
                "MUR",
                "MVR",
                "MWK",
                "MXN",
                "MXV",
                "MYR",
                "MZN",
                "NAD",
                "NGN",
                "NIO",
                "NOK",
                "NPR",
                "NZD",
                "OMR",
                "PAB",
                "PEN",
                "PGK",
                "PHP",
                "PKR",
                "PLN",
                "PYG",
                "QAR",
                "RON",
                "RSD",
                "RUB",
                "RWF",
                "SAR",
                "SBD",
                "SCR",
                "SDG",
                "SEK",
                "SGD",
                "SHP",
                "SLE",
                "SOS",
                "SRD",
                "SSP",
                "STN",
                "SVC",
                "SYP",
                "SZL",
                "THB",
                "TJS",
                "TMT",
                "TND",
                "TOP",
                "TRY",
                "TTD",
                "TWD",
                "TZS",
                "UAH",
                "UGX",
                "USD",
                "USN",
                "UYI",
                "UYU",
                "UYW",
                "UZS",
                "VED",
                "VES",
                "VND",
                "VUV",
                "WST",
                "XAF",
                "XAG",
                "XAU",
                "XBA",
                "XBB",
                "XBC",
                "XBD",
                "XCD",
                "XDR",
                "XOF",
                "XPD",
                "XPF",
                "XPT",
                "XSU",
                "XTS",
                "XUA",
                "XXX",
                "YER",
                "ZAR",
                "ZMW",
                "ZWG"
              ]
            }
          },
          {
            "name": "currency_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated currency_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on contact_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated contact_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on created_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated created_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[gte]",
            "in": "query",
            "required": false,
            "description": "created_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[lte]",
            "in": "query",
            "required": false,
            "description": "created_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of subscriptions.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Subscription"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "x-audience": "customer",
        "tags": [
          "Accounting",
          "Payments"
        ],
        "summary": "Create a subscription",
        "operationId": "create_subscriptions",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/SubscriptionWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/SubscriptionWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created subscriptions record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/Subscription"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "x-audience": "customer",
        "tags": [
          "Accounting",
          "Payments"
        ],
        "summary": "Update a subscription",
        "operationId": "update_subscriptions",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/SubscriptionWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/SubscriptionWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated subscriptions record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/Subscription"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/subscriptions/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting",
          "Payments"
        ],
        "summary": "Get a subscription",
        "operationId": "get_subscriptions",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single subscriptions record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Subscription"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/orders": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Payments",
          "E-Commerce"
        ],
        "summary": "List orders",
        "operationId": "list_orders",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand: line_items, transactions, addresses.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on status.",
            "schema": {
              "type": "string",
              "enum": [
                "PENDING",
                "PROCESSING",
                "COMPLETED",
                "CANCELED",
                "ON_HOLD",
                "UNKNOWN"
              ]
            }
          },
          {
            "name": "status[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated status values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "payment_status[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on payment_status.",
            "schema": {
              "type": "string",
              "enum": [
                "DRAFT",
                "PENDING",
                "PAID",
                "PARTIALLY_PAID",
                "FAILED",
                "REFUNDED",
                "PARTIALLY_REFUNDED",
                "VOIDED",
                "UNKNOWN"
              ]
            }
          },
          {
            "name": "payment_status[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated payment_status values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on currency_id.",
            "schema": {
              "type": "string",
              "enum": [
                "AED",
                "AFN",
                "ALL",
                "AMD",
                "ANG",
                "AOA",
                "ARS",
                "AUD",
                "AWG",
                "AZN",
                "BAM",
                "BBD",
                "BDT",
                "BGN",
                "BHD",
                "BIF",
                "BMD",
                "BND",
                "BOB",
                "BOV",
                "BRL",
                "BSD",
                "BTN",
                "BWP",
                "BYN",
                "BZD",
                "CAD",
                "CDF",
                "CHE",
                "CHF",
                "CHW",
                "CLF",
                "CLP",
                "CNY",
                "COP",
                "COU",
                "CRC",
                "CUC",
                "CUP",
                "CVE",
                "CZK",
                "DJF",
                "DKK",
                "DOP",
                "DZD",
                "EGP",
                "ERN",
                "ETB",
                "EUR",
                "FJD",
                "FKP",
                "GBP",
                "GEL",
                "GHS",
                "GIP",
                "GMD",
                "GNF",
                "GTQ",
                "GYD",
                "HKD",
                "HNL",
                "HTG",
                "HUF",
                "IDR",
                "ILS",
                "INR",
                "IQD",
                "IRR",
                "ISK",
                "JMD",
                "JOD",
                "JPY",
                "KES",
                "KGS",
                "KHR",
                "KMF",
                "KPW",
                "KRW",
                "KWD",
                "KYD",
                "KZT",
                "LAK",
                "LBP",
                "LKR",
                "LRD",
                "LSL",
                "LYD",
                "MAD",
                "MDL",
                "MGA",
                "MKD",
                "MMK",
                "MNT",
                "MOP",
                "MRU",
                "MUR",
                "MVR",
                "MWK",
                "MXN",
                "MXV",
                "MYR",
                "MZN",
                "NAD",
                "NGN",
                "NIO",
                "NOK",
                "NPR",
                "NZD",
                "OMR",
                "PAB",
                "PEN",
                "PGK",
                "PHP",
                "PKR",
                "PLN",
                "PYG",
                "QAR",
                "RON",
                "RSD",
                "RUB",
                "RWF",
                "SAR",
                "SBD",
                "SCR",
                "SDG",
                "SEK",
                "SGD",
                "SHP",
                "SLE",
                "SOS",
                "SRD",
                "SSP",
                "STN",
                "SVC",
                "SYP",
                "SZL",
                "THB",
                "TJS",
                "TMT",
                "TND",
                "TOP",
                "TRY",
                "TTD",
                "TWD",
                "TZS",
                "UAH",
                "UGX",
                "USD",
                "USN",
                "UYI",
                "UYU",
                "UYW",
                "UZS",
                "VED",
                "VES",
                "VND",
                "VUV",
                "WST",
                "XAF",
                "XAG",
                "XAU",
                "XBA",
                "XBB",
                "XBC",
                "XBD",
                "XCD",
                "XDR",
                "XOF",
                "XPD",
                "XPF",
                "XPT",
                "XSU",
                "XTS",
                "XUA",
                "XXX",
                "YER",
                "ZAR",
                "ZMW",
                "ZWG"
              ]
            }
          },
          {
            "name": "currency_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated currency_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on contact_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated contact_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on created_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated created_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[gte]",
            "in": "query",
            "required": false,
            "description": "created_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[lte]",
            "in": "query",
            "required": false,
            "description": "created_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of orders.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Order"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/orders/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Payments",
          "E-Commerce"
        ],
        "summary": "Get an order",
        "operationId": "get_orders",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single orders record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Order"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/tax_rates": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting",
          "Payments"
        ],
        "summary": "List tax rates",
        "operationId": "list_tax_rates",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "status[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on status.",
            "schema": {
              "type": "string",
              "enum": [
                "ACTIVE",
                "ARCHIVED",
                "UNKNOWN"
              ]
            }
          },
          {
            "name": "status[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated status values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jurisdiction[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on jurisdiction.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jurisdiction[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated jurisdiction values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on created_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated created_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[gte]",
            "in": "query",
            "required": false,
            "description": "created_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[lte]",
            "in": "query",
            "required": false,
            "description": "created_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of tax_rates.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/TaxRate"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "x-audience": "customer",
        "tags": [
          "Accounting",
          "Payments"
        ],
        "summary": "Create a tax rate",
        "operationId": "create_tax_rates",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/TaxRateWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/TaxRateWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created tax_rates record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/TaxRate"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "x-audience": "customer",
        "tags": [
          "Accounting",
          "Payments"
        ],
        "summary": "Update a tax rate",
        "operationId": "update_tax_rates",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/TaxRateWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/TaxRateWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated tax_rates record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/TaxRate"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/tax_rates/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting",
          "Payments"
        ],
        "summary": "Get a tax rate",
        "operationId": "get_tax_rates",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single tax_rates record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TaxRate"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/payouts": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Payments"
        ],
        "summary": "List payouts",
        "operationId": "list_payouts",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "status[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on status.",
            "schema": {
              "type": "string",
              "enum": [
                "PENDING",
                "IN_TRANSIT",
                "PAID",
                "CANCELED",
                "FAILED",
                "UNKNOWN"
              ]
            }
          },
          {
            "name": "status[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated status values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "schedule[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on schedule.",
            "schema": {
              "type": "string",
              "enum": [
                "MANUAL",
                "AUTOMATIC",
                "UNKNOWN"
              ]
            }
          },
          {
            "name": "schedule[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated schedule values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on type.",
            "schema": {
              "type": "string",
              "enum": [
                "BANK_ACCOUNT",
                "CARD",
                "FPX",
                "UNKNOWN"
              ]
            }
          },
          {
            "name": "type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on currency_id.",
            "schema": {
              "type": "string",
              "enum": [
                "AED",
                "AFN",
                "ALL",
                "AMD",
                "ANG",
                "AOA",
                "ARS",
                "AUD",
                "AWG",
                "AZN",
                "BAM",
                "BBD",
                "BDT",
                "BGN",
                "BHD",
                "BIF",
                "BMD",
                "BND",
                "BOB",
                "BOV",
                "BRL",
                "BSD",
                "BTN",
                "BWP",
                "BYN",
                "BZD",
                "CAD",
                "CDF",
                "CHE",
                "CHF",
                "CHW",
                "CLF",
                "CLP",
                "CNY",
                "COP",
                "COU",
                "CRC",
                "CUC",
                "CUP",
                "CVE",
                "CZK",
                "DJF",
                "DKK",
                "DOP",
                "DZD",
                "EGP",
                "ERN",
                "ETB",
                "EUR",
                "FJD",
                "FKP",
                "GBP",
                "GEL",
                "GHS",
                "GIP",
                "GMD",
                "GNF",
                "GTQ",
                "GYD",
                "HKD",
                "HNL",
                "HTG",
                "HUF",
                "IDR",
                "ILS",
                "INR",
                "IQD",
                "IRR",
                "ISK",
                "JMD",
                "JOD",
                "JPY",
                "KES",
                "KGS",
                "KHR",
                "KMF",
                "KPW",
                "KRW",
                "KWD",
                "KYD",
                "KZT",
                "LAK",
                "LBP",
                "LKR",
                "LRD",
                "LSL",
                "LYD",
                "MAD",
                "MDL",
                "MGA",
                "MKD",
                "MMK",
                "MNT",
                "MOP",
                "MRU",
                "MUR",
                "MVR",
                "MWK",
                "MXN",
                "MXV",
                "MYR",
                "MZN",
                "NAD",
                "NGN",
                "NIO",
                "NOK",
                "NPR",
                "NZD",
                "OMR",
                "PAB",
                "PEN",
                "PGK",
                "PHP",
                "PKR",
                "PLN",
                "PYG",
                "QAR",
                "RON",
                "RSD",
                "RUB",
                "RWF",
                "SAR",
                "SBD",
                "SCR",
                "SDG",
                "SEK",
                "SGD",
                "SHP",
                "SLE",
                "SOS",
                "SRD",
                "SSP",
                "STN",
                "SVC",
                "SYP",
                "SZL",
                "THB",
                "TJS",
                "TMT",
                "TND",
                "TOP",
                "TRY",
                "TTD",
                "TWD",
                "TZS",
                "UAH",
                "UGX",
                "USD",
                "USN",
                "UYI",
                "UYU",
                "UYW",
                "UZS",
                "VED",
                "VES",
                "VND",
                "VUV",
                "WST",
                "XAF",
                "XAG",
                "XAU",
                "XBA",
                "XBB",
                "XBC",
                "XBD",
                "XCD",
                "XDR",
                "XOF",
                "XPD",
                "XPF",
                "XPT",
                "XSU",
                "XTS",
                "XUA",
                "XXX",
                "YER",
                "ZAR",
                "ZMW",
                "ZWG"
              ]
            }
          },
          {
            "name": "currency_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated currency_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "gateway[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on gateway.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "gateway[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated gateway values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on created_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated created_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[gte]",
            "in": "query",
            "required": false,
            "description": "created_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[lte]",
            "in": "query",
            "required": false,
            "description": "created_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of payouts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Payout"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/payouts/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Payments"
        ],
        "summary": "Get a payout",
        "operationId": "get_payouts",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single payouts record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Payout"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/balances": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Payments"
        ],
        "summary": "List balances",
        "operationId": "list_balances",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "currency_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on currency_id.",
            "schema": {
              "type": "string",
              "enum": [
                "AED",
                "AFN",
                "ALL",
                "AMD",
                "ANG",
                "AOA",
                "ARS",
                "AUD",
                "AWG",
                "AZN",
                "BAM",
                "BBD",
                "BDT",
                "BGN",
                "BHD",
                "BIF",
                "BMD",
                "BND",
                "BOB",
                "BOV",
                "BRL",
                "BSD",
                "BTN",
                "BWP",
                "BYN",
                "BZD",
                "CAD",
                "CDF",
                "CHE",
                "CHF",
                "CHW",
                "CLF",
                "CLP",
                "CNY",
                "COP",
                "COU",
                "CRC",
                "CUC",
                "CUP",
                "CVE",
                "CZK",
                "DJF",
                "DKK",
                "DOP",
                "DZD",
                "EGP",
                "ERN",
                "ETB",
                "EUR",
                "FJD",
                "FKP",
                "GBP",
                "GEL",
                "GHS",
                "GIP",
                "GMD",
                "GNF",
                "GTQ",
                "GYD",
                "HKD",
                "HNL",
                "HTG",
                "HUF",
                "IDR",
                "ILS",
                "INR",
                "IQD",
                "IRR",
                "ISK",
                "JMD",
                "JOD",
                "JPY",
                "KES",
                "KGS",
                "KHR",
                "KMF",
                "KPW",
                "KRW",
                "KWD",
                "KYD",
                "KZT",
                "LAK",
                "LBP",
                "LKR",
                "LRD",
                "LSL",
                "LYD",
                "MAD",
                "MDL",
                "MGA",
                "MKD",
                "MMK",
                "MNT",
                "MOP",
                "MRU",
                "MUR",
                "MVR",
                "MWK",
                "MXN",
                "MXV",
                "MYR",
                "MZN",
                "NAD",
                "NGN",
                "NIO",
                "NOK",
                "NPR",
                "NZD",
                "OMR",
                "PAB",
                "PEN",
                "PGK",
                "PHP",
                "PKR",
                "PLN",
                "PYG",
                "QAR",
                "RON",
                "RSD",
                "RUB",
                "RWF",
                "SAR",
                "SBD",
                "SCR",
                "SDG",
                "SEK",
                "SGD",
                "SHP",
                "SLE",
                "SOS",
                "SRD",
                "SSP",
                "STN",
                "SVC",
                "SYP",
                "SZL",
                "THB",
                "TJS",
                "TMT",
                "TND",
                "TOP",
                "TRY",
                "TTD",
                "TWD",
                "TZS",
                "UAH",
                "UGX",
                "USD",
                "USN",
                "UYI",
                "UYU",
                "UYW",
                "UZS",
                "VED",
                "VES",
                "VND",
                "VUV",
                "WST",
                "XAF",
                "XAG",
                "XAU",
                "XBA",
                "XBB",
                "XBC",
                "XBD",
                "XCD",
                "XDR",
                "XOF",
                "XPD",
                "XPF",
                "XPT",
                "XSU",
                "XTS",
                "XUA",
                "XXX",
                "YER",
                "ZAR",
                "ZMW",
                "ZWG"
              ]
            }
          },
          {
            "name": "currency_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated currency_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of balances.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Balance"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/balances/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Payments"
        ],
        "summary": "Get a balance",
        "operationId": "get_balances",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single balances record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Balance"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/accounts": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "List accounts",
        "operationId": "list_accounts",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "status[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on status.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated status values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on category.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated category values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sub_category[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on sub_category.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sub_category[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated sub_category values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on currency_id.",
            "schema": {
              "type": "string",
              "enum": [
                "AED",
                "AFN",
                "ALL",
                "AMD",
                "ANG",
                "AOA",
                "ARS",
                "AUD",
                "AWG",
                "AZN",
                "BAM",
                "BBD",
                "BDT",
                "BGN",
                "BHD",
                "BIF",
                "BMD",
                "BND",
                "BOB",
                "BOV",
                "BRL",
                "BSD",
                "BTN",
                "BWP",
                "BYN",
                "BZD",
                "CAD",
                "CDF",
                "CHE",
                "CHF",
                "CHW",
                "CLF",
                "CLP",
                "CNY",
                "COP",
                "COU",
                "CRC",
                "CUC",
                "CUP",
                "CVE",
                "CZK",
                "DJF",
                "DKK",
                "DOP",
                "DZD",
                "EGP",
                "ERN",
                "ETB",
                "EUR",
                "FJD",
                "FKP",
                "GBP",
                "GEL",
                "GHS",
                "GIP",
                "GMD",
                "GNF",
                "GTQ",
                "GYD",
                "HKD",
                "HNL",
                "HTG",
                "HUF",
                "IDR",
                "ILS",
                "INR",
                "IQD",
                "IRR",
                "ISK",
                "JMD",
                "JOD",
                "JPY",
                "KES",
                "KGS",
                "KHR",
                "KMF",
                "KPW",
                "KRW",
                "KWD",
                "KYD",
                "KZT",
                "LAK",
                "LBP",
                "LKR",
                "LRD",
                "LSL",
                "LYD",
                "MAD",
                "MDL",
                "MGA",
                "MKD",
                "MMK",
                "MNT",
                "MOP",
                "MRU",
                "MUR",
                "MVR",
                "MWK",
                "MXN",
                "MXV",
                "MYR",
                "MZN",
                "NAD",
                "NGN",
                "NIO",
                "NOK",
                "NPR",
                "NZD",
                "OMR",
                "PAB",
                "PEN",
                "PGK",
                "PHP",
                "PKR",
                "PLN",
                "PYG",
                "QAR",
                "RON",
                "RSD",
                "RUB",
                "RWF",
                "SAR",
                "SBD",
                "SCR",
                "SDG",
                "SEK",
                "SGD",
                "SHP",
                "SLE",
                "SOS",
                "SRD",
                "SSP",
                "STN",
                "SVC",
                "SYP",
                "SZL",
                "THB",
                "TJS",
                "TMT",
                "TND",
                "TOP",
                "TRY",
                "TTD",
                "TWD",
                "TZS",
                "UAH",
                "UGX",
                "USD",
                "USN",
                "UYI",
                "UYU",
                "UYW",
                "UZS",
                "VED",
                "VES",
                "VND",
                "VUV",
                "WST",
                "XAF",
                "XAG",
                "XAU",
                "XBA",
                "XBB",
                "XBC",
                "XBD",
                "XCD",
                "XDR",
                "XOF",
                "XPD",
                "XPF",
                "XPT",
                "XSU",
                "XTS",
                "XUA",
                "XXX",
                "YER",
                "ZAR",
                "ZMW",
                "ZWG"
              ]
            }
          },
          {
            "name": "currency_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated currency_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of accounts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Account"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Create an account",
        "operationId": "create_accounts",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/AccountWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/AccountWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created accounts record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/Account"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Update an account",
        "operationId": "update_accounts",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/AccountWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/AccountWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated accounts record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/Account"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/accounts/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Get an account",
        "operationId": "get_accounts",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single accounts record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Account"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/currencies": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "List currencies",
        "operationId": "list_currencies",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "is_base_currency[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on is_base_currency.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_base_currency[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated is_base_currency values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of currencies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Currency"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/currencies/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Get a currency",
        "operationId": "get_currencies",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single currencies record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Currency"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/tracking_categories": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "List tracking categories",
        "operationId": "list_tracking_categories",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "name[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated name values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on status.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated status values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "parent_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on parent_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "parent_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated parent_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "has_children[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on has_children.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "has_children[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated has_children values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of tracking_categories.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/TrackingCategory"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/tracking_categories/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Get a tracking category",
        "operationId": "get_tracking_categories",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single tracking_categories record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TrackingCategory"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/bank_accounts": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "List bank accounts",
        "operationId": "list_bank_accounts",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "account_name[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on account_name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account_name[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated account_name values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "institution_name[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on institution_name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "institution_name[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated institution_name values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on currency_id.",
            "schema": {
              "type": "string",
              "enum": [
                "AED",
                "AFN",
                "ALL",
                "AMD",
                "ANG",
                "AOA",
                "ARS",
                "AUD",
                "AWG",
                "AZN",
                "BAM",
                "BBD",
                "BDT",
                "BGN",
                "BHD",
                "BIF",
                "BMD",
                "BND",
                "BOB",
                "BOV",
                "BRL",
                "BSD",
                "BTN",
                "BWP",
                "BYN",
                "BZD",
                "CAD",
                "CDF",
                "CHE",
                "CHF",
                "CHW",
                "CLF",
                "CLP",
                "CNY",
                "COP",
                "COU",
                "CRC",
                "CUC",
                "CUP",
                "CVE",
                "CZK",
                "DJF",
                "DKK",
                "DOP",
                "DZD",
                "EGP",
                "ERN",
                "ETB",
                "EUR",
                "FJD",
                "FKP",
                "GBP",
                "GEL",
                "GHS",
                "GIP",
                "GMD",
                "GNF",
                "GTQ",
                "GYD",
                "HKD",
                "HNL",
                "HTG",
                "HUF",
                "IDR",
                "ILS",
                "INR",
                "IQD",
                "IRR",
                "ISK",
                "JMD",
                "JOD",
                "JPY",
                "KES",
                "KGS",
                "KHR",
                "KMF",
                "KPW",
                "KRW",
                "KWD",
                "KYD",
                "KZT",
                "LAK",
                "LBP",
                "LKR",
                "LRD",
                "LSL",
                "LYD",
                "MAD",
                "MDL",
                "MGA",
                "MKD",
                "MMK",
                "MNT",
                "MOP",
                "MRU",
                "MUR",
                "MVR",
                "MWK",
                "MXN",
                "MXV",
                "MYR",
                "MZN",
                "NAD",
                "NGN",
                "NIO",
                "NOK",
                "NPR",
                "NZD",
                "OMR",
                "PAB",
                "PEN",
                "PGK",
                "PHP",
                "PKR",
                "PLN",
                "PYG",
                "QAR",
                "RON",
                "RSD",
                "RUB",
                "RWF",
                "SAR",
                "SBD",
                "SCR",
                "SDG",
                "SEK",
                "SGD",
                "SHP",
                "SLE",
                "SOS",
                "SRD",
                "SSP",
                "STN",
                "SVC",
                "SYP",
                "SZL",
                "THB",
                "TJS",
                "TMT",
                "TND",
                "TOP",
                "TRY",
                "TTD",
                "TWD",
                "TZS",
                "UAH",
                "UGX",
                "USD",
                "USN",
                "UYI",
                "UYU",
                "UYW",
                "UZS",
                "VED",
                "VES",
                "VND",
                "VUV",
                "WST",
                "XAF",
                "XAG",
                "XAU",
                "XBA",
                "XBB",
                "XBC",
                "XBD",
                "XCD",
                "XDR",
                "XOF",
                "XPD",
                "XPF",
                "XPT",
                "XSU",
                "XTS",
                "XUA",
                "XXX",
                "YER",
                "ZAR",
                "ZMW",
                "ZWG"
              ]
            }
          },
          {
            "name": "currency_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated currency_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on category.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated category values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of bank_accounts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/BankAccount"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Create a bank account",
        "operationId": "create_bank_accounts",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/BankAccountWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/BankAccountWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created bank_accounts record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/BankAccount"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Update a bank account",
        "operationId": "update_bank_accounts",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/BankAccountWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/BankAccountWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated bank_accounts record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/BankAccount"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/bank_accounts/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Get a bank account",
        "operationId": "get_bank_accounts",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single bank_accounts record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/BankAccount"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/company_info": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting",
          "E-Commerce"
        ],
        "summary": "List company info",
        "operationId": "list_company_info",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand: addresses, phone_numbers, external_links.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated name values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "legal_name[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on legal_name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "legal_name[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated legal_name values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "base_currency[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on base_currency.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "base_currency[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated base_currency values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of company_info.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CompanyInfo"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/company_info/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting",
          "E-Commerce"
        ],
        "summary": "Get a company info",
        "operationId": "get_company_info",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single company_info record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CompanyInfo"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/bills": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "List bills",
        "operationId": "list_bills",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand: line_items, documents, contact, currency, bill_payments.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on status.",
            "schema": {
              "type": "string",
              "enum": [
                "DRAFT",
                "SUBMITTED",
                "PARTIALLY_PAID",
                "PAID",
                "OVERDUE",
                "VOID",
                "UNKNOWN"
              ]
            }
          },
          {
            "name": "status[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated status values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on contact_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated contact_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on currency_id.",
            "schema": {
              "type": "string",
              "enum": [
                "AED",
                "AFN",
                "ALL",
                "AMD",
                "ANG",
                "AOA",
                "ARS",
                "AUD",
                "AWG",
                "AZN",
                "BAM",
                "BBD",
                "BDT",
                "BGN",
                "BHD",
                "BIF",
                "BMD",
                "BND",
                "BOB",
                "BOV",
                "BRL",
                "BSD",
                "BTN",
                "BWP",
                "BYN",
                "BZD",
                "CAD",
                "CDF",
                "CHE",
                "CHF",
                "CHW",
                "CLF",
                "CLP",
                "CNY",
                "COP",
                "COU",
                "CRC",
                "CUC",
                "CUP",
                "CVE",
                "CZK",
                "DJF",
                "DKK",
                "DOP",
                "DZD",
                "EGP",
                "ERN",
                "ETB",
                "EUR",
                "FJD",
                "FKP",
                "GBP",
                "GEL",
                "GHS",
                "GIP",
                "GMD",
                "GNF",
                "GTQ",
                "GYD",
                "HKD",
                "HNL",
                "HTG",
                "HUF",
                "IDR",
                "ILS",
                "INR",
                "IQD",
                "IRR",
                "ISK",
                "JMD",
                "JOD",
                "JPY",
                "KES",
                "KGS",
                "KHR",
                "KMF",
                "KPW",
                "KRW",
                "KWD",
                "KYD",
                "KZT",
                "LAK",
                "LBP",
                "LKR",
                "LRD",
                "LSL",
                "LYD",
                "MAD",
                "MDL",
                "MGA",
                "MKD",
                "MMK",
                "MNT",
                "MOP",
                "MRU",
                "MUR",
                "MVR",
                "MWK",
                "MXN",
                "MXV",
                "MYR",
                "MZN",
                "NAD",
                "NGN",
                "NIO",
                "NOK",
                "NPR",
                "NZD",
                "OMR",
                "PAB",
                "PEN",
                "PGK",
                "PHP",
                "PKR",
                "PLN",
                "PYG",
                "QAR",
                "RON",
                "RSD",
                "RUB",
                "RWF",
                "SAR",
                "SBD",
                "SCR",
                "SDG",
                "SEK",
                "SGD",
                "SHP",
                "SLE",
                "SOS",
                "SRD",
                "SSP",
                "STN",
                "SVC",
                "SYP",
                "SZL",
                "THB",
                "TJS",
                "TMT",
                "TND",
                "TOP",
                "TRY",
                "TTD",
                "TWD",
                "TZS",
                "UAH",
                "UGX",
                "USD",
                "USN",
                "UYI",
                "UYU",
                "UYW",
                "UZS",
                "VED",
                "VES",
                "VND",
                "VUV",
                "WST",
                "XAF",
                "XAG",
                "XAU",
                "XBA",
                "XBB",
                "XBC",
                "XBD",
                "XCD",
                "XDR",
                "XOF",
                "XPD",
                "XPF",
                "XPT",
                "XSU",
                "XTS",
                "XUA",
                "XXX",
                "YER",
                "ZAR",
                "ZMW",
                "ZWG"
              ]
            }
          },
          {
            "name": "currency_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated currency_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "document_number[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on document_number.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "document_number[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated document_number values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on posted_date.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated posted_date values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[gte]",
            "in": "query",
            "required": false,
            "description": "posted_date greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[lte]",
            "in": "query",
            "required": false,
            "description": "posted_date less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of bills.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Bill"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Create a bill",
        "operationId": "create_bills",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/BillWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/BillWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created bills record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/Bill"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Update a bill",
        "operationId": "update_bills",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/BillWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/BillWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated bills record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/Bill"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/bills/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Get a bill",
        "operationId": "get_bills",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single bills record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Bill"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/invoice_payments": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "List invoice payments",
        "operationId": "list_invoice_payments",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand: invoice, contact, currency, account.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on contact_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated contact_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on account_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated account_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "invoice_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on invoice_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "invoice_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated invoice_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on currency_id.",
            "schema": {
              "type": "string",
              "enum": [
                "AED",
                "AFN",
                "ALL",
                "AMD",
                "ANG",
                "AOA",
                "ARS",
                "AUD",
                "AWG",
                "AZN",
                "BAM",
                "BBD",
                "BDT",
                "BGN",
                "BHD",
                "BIF",
                "BMD",
                "BND",
                "BOB",
                "BOV",
                "BRL",
                "BSD",
                "BTN",
                "BWP",
                "BYN",
                "BZD",
                "CAD",
                "CDF",
                "CHE",
                "CHF",
                "CHW",
                "CLF",
                "CLP",
                "CNY",
                "COP",
                "COU",
                "CRC",
                "CUC",
                "CUP",
                "CVE",
                "CZK",
                "DJF",
                "DKK",
                "DOP",
                "DZD",
                "EGP",
                "ERN",
                "ETB",
                "EUR",
                "FJD",
                "FKP",
                "GBP",
                "GEL",
                "GHS",
                "GIP",
                "GMD",
                "GNF",
                "GTQ",
                "GYD",
                "HKD",
                "HNL",
                "HTG",
                "HUF",
                "IDR",
                "ILS",
                "INR",
                "IQD",
                "IRR",
                "ISK",
                "JMD",
                "JOD",
                "JPY",
                "KES",
                "KGS",
                "KHR",
                "KMF",
                "KPW",
                "KRW",
                "KWD",
                "KYD",
                "KZT",
                "LAK",
                "LBP",
                "LKR",
                "LRD",
                "LSL",
                "LYD",
                "MAD",
                "MDL",
                "MGA",
                "MKD",
                "MMK",
                "MNT",
                "MOP",
                "MRU",
                "MUR",
                "MVR",
                "MWK",
                "MXN",
                "MXV",
                "MYR",
                "MZN",
                "NAD",
                "NGN",
                "NIO",
                "NOK",
                "NPR",
                "NZD",
                "OMR",
                "PAB",
                "PEN",
                "PGK",
                "PHP",
                "PKR",
                "PLN",
                "PYG",
                "QAR",
                "RON",
                "RSD",
                "RUB",
                "RWF",
                "SAR",
                "SBD",
                "SCR",
                "SDG",
                "SEK",
                "SGD",
                "SHP",
                "SLE",
                "SOS",
                "SRD",
                "SSP",
                "STN",
                "SVC",
                "SYP",
                "SZL",
                "THB",
                "TJS",
                "TMT",
                "TND",
                "TOP",
                "TRY",
                "TTD",
                "TWD",
                "TZS",
                "UAH",
                "UGX",
                "USD",
                "USN",
                "UYI",
                "UYU",
                "UYW",
                "UZS",
                "VED",
                "VES",
                "VND",
                "VUV",
                "WST",
                "XAF",
                "XAG",
                "XAU",
                "XBA",
                "XBB",
                "XBC",
                "XBD",
                "XCD",
                "XDR",
                "XOF",
                "XPD",
                "XPF",
                "XPT",
                "XSU",
                "XTS",
                "XUA",
                "XXX",
                "YER",
                "ZAR",
                "ZMW",
                "ZWG"
              ]
            }
          },
          {
            "name": "currency_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated currency_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of invoice_payments.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/InvoicePayment"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Create an invoice payment",
        "operationId": "create_invoice_payments",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/InvoicePaymentWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/InvoicePaymentWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created invoice_payments record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/InvoicePayment"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Update an invoice payment",
        "operationId": "update_invoice_payments",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/InvoicePaymentWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/InvoicePaymentWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated invoice_payments record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/InvoicePayment"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/invoice_payments/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Get an invoice payment",
        "operationId": "get_invoice_payments",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single invoice_payments record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/InvoicePayment"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/bill_payments": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "List bill payments",
        "operationId": "list_bill_payments",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand: bill, contact, currency, account.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on contact_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated contact_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on account_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated account_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bill_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on bill_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bill_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated bill_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on currency_id.",
            "schema": {
              "type": "string",
              "enum": [
                "AED",
                "AFN",
                "ALL",
                "AMD",
                "ANG",
                "AOA",
                "ARS",
                "AUD",
                "AWG",
                "AZN",
                "BAM",
                "BBD",
                "BDT",
                "BGN",
                "BHD",
                "BIF",
                "BMD",
                "BND",
                "BOB",
                "BOV",
                "BRL",
                "BSD",
                "BTN",
                "BWP",
                "BYN",
                "BZD",
                "CAD",
                "CDF",
                "CHE",
                "CHF",
                "CHW",
                "CLF",
                "CLP",
                "CNY",
                "COP",
                "COU",
                "CRC",
                "CUC",
                "CUP",
                "CVE",
                "CZK",
                "DJF",
                "DKK",
                "DOP",
                "DZD",
                "EGP",
                "ERN",
                "ETB",
                "EUR",
                "FJD",
                "FKP",
                "GBP",
                "GEL",
                "GHS",
                "GIP",
                "GMD",
                "GNF",
                "GTQ",
                "GYD",
                "HKD",
                "HNL",
                "HTG",
                "HUF",
                "IDR",
                "ILS",
                "INR",
                "IQD",
                "IRR",
                "ISK",
                "JMD",
                "JOD",
                "JPY",
                "KES",
                "KGS",
                "KHR",
                "KMF",
                "KPW",
                "KRW",
                "KWD",
                "KYD",
                "KZT",
                "LAK",
                "LBP",
                "LKR",
                "LRD",
                "LSL",
                "LYD",
                "MAD",
                "MDL",
                "MGA",
                "MKD",
                "MMK",
                "MNT",
                "MOP",
                "MRU",
                "MUR",
                "MVR",
                "MWK",
                "MXN",
                "MXV",
                "MYR",
                "MZN",
                "NAD",
                "NGN",
                "NIO",
                "NOK",
                "NPR",
                "NZD",
                "OMR",
                "PAB",
                "PEN",
                "PGK",
                "PHP",
                "PKR",
                "PLN",
                "PYG",
                "QAR",
                "RON",
                "RSD",
                "RUB",
                "RWF",
                "SAR",
                "SBD",
                "SCR",
                "SDG",
                "SEK",
                "SGD",
                "SHP",
                "SLE",
                "SOS",
                "SRD",
                "SSP",
                "STN",
                "SVC",
                "SYP",
                "SZL",
                "THB",
                "TJS",
                "TMT",
                "TND",
                "TOP",
                "TRY",
                "TTD",
                "TWD",
                "TZS",
                "UAH",
                "UGX",
                "USD",
                "USN",
                "UYI",
                "UYU",
                "UYW",
                "UZS",
                "VED",
                "VES",
                "VND",
                "VUV",
                "WST",
                "XAF",
                "XAG",
                "XAU",
                "XBA",
                "XBB",
                "XBC",
                "XBD",
                "XCD",
                "XDR",
                "XOF",
                "XPD",
                "XPF",
                "XPT",
                "XSU",
                "XTS",
                "XUA",
                "XXX",
                "YER",
                "ZAR",
                "ZMW",
                "ZWG"
              ]
            }
          },
          {
            "name": "currency_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated currency_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of bill_payments.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/BillPayment"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Create a bill payment",
        "operationId": "create_bill_payments",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/BillPaymentWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/BillPaymentWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created bill_payments record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/BillPayment"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Update a bill payment",
        "operationId": "update_bill_payments",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/BillPaymentWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/BillPaymentWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated bill_payments record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/BillPayment"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/bill_payments/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Get a bill payment",
        "operationId": "get_bill_payments",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single bill_payments record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/BillPayment"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/invoice_credit_notes": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting",
          "Payments"
        ],
        "summary": "List invoice credit notes",
        "operationId": "list_invoice_credit_notes",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand: contact, currency, line_items.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on contact_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated contact_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on currency_id.",
            "schema": {
              "type": "string",
              "enum": [
                "AED",
                "AFN",
                "ALL",
                "AMD",
                "ANG",
                "AOA",
                "ARS",
                "AUD",
                "AWG",
                "AZN",
                "BAM",
                "BBD",
                "BDT",
                "BGN",
                "BHD",
                "BIF",
                "BMD",
                "BND",
                "BOB",
                "BOV",
                "BRL",
                "BSD",
                "BTN",
                "BWP",
                "BYN",
                "BZD",
                "CAD",
                "CDF",
                "CHE",
                "CHF",
                "CHW",
                "CLF",
                "CLP",
                "CNY",
                "COP",
                "COU",
                "CRC",
                "CUC",
                "CUP",
                "CVE",
                "CZK",
                "DJF",
                "DKK",
                "DOP",
                "DZD",
                "EGP",
                "ERN",
                "ETB",
                "EUR",
                "FJD",
                "FKP",
                "GBP",
                "GEL",
                "GHS",
                "GIP",
                "GMD",
                "GNF",
                "GTQ",
                "GYD",
                "HKD",
                "HNL",
                "HTG",
                "HUF",
                "IDR",
                "ILS",
                "INR",
                "IQD",
                "IRR",
                "ISK",
                "JMD",
                "JOD",
                "JPY",
                "KES",
                "KGS",
                "KHR",
                "KMF",
                "KPW",
                "KRW",
                "KWD",
                "KYD",
                "KZT",
                "LAK",
                "LBP",
                "LKR",
                "LRD",
                "LSL",
                "LYD",
                "MAD",
                "MDL",
                "MGA",
                "MKD",
                "MMK",
                "MNT",
                "MOP",
                "MRU",
                "MUR",
                "MVR",
                "MWK",
                "MXN",
                "MXV",
                "MYR",
                "MZN",
                "NAD",
                "NGN",
                "NIO",
                "NOK",
                "NPR",
                "NZD",
                "OMR",
                "PAB",
                "PEN",
                "PGK",
                "PHP",
                "PKR",
                "PLN",
                "PYG",
                "QAR",
                "RON",
                "RSD",
                "RUB",
                "RWF",
                "SAR",
                "SBD",
                "SCR",
                "SDG",
                "SEK",
                "SGD",
                "SHP",
                "SLE",
                "SOS",
                "SRD",
                "SSP",
                "STN",
                "SVC",
                "SYP",
                "SZL",
                "THB",
                "TJS",
                "TMT",
                "TND",
                "TOP",
                "TRY",
                "TTD",
                "TWD",
                "TZS",
                "UAH",
                "UGX",
                "USD",
                "USN",
                "UYI",
                "UYU",
                "UYW",
                "UZS",
                "VED",
                "VES",
                "VND",
                "VUV",
                "WST",
                "XAF",
                "XAG",
                "XAU",
                "XBA",
                "XBB",
                "XBC",
                "XBD",
                "XCD",
                "XDR",
                "XOF",
                "XPD",
                "XPF",
                "XPT",
                "XSU",
                "XTS",
                "XUA",
                "XXX",
                "YER",
                "ZAR",
                "ZMW",
                "ZWG"
              ]
            }
          },
          {
            "name": "currency_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated currency_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on status.",
            "schema": {
              "type": "string",
              "enum": [
                "DRAFT",
                "SUBMITTED",
                "PARTIALLY_PAID",
                "PAID",
                "OVERDUE",
                "VOID",
                "UNKNOWN"
              ]
            }
          },
          {
            "name": "status[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated status values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on posted_date.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated posted_date values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[gte]",
            "in": "query",
            "required": false,
            "description": "posted_date greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[lte]",
            "in": "query",
            "required": false,
            "description": "posted_date less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of invoice_credit_notes.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/InvoiceCreditNote"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "x-audience": "customer",
        "tags": [
          "Accounting",
          "Payments"
        ],
        "summary": "Create an invoice credit note",
        "operationId": "create_invoice_credit_notes",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/InvoiceCreditNoteWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/InvoiceCreditNoteWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created invoice_credit_notes record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/InvoiceCreditNote"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "x-audience": "customer",
        "tags": [
          "Accounting",
          "Payments"
        ],
        "summary": "Update an invoice credit note",
        "operationId": "update_invoice_credit_notes",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/InvoiceCreditNoteWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/InvoiceCreditNoteWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated invoice_credit_notes record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/InvoiceCreditNote"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/invoice_credit_notes/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting",
          "Payments"
        ],
        "summary": "Get an invoice credit note",
        "operationId": "get_invoice_credit_notes",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single invoice_credit_notes record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/InvoiceCreditNote"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/bill_credit_notes": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "List bill credit notes",
        "operationId": "list_bill_credit_notes",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand: contact, currency, line_items.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on contact_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated contact_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on currency_id.",
            "schema": {
              "type": "string",
              "enum": [
                "AED",
                "AFN",
                "ALL",
                "AMD",
                "ANG",
                "AOA",
                "ARS",
                "AUD",
                "AWG",
                "AZN",
                "BAM",
                "BBD",
                "BDT",
                "BGN",
                "BHD",
                "BIF",
                "BMD",
                "BND",
                "BOB",
                "BOV",
                "BRL",
                "BSD",
                "BTN",
                "BWP",
                "BYN",
                "BZD",
                "CAD",
                "CDF",
                "CHE",
                "CHF",
                "CHW",
                "CLF",
                "CLP",
                "CNY",
                "COP",
                "COU",
                "CRC",
                "CUC",
                "CUP",
                "CVE",
                "CZK",
                "DJF",
                "DKK",
                "DOP",
                "DZD",
                "EGP",
                "ERN",
                "ETB",
                "EUR",
                "FJD",
                "FKP",
                "GBP",
                "GEL",
                "GHS",
                "GIP",
                "GMD",
                "GNF",
                "GTQ",
                "GYD",
                "HKD",
                "HNL",
                "HTG",
                "HUF",
                "IDR",
                "ILS",
                "INR",
                "IQD",
                "IRR",
                "ISK",
                "JMD",
                "JOD",
                "JPY",
                "KES",
                "KGS",
                "KHR",
                "KMF",
                "KPW",
                "KRW",
                "KWD",
                "KYD",
                "KZT",
                "LAK",
                "LBP",
                "LKR",
                "LRD",
                "LSL",
                "LYD",
                "MAD",
                "MDL",
                "MGA",
                "MKD",
                "MMK",
                "MNT",
                "MOP",
                "MRU",
                "MUR",
                "MVR",
                "MWK",
                "MXN",
                "MXV",
                "MYR",
                "MZN",
                "NAD",
                "NGN",
                "NIO",
                "NOK",
                "NPR",
                "NZD",
                "OMR",
                "PAB",
                "PEN",
                "PGK",
                "PHP",
                "PKR",
                "PLN",
                "PYG",
                "QAR",
                "RON",
                "RSD",
                "RUB",
                "RWF",
                "SAR",
                "SBD",
                "SCR",
                "SDG",
                "SEK",
                "SGD",
                "SHP",
                "SLE",
                "SOS",
                "SRD",
                "SSP",
                "STN",
                "SVC",
                "SYP",
                "SZL",
                "THB",
                "TJS",
                "TMT",
                "TND",
                "TOP",
                "TRY",
                "TTD",
                "TWD",
                "TZS",
                "UAH",
                "UGX",
                "USD",
                "USN",
                "UYI",
                "UYU",
                "UYW",
                "UZS",
                "VED",
                "VES",
                "VND",
                "VUV",
                "WST",
                "XAF",
                "XAG",
                "XAU",
                "XBA",
                "XBB",
                "XBC",
                "XBD",
                "XCD",
                "XDR",
                "XOF",
                "XPD",
                "XPF",
                "XPT",
                "XSU",
                "XTS",
                "XUA",
                "XXX",
                "YER",
                "ZAR",
                "ZMW",
                "ZWG"
              ]
            }
          },
          {
            "name": "currency_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated currency_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on status.",
            "schema": {
              "type": "string",
              "enum": [
                "DRAFT",
                "SUBMITTED",
                "PARTIALLY_PAID",
                "PAID",
                "OVERDUE",
                "VOID",
                "UNKNOWN"
              ]
            }
          },
          {
            "name": "status[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated status values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on posted_date.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated posted_date values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[gte]",
            "in": "query",
            "required": false,
            "description": "posted_date greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[lte]",
            "in": "query",
            "required": false,
            "description": "posted_date less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of bill_credit_notes.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/BillCreditNote"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Create a bill credit note",
        "operationId": "create_bill_credit_notes",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/BillCreditNoteWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/BillCreditNoteWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created bill_credit_notes record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/BillCreditNote"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Update a bill credit note",
        "operationId": "update_bill_credit_notes",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/BillCreditNoteWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/BillCreditNoteWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated bill_credit_notes record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/BillCreditNote"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/bill_credit_notes/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Get a bill credit note",
        "operationId": "get_bill_credit_notes",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single bill_credit_notes record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/BillCreditNote"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/journal_entries": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "List journal entries",
        "operationId": "list_journal_entries",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand: journal_lines, documents.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on currency_id.",
            "schema": {
              "type": "string",
              "enum": [
                "AED",
                "AFN",
                "ALL",
                "AMD",
                "ANG",
                "AOA",
                "ARS",
                "AUD",
                "AWG",
                "AZN",
                "BAM",
                "BBD",
                "BDT",
                "BGN",
                "BHD",
                "BIF",
                "BMD",
                "BND",
                "BOB",
                "BOV",
                "BRL",
                "BSD",
                "BTN",
                "BWP",
                "BYN",
                "BZD",
                "CAD",
                "CDF",
                "CHE",
                "CHF",
                "CHW",
                "CLF",
                "CLP",
                "CNY",
                "COP",
                "COU",
                "CRC",
                "CUC",
                "CUP",
                "CVE",
                "CZK",
                "DJF",
                "DKK",
                "DOP",
                "DZD",
                "EGP",
                "ERN",
                "ETB",
                "EUR",
                "FJD",
                "FKP",
                "GBP",
                "GEL",
                "GHS",
                "GIP",
                "GMD",
                "GNF",
                "GTQ",
                "GYD",
                "HKD",
                "HNL",
                "HTG",
                "HUF",
                "IDR",
                "ILS",
                "INR",
                "IQD",
                "IRR",
                "ISK",
                "JMD",
                "JOD",
                "JPY",
                "KES",
                "KGS",
                "KHR",
                "KMF",
                "KPW",
                "KRW",
                "KWD",
                "KYD",
                "KZT",
                "LAK",
                "LBP",
                "LKR",
                "LRD",
                "LSL",
                "LYD",
                "MAD",
                "MDL",
                "MGA",
                "MKD",
                "MMK",
                "MNT",
                "MOP",
                "MRU",
                "MUR",
                "MVR",
                "MWK",
                "MXN",
                "MXV",
                "MYR",
                "MZN",
                "NAD",
                "NGN",
                "NIO",
                "NOK",
                "NPR",
                "NZD",
                "OMR",
                "PAB",
                "PEN",
                "PGK",
                "PHP",
                "PKR",
                "PLN",
                "PYG",
                "QAR",
                "RON",
                "RSD",
                "RUB",
                "RWF",
                "SAR",
                "SBD",
                "SCR",
                "SDG",
                "SEK",
                "SGD",
                "SHP",
                "SLE",
                "SOS",
                "SRD",
                "SSP",
                "STN",
                "SVC",
                "SYP",
                "SZL",
                "THB",
                "TJS",
                "TMT",
                "TND",
                "TOP",
                "TRY",
                "TTD",
                "TWD",
                "TZS",
                "UAH",
                "UGX",
                "USD",
                "USN",
                "UYI",
                "UYU",
                "UYW",
                "UZS",
                "VED",
                "VES",
                "VND",
                "VUV",
                "WST",
                "XAF",
                "XAG",
                "XAU",
                "XBA",
                "XBB",
                "XBC",
                "XBD",
                "XCD",
                "XDR",
                "XOF",
                "XPD",
                "XPF",
                "XPT",
                "XSU",
                "XTS",
                "XUA",
                "XXX",
                "YER",
                "ZAR",
                "ZMW",
                "ZWG"
              ]
            }
          },
          {
            "name": "currency_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated currency_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "journal_entry_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on journal_entry_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "journal_entry_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated journal_entry_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "document_number[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on document_number.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "document_number[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated document_number values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on posted_date.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated posted_date values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[gte]",
            "in": "query",
            "required": false,
            "description": "posted_date greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[lte]",
            "in": "query",
            "required": false,
            "description": "posted_date less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of journal_entries.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/JournalEntry"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Create a journal entry",
        "operationId": "create_journal_entries",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/JournalEntryWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/JournalEntryWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created journal_entries record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/JournalEntry"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Update a journal entry",
        "operationId": "update_journal_entries",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/JournalEntryWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/JournalEntryWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated journal_entries record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/JournalEntry"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/journal_entries/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Get a journal entry",
        "operationId": "get_journal_entries",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single journal_entries record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/JournalEntry"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/bank_transactions": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "List bank transactions",
        "operationId": "list_bank_transactions",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand: contact, bank_account, currency.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on contact_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated contact_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on account_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated account_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from_account_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on from_account_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from_account_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated from_account_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to_account_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on to_account_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to_account_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated to_account_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on currency_id.",
            "schema": {
              "type": "string",
              "enum": [
                "AED",
                "AFN",
                "ALL",
                "AMD",
                "ANG",
                "AOA",
                "ARS",
                "AUD",
                "AWG",
                "AZN",
                "BAM",
                "BBD",
                "BDT",
                "BGN",
                "BHD",
                "BIF",
                "BMD",
                "BND",
                "BOB",
                "BOV",
                "BRL",
                "BSD",
                "BTN",
                "BWP",
                "BYN",
                "BZD",
                "CAD",
                "CDF",
                "CHE",
                "CHF",
                "CHW",
                "CLF",
                "CLP",
                "CNY",
                "COP",
                "COU",
                "CRC",
                "CUC",
                "CUP",
                "CVE",
                "CZK",
                "DJF",
                "DKK",
                "DOP",
                "DZD",
                "EGP",
                "ERN",
                "ETB",
                "EUR",
                "FJD",
                "FKP",
                "GBP",
                "GEL",
                "GHS",
                "GIP",
                "GMD",
                "GNF",
                "GTQ",
                "GYD",
                "HKD",
                "HNL",
                "HTG",
                "HUF",
                "IDR",
                "ILS",
                "INR",
                "IQD",
                "IRR",
                "ISK",
                "JMD",
                "JOD",
                "JPY",
                "KES",
                "KGS",
                "KHR",
                "KMF",
                "KPW",
                "KRW",
                "KWD",
                "KYD",
                "KZT",
                "LAK",
                "LBP",
                "LKR",
                "LRD",
                "LSL",
                "LYD",
                "MAD",
                "MDL",
                "MGA",
                "MKD",
                "MMK",
                "MNT",
                "MOP",
                "MRU",
                "MUR",
                "MVR",
                "MWK",
                "MXN",
                "MXV",
                "MYR",
                "MZN",
                "NAD",
                "NGN",
                "NIO",
                "NOK",
                "NPR",
                "NZD",
                "OMR",
                "PAB",
                "PEN",
                "PGK",
                "PHP",
                "PKR",
                "PLN",
                "PYG",
                "QAR",
                "RON",
                "RSD",
                "RUB",
                "RWF",
                "SAR",
                "SBD",
                "SCR",
                "SDG",
                "SEK",
                "SGD",
                "SHP",
                "SLE",
                "SOS",
                "SRD",
                "SSP",
                "STN",
                "SVC",
                "SYP",
                "SZL",
                "THB",
                "TJS",
                "TMT",
                "TND",
                "TOP",
                "TRY",
                "TTD",
                "TWD",
                "TZS",
                "UAH",
                "UGX",
                "USD",
                "USN",
                "UYI",
                "UYU",
                "UYW",
                "UZS",
                "VED",
                "VES",
                "VND",
                "VUV",
                "WST",
                "XAF",
                "XAG",
                "XAU",
                "XBA",
                "XBB",
                "XBC",
                "XBD",
                "XCD",
                "XDR",
                "XOF",
                "XPD",
                "XPF",
                "XPT",
                "XSU",
                "XTS",
                "XUA",
                "XXX",
                "YER",
                "ZAR",
                "ZMW",
                "ZWG"
              ]
            }
          },
          {
            "name": "currency_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated currency_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on status.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated status values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "debit_or_credit[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on debit_or_credit.",
            "schema": {
              "type": "string",
              "enum": [
                "CREDIT",
                "DEBIT",
                "UNKNOWN"
              ]
            }
          },
          {
            "name": "debit_or_credit[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated debit_or_credit values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of bank_transactions.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/BankTransaction"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Create a bank transaction",
        "operationId": "create_bank_transactions",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/BankTransactionWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/BankTransactionWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created bank_transactions record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/BankTransaction"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Update a bank transaction",
        "operationId": "update_bank_transactions",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/BankTransactionWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/BankTransactionWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated bank_transactions record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/BankTransaction"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/bank_transactions/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Get a bank transaction",
        "operationId": "get_bank_transactions",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single bank_transactions record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/BankTransaction"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/purchase_orders": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "List purchase orders",
        "operationId": "list_purchase_orders",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand: line_items, contact, currency.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on status.",
            "schema": {
              "type": "string",
              "enum": [
                "DRAFT",
                "SUBMITTED",
                "PARTIALLY_PAID",
                "PAID",
                "OVERDUE",
                "VOID",
                "UNKNOWN"
              ]
            }
          },
          {
            "name": "status[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated status values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on contact_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated contact_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on currency_id.",
            "schema": {
              "type": "string",
              "enum": [
                "AED",
                "AFN",
                "ALL",
                "AMD",
                "ANG",
                "AOA",
                "ARS",
                "AUD",
                "AWG",
                "AZN",
                "BAM",
                "BBD",
                "BDT",
                "BGN",
                "BHD",
                "BIF",
                "BMD",
                "BND",
                "BOB",
                "BOV",
                "BRL",
                "BSD",
                "BTN",
                "BWP",
                "BYN",
                "BZD",
                "CAD",
                "CDF",
                "CHE",
                "CHF",
                "CHW",
                "CLF",
                "CLP",
                "CNY",
                "COP",
                "COU",
                "CRC",
                "CUC",
                "CUP",
                "CVE",
                "CZK",
                "DJF",
                "DKK",
                "DOP",
                "DZD",
                "EGP",
                "ERN",
                "ETB",
                "EUR",
                "FJD",
                "FKP",
                "GBP",
                "GEL",
                "GHS",
                "GIP",
                "GMD",
                "GNF",
                "GTQ",
                "GYD",
                "HKD",
                "HNL",
                "HTG",
                "HUF",
                "IDR",
                "ILS",
                "INR",
                "IQD",
                "IRR",
                "ISK",
                "JMD",
                "JOD",
                "JPY",
                "KES",
                "KGS",
                "KHR",
                "KMF",
                "KPW",
                "KRW",
                "KWD",
                "KYD",
                "KZT",
                "LAK",
                "LBP",
                "LKR",
                "LRD",
                "LSL",
                "LYD",
                "MAD",
                "MDL",
                "MGA",
                "MKD",
                "MMK",
                "MNT",
                "MOP",
                "MRU",
                "MUR",
                "MVR",
                "MWK",
                "MXN",
                "MXV",
                "MYR",
                "MZN",
                "NAD",
                "NGN",
                "NIO",
                "NOK",
                "NPR",
                "NZD",
                "OMR",
                "PAB",
                "PEN",
                "PGK",
                "PHP",
                "PKR",
                "PLN",
                "PYG",
                "QAR",
                "RON",
                "RSD",
                "RUB",
                "RWF",
                "SAR",
                "SBD",
                "SCR",
                "SDG",
                "SEK",
                "SGD",
                "SHP",
                "SLE",
                "SOS",
                "SRD",
                "SSP",
                "STN",
                "SVC",
                "SYP",
                "SZL",
                "THB",
                "TJS",
                "TMT",
                "TND",
                "TOP",
                "TRY",
                "TTD",
                "TWD",
                "TZS",
                "UAH",
                "UGX",
                "USD",
                "USN",
                "UYI",
                "UYU",
                "UYW",
                "UZS",
                "VED",
                "VES",
                "VND",
                "VUV",
                "WST",
                "XAF",
                "XAG",
                "XAU",
                "XBA",
                "XBB",
                "XBC",
                "XBD",
                "XCD",
                "XDR",
                "XOF",
                "XPD",
                "XPF",
                "XPT",
                "XSU",
                "XTS",
                "XUA",
                "XXX",
                "YER",
                "ZAR",
                "ZMW",
                "ZWG"
              ]
            }
          },
          {
            "name": "currency_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated currency_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "document_number[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on document_number.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "document_number[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated document_number values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on posted_date.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated posted_date values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[gte]",
            "in": "query",
            "required": false,
            "description": "posted_date greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[lte]",
            "in": "query",
            "required": false,
            "description": "posted_date less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of purchase_orders.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/PurchaseOrder"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Create a purchase order",
        "operationId": "create_purchase_orders",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/PurchaseOrderWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/PurchaseOrderWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created purchase_orders record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/PurchaseOrder"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Update a purchase order",
        "operationId": "update_purchase_orders",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/PurchaseOrderWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/PurchaseOrderWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated purchase_orders record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/PurchaseOrder"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/purchase_orders/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Get a purchase order",
        "operationId": "get_purchase_orders",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single purchase_orders record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PurchaseOrder"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/sales_orders": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "List sales orders",
        "operationId": "list_sales_orders",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand: line_items, contact, currency.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on status.",
            "schema": {
              "type": "string",
              "enum": [
                "DRAFT",
                "SUBMITTED",
                "PARTIALLY_PAID",
                "PAID",
                "OVERDUE",
                "VOID",
                "UNKNOWN"
              ]
            }
          },
          {
            "name": "status[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated status values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on contact_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated contact_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on currency_id.",
            "schema": {
              "type": "string",
              "enum": [
                "AED",
                "AFN",
                "ALL",
                "AMD",
                "ANG",
                "AOA",
                "ARS",
                "AUD",
                "AWG",
                "AZN",
                "BAM",
                "BBD",
                "BDT",
                "BGN",
                "BHD",
                "BIF",
                "BMD",
                "BND",
                "BOB",
                "BOV",
                "BRL",
                "BSD",
                "BTN",
                "BWP",
                "BYN",
                "BZD",
                "CAD",
                "CDF",
                "CHE",
                "CHF",
                "CHW",
                "CLF",
                "CLP",
                "CNY",
                "COP",
                "COU",
                "CRC",
                "CUC",
                "CUP",
                "CVE",
                "CZK",
                "DJF",
                "DKK",
                "DOP",
                "DZD",
                "EGP",
                "ERN",
                "ETB",
                "EUR",
                "FJD",
                "FKP",
                "GBP",
                "GEL",
                "GHS",
                "GIP",
                "GMD",
                "GNF",
                "GTQ",
                "GYD",
                "HKD",
                "HNL",
                "HTG",
                "HUF",
                "IDR",
                "ILS",
                "INR",
                "IQD",
                "IRR",
                "ISK",
                "JMD",
                "JOD",
                "JPY",
                "KES",
                "KGS",
                "KHR",
                "KMF",
                "KPW",
                "KRW",
                "KWD",
                "KYD",
                "KZT",
                "LAK",
                "LBP",
                "LKR",
                "LRD",
                "LSL",
                "LYD",
                "MAD",
                "MDL",
                "MGA",
                "MKD",
                "MMK",
                "MNT",
                "MOP",
                "MRU",
                "MUR",
                "MVR",
                "MWK",
                "MXN",
                "MXV",
                "MYR",
                "MZN",
                "NAD",
                "NGN",
                "NIO",
                "NOK",
                "NPR",
                "NZD",
                "OMR",
                "PAB",
                "PEN",
                "PGK",
                "PHP",
                "PKR",
                "PLN",
                "PYG",
                "QAR",
                "RON",
                "RSD",
                "RUB",
                "RWF",
                "SAR",
                "SBD",
                "SCR",
                "SDG",
                "SEK",
                "SGD",
                "SHP",
                "SLE",
                "SOS",
                "SRD",
                "SSP",
                "STN",
                "SVC",
                "SYP",
                "SZL",
                "THB",
                "TJS",
                "TMT",
                "TND",
                "TOP",
                "TRY",
                "TTD",
                "TWD",
                "TZS",
                "UAH",
                "UGX",
                "USD",
                "USN",
                "UYI",
                "UYU",
                "UYW",
                "UZS",
                "VED",
                "VES",
                "VND",
                "VUV",
                "WST",
                "XAF",
                "XAG",
                "XAU",
                "XBA",
                "XBB",
                "XBC",
                "XBD",
                "XCD",
                "XDR",
                "XOF",
                "XPD",
                "XPF",
                "XPT",
                "XSU",
                "XTS",
                "XUA",
                "XXX",
                "YER",
                "ZAR",
                "ZMW",
                "ZWG"
              ]
            }
          },
          {
            "name": "currency_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated currency_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "document_number[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on document_number.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "document_number[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated document_number values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on posted_date.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated posted_date values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[gte]",
            "in": "query",
            "required": false,
            "description": "posted_date greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[lte]",
            "in": "query",
            "required": false,
            "description": "posted_date less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of sales_orders.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/SalesOrder"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Create a sales order",
        "operationId": "create_sales_orders",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/SalesOrderWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/SalesOrderWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created sales_orders record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/SalesOrder"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Update a sales order",
        "operationId": "update_sales_orders",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/SalesOrderWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/SalesOrderWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated sales_orders record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/SalesOrder"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/sales_orders/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Get a sales order",
        "operationId": "get_sales_orders",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single sales_orders record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SalesOrder"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/cash_refunds": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "List cash refunds",
        "operationId": "list_cash_refunds",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand: line_items, contact, currency.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on status.",
            "schema": {
              "type": "string",
              "enum": [
                "DRAFT",
                "SUBMITTED",
                "PARTIALLY_PAID",
                "PAID",
                "OVERDUE",
                "VOID",
                "UNKNOWN"
              ]
            }
          },
          {
            "name": "status[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated status values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on contact_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated contact_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on currency_id.",
            "schema": {
              "type": "string",
              "enum": [
                "AED",
                "AFN",
                "ALL",
                "AMD",
                "ANG",
                "AOA",
                "ARS",
                "AUD",
                "AWG",
                "AZN",
                "BAM",
                "BBD",
                "BDT",
                "BGN",
                "BHD",
                "BIF",
                "BMD",
                "BND",
                "BOB",
                "BOV",
                "BRL",
                "BSD",
                "BTN",
                "BWP",
                "BYN",
                "BZD",
                "CAD",
                "CDF",
                "CHE",
                "CHF",
                "CHW",
                "CLF",
                "CLP",
                "CNY",
                "COP",
                "COU",
                "CRC",
                "CUC",
                "CUP",
                "CVE",
                "CZK",
                "DJF",
                "DKK",
                "DOP",
                "DZD",
                "EGP",
                "ERN",
                "ETB",
                "EUR",
                "FJD",
                "FKP",
                "GBP",
                "GEL",
                "GHS",
                "GIP",
                "GMD",
                "GNF",
                "GTQ",
                "GYD",
                "HKD",
                "HNL",
                "HTG",
                "HUF",
                "IDR",
                "ILS",
                "INR",
                "IQD",
                "IRR",
                "ISK",
                "JMD",
                "JOD",
                "JPY",
                "KES",
                "KGS",
                "KHR",
                "KMF",
                "KPW",
                "KRW",
                "KWD",
                "KYD",
                "KZT",
                "LAK",
                "LBP",
                "LKR",
                "LRD",
                "LSL",
                "LYD",
                "MAD",
                "MDL",
                "MGA",
                "MKD",
                "MMK",
                "MNT",
                "MOP",
                "MRU",
                "MUR",
                "MVR",
                "MWK",
                "MXN",
                "MXV",
                "MYR",
                "MZN",
                "NAD",
                "NGN",
                "NIO",
                "NOK",
                "NPR",
                "NZD",
                "OMR",
                "PAB",
                "PEN",
                "PGK",
                "PHP",
                "PKR",
                "PLN",
                "PYG",
                "QAR",
                "RON",
                "RSD",
                "RUB",
                "RWF",
                "SAR",
                "SBD",
                "SCR",
                "SDG",
                "SEK",
                "SGD",
                "SHP",
                "SLE",
                "SOS",
                "SRD",
                "SSP",
                "STN",
                "SVC",
                "SYP",
                "SZL",
                "THB",
                "TJS",
                "TMT",
                "TND",
                "TOP",
                "TRY",
                "TTD",
                "TWD",
                "TZS",
                "UAH",
                "UGX",
                "USD",
                "USN",
                "UYI",
                "UYU",
                "UYW",
                "UZS",
                "VED",
                "VES",
                "VND",
                "VUV",
                "WST",
                "XAF",
                "XAG",
                "XAU",
                "XBA",
                "XBB",
                "XBC",
                "XBD",
                "XCD",
                "XDR",
                "XOF",
                "XPD",
                "XPF",
                "XPT",
                "XSU",
                "XTS",
                "XUA",
                "XXX",
                "YER",
                "ZAR",
                "ZMW",
                "ZWG"
              ]
            }
          },
          {
            "name": "currency_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated currency_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "document_number[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on document_number.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "document_number[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated document_number values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on posted_date.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated posted_date values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[gte]",
            "in": "query",
            "required": false,
            "description": "posted_date greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[lte]",
            "in": "query",
            "required": false,
            "description": "posted_date less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of cash_refunds.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CashRefund"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/cash_refunds/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Get a cash refund",
        "operationId": "get_cash_refunds",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single cash_refunds record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CashRefund"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/cash_sales": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "List cash sales",
        "operationId": "list_cash_sales",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand: line_items, contact, currency.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on status.",
            "schema": {
              "type": "string",
              "enum": [
                "DRAFT",
                "SUBMITTED",
                "PARTIALLY_PAID",
                "PAID",
                "OVERDUE",
                "VOID",
                "UNKNOWN"
              ]
            }
          },
          {
            "name": "status[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated status values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on contact_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated contact_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on currency_id.",
            "schema": {
              "type": "string",
              "enum": [
                "AED",
                "AFN",
                "ALL",
                "AMD",
                "ANG",
                "AOA",
                "ARS",
                "AUD",
                "AWG",
                "AZN",
                "BAM",
                "BBD",
                "BDT",
                "BGN",
                "BHD",
                "BIF",
                "BMD",
                "BND",
                "BOB",
                "BOV",
                "BRL",
                "BSD",
                "BTN",
                "BWP",
                "BYN",
                "BZD",
                "CAD",
                "CDF",
                "CHE",
                "CHF",
                "CHW",
                "CLF",
                "CLP",
                "CNY",
                "COP",
                "COU",
                "CRC",
                "CUC",
                "CUP",
                "CVE",
                "CZK",
                "DJF",
                "DKK",
                "DOP",
                "DZD",
                "EGP",
                "ERN",
                "ETB",
                "EUR",
                "FJD",
                "FKP",
                "GBP",
                "GEL",
                "GHS",
                "GIP",
                "GMD",
                "GNF",
                "GTQ",
                "GYD",
                "HKD",
                "HNL",
                "HTG",
                "HUF",
                "IDR",
                "ILS",
                "INR",
                "IQD",
                "IRR",
                "ISK",
                "JMD",
                "JOD",
                "JPY",
                "KES",
                "KGS",
                "KHR",
                "KMF",
                "KPW",
                "KRW",
                "KWD",
                "KYD",
                "KZT",
                "LAK",
                "LBP",
                "LKR",
                "LRD",
                "LSL",
                "LYD",
                "MAD",
                "MDL",
                "MGA",
                "MKD",
                "MMK",
                "MNT",
                "MOP",
                "MRU",
                "MUR",
                "MVR",
                "MWK",
                "MXN",
                "MXV",
                "MYR",
                "MZN",
                "NAD",
                "NGN",
                "NIO",
                "NOK",
                "NPR",
                "NZD",
                "OMR",
                "PAB",
                "PEN",
                "PGK",
                "PHP",
                "PKR",
                "PLN",
                "PYG",
                "QAR",
                "RON",
                "RSD",
                "RUB",
                "RWF",
                "SAR",
                "SBD",
                "SCR",
                "SDG",
                "SEK",
                "SGD",
                "SHP",
                "SLE",
                "SOS",
                "SRD",
                "SSP",
                "STN",
                "SVC",
                "SYP",
                "SZL",
                "THB",
                "TJS",
                "TMT",
                "TND",
                "TOP",
                "TRY",
                "TTD",
                "TWD",
                "TZS",
                "UAH",
                "UGX",
                "USD",
                "USN",
                "UYI",
                "UYU",
                "UYW",
                "UZS",
                "VED",
                "VES",
                "VND",
                "VUV",
                "WST",
                "XAF",
                "XAG",
                "XAU",
                "XBA",
                "XBB",
                "XBC",
                "XBD",
                "XCD",
                "XDR",
                "XOF",
                "XPD",
                "XPF",
                "XPT",
                "XSU",
                "XTS",
                "XUA",
                "XXX",
                "YER",
                "ZAR",
                "ZMW",
                "ZWG"
              ]
            }
          },
          {
            "name": "currency_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated currency_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "document_number[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on document_number.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "document_number[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated document_number values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on posted_date.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated posted_date values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[gte]",
            "in": "query",
            "required": false,
            "description": "posted_date greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[lte]",
            "in": "query",
            "required": false,
            "description": "posted_date less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of cash_sales.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CashSale"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/cash_sales/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Get a cash sale",
        "operationId": "get_cash_sales",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single cash_sales record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CashSale"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/balance_sheets": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "List balance sheets",
        "operationId": "list_balance_sheets",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "description": "Roll up consecutive monthly rows into N-month buckets. Requires period_start[gte] and period_end[lte].",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "currency_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on currency_id.",
            "schema": {
              "type": "string",
              "enum": [
                "AED",
                "AFN",
                "ALL",
                "AMD",
                "ANG",
                "AOA",
                "ARS",
                "AUD",
                "AWG",
                "AZN",
                "BAM",
                "BBD",
                "BDT",
                "BGN",
                "BHD",
                "BIF",
                "BMD",
                "BND",
                "BOB",
                "BOV",
                "BRL",
                "BSD",
                "BTN",
                "BWP",
                "BYN",
                "BZD",
                "CAD",
                "CDF",
                "CHE",
                "CHF",
                "CHW",
                "CLF",
                "CLP",
                "CNY",
                "COP",
                "COU",
                "CRC",
                "CUC",
                "CUP",
                "CVE",
                "CZK",
                "DJF",
                "DKK",
                "DOP",
                "DZD",
                "EGP",
                "ERN",
                "ETB",
                "EUR",
                "FJD",
                "FKP",
                "GBP",
                "GEL",
                "GHS",
                "GIP",
                "GMD",
                "GNF",
                "GTQ",
                "GYD",
                "HKD",
                "HNL",
                "HTG",
                "HUF",
                "IDR",
                "ILS",
                "INR",
                "IQD",
                "IRR",
                "ISK",
                "JMD",
                "JOD",
                "JPY",
                "KES",
                "KGS",
                "KHR",
                "KMF",
                "KPW",
                "KRW",
                "KWD",
                "KYD",
                "KZT",
                "LAK",
                "LBP",
                "LKR",
                "LRD",
                "LSL",
                "LYD",
                "MAD",
                "MDL",
                "MGA",
                "MKD",
                "MMK",
                "MNT",
                "MOP",
                "MRU",
                "MUR",
                "MVR",
                "MWK",
                "MXN",
                "MXV",
                "MYR",
                "MZN",
                "NAD",
                "NGN",
                "NIO",
                "NOK",
                "NPR",
                "NZD",
                "OMR",
                "PAB",
                "PEN",
                "PGK",
                "PHP",
                "PKR",
                "PLN",
                "PYG",
                "QAR",
                "RON",
                "RSD",
                "RUB",
                "RWF",
                "SAR",
                "SBD",
                "SCR",
                "SDG",
                "SEK",
                "SGD",
                "SHP",
                "SLE",
                "SOS",
                "SRD",
                "SSP",
                "STN",
                "SVC",
                "SYP",
                "SZL",
                "THB",
                "TJS",
                "TMT",
                "TND",
                "TOP",
                "TRY",
                "TTD",
                "TWD",
                "TZS",
                "UAH",
                "UGX",
                "USD",
                "USN",
                "UYI",
                "UYU",
                "UYW",
                "UZS",
                "VED",
                "VES",
                "VND",
                "VUV",
                "WST",
                "XAF",
                "XAG",
                "XAU",
                "XBA",
                "XBB",
                "XBC",
                "XBD",
                "XCD",
                "XDR",
                "XOF",
                "XPD",
                "XPF",
                "XPT",
                "XSU",
                "XTS",
                "XUA",
                "XXX",
                "YER",
                "ZAR",
                "ZMW",
                "ZWG"
              ]
            }
          },
          {
            "name": "currency_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated currency_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period_start[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on period_start.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period_start[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated period_start values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period_start[gte]",
            "in": "query",
            "required": false,
            "description": "period_start greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period_start[lte]",
            "in": "query",
            "required": false,
            "description": "period_start less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period_end[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on period_end.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period_end[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated period_end values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period_end[gte]",
            "in": "query",
            "required": false,
            "description": "period_end greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period_end[lte]",
            "in": "query",
            "required": false,
            "description": "period_end less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of balance_sheets.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/BalanceSheet"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/balance_sheets/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Get a balance sheet",
        "operationId": "get_balance_sheets",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single balance_sheets record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/BalanceSheet"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/income_statements": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "List income statements",
        "operationId": "list_income_statements",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "description": "Roll up consecutive monthly rows into N-month buckets. Requires period_start[gte] and period_end[lte].",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "currency_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on currency_id.",
            "schema": {
              "type": "string",
              "enum": [
                "AED",
                "AFN",
                "ALL",
                "AMD",
                "ANG",
                "AOA",
                "ARS",
                "AUD",
                "AWG",
                "AZN",
                "BAM",
                "BBD",
                "BDT",
                "BGN",
                "BHD",
                "BIF",
                "BMD",
                "BND",
                "BOB",
                "BOV",
                "BRL",
                "BSD",
                "BTN",
                "BWP",
                "BYN",
                "BZD",
                "CAD",
                "CDF",
                "CHE",
                "CHF",
                "CHW",
                "CLF",
                "CLP",
                "CNY",
                "COP",
                "COU",
                "CRC",
                "CUC",
                "CUP",
                "CVE",
                "CZK",
                "DJF",
                "DKK",
                "DOP",
                "DZD",
                "EGP",
                "ERN",
                "ETB",
                "EUR",
                "FJD",
                "FKP",
                "GBP",
                "GEL",
                "GHS",
                "GIP",
                "GMD",
                "GNF",
                "GTQ",
                "GYD",
                "HKD",
                "HNL",
                "HTG",
                "HUF",
                "IDR",
                "ILS",
                "INR",
                "IQD",
                "IRR",
                "ISK",
                "JMD",
                "JOD",
                "JPY",
                "KES",
                "KGS",
                "KHR",
                "KMF",
                "KPW",
                "KRW",
                "KWD",
                "KYD",
                "KZT",
                "LAK",
                "LBP",
                "LKR",
                "LRD",
                "LSL",
                "LYD",
                "MAD",
                "MDL",
                "MGA",
                "MKD",
                "MMK",
                "MNT",
                "MOP",
                "MRU",
                "MUR",
                "MVR",
                "MWK",
                "MXN",
                "MXV",
                "MYR",
                "MZN",
                "NAD",
                "NGN",
                "NIO",
                "NOK",
                "NPR",
                "NZD",
                "OMR",
                "PAB",
                "PEN",
                "PGK",
                "PHP",
                "PKR",
                "PLN",
                "PYG",
                "QAR",
                "RON",
                "RSD",
                "RUB",
                "RWF",
                "SAR",
                "SBD",
                "SCR",
                "SDG",
                "SEK",
                "SGD",
                "SHP",
                "SLE",
                "SOS",
                "SRD",
                "SSP",
                "STN",
                "SVC",
                "SYP",
                "SZL",
                "THB",
                "TJS",
                "TMT",
                "TND",
                "TOP",
                "TRY",
                "TTD",
                "TWD",
                "TZS",
                "UAH",
                "UGX",
                "USD",
                "USN",
                "UYI",
                "UYU",
                "UYW",
                "UZS",
                "VED",
                "VES",
                "VND",
                "VUV",
                "WST",
                "XAF",
                "XAG",
                "XAU",
                "XBA",
                "XBB",
                "XBC",
                "XBD",
                "XCD",
                "XDR",
                "XOF",
                "XPD",
                "XPF",
                "XPT",
                "XSU",
                "XTS",
                "XUA",
                "XXX",
                "YER",
                "ZAR",
                "ZMW",
                "ZWG"
              ]
            }
          },
          {
            "name": "currency_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated currency_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period_start[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on period_start.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period_start[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated period_start values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period_start[gte]",
            "in": "query",
            "required": false,
            "description": "period_start greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period_start[lte]",
            "in": "query",
            "required": false,
            "description": "period_start less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period_end[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on period_end.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period_end[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated period_end values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period_end[gte]",
            "in": "query",
            "required": false,
            "description": "period_end greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period_end[lte]",
            "in": "query",
            "required": false,
            "description": "period_end less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of income_statements.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/IncomeStatement"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/income_statements/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Get an income statement",
        "operationId": "get_income_statements",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single income_statements record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/IncomeStatement"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/documents/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Get a document",
        "operationId": "get_documents",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single documents record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Document"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/inventory": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "E-Commerce"
        ],
        "summary": "List inventory",
        "operationId": "list_inventory",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "item_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on item_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "item_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated item_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "variant_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on variant_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "variant_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated variant_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sku[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on sku.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sku[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated sku values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on status.",
            "schema": {
              "type": "string",
              "enum": [
                "IN_STOCK",
                "OUT_OF_STOCK",
                "LOW_STOCK",
                "DISCONTINUED",
                "UNKNOWN"
              ]
            }
          },
          {
            "name": "status[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated status values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_trackable[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on is_trackable.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_trackable[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated is_trackable values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on created_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated created_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[gte]",
            "in": "query",
            "required": false,
            "description": "created_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[lte]",
            "in": "query",
            "required": false,
            "description": "created_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of inventory.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Inventory"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/inventory/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "E-Commerce"
        ],
        "summary": "Get an inventory",
        "operationId": "get_inventory",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single inventory record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Inventory"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/projects": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "List projects",
        "operationId": "list_projects",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "name[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated name values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on status.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated status values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of projects.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Project"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Create a project",
        "operationId": "create_projects",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ProjectWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/ProjectWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created projects record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/Project"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Update a project",
        "operationId": "update_projects",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ProjectWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/ProjectWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated projects record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/Project"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/projects/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Get a project",
        "operationId": "get_projects",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single projects record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Project"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/estimates": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "List estimates",
        "operationId": "list_estimates",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand: contact, line_items.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on contact_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated contact_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on currency_id.",
            "schema": {
              "type": "string",
              "enum": [
                "AED",
                "AFN",
                "ALL",
                "AMD",
                "ANG",
                "AOA",
                "ARS",
                "AUD",
                "AWG",
                "AZN",
                "BAM",
                "BBD",
                "BDT",
                "BGN",
                "BHD",
                "BIF",
                "BMD",
                "BND",
                "BOB",
                "BOV",
                "BRL",
                "BSD",
                "BTN",
                "BWP",
                "BYN",
                "BZD",
                "CAD",
                "CDF",
                "CHE",
                "CHF",
                "CHW",
                "CLF",
                "CLP",
                "CNY",
                "COP",
                "COU",
                "CRC",
                "CUC",
                "CUP",
                "CVE",
                "CZK",
                "DJF",
                "DKK",
                "DOP",
                "DZD",
                "EGP",
                "ERN",
                "ETB",
                "EUR",
                "FJD",
                "FKP",
                "GBP",
                "GEL",
                "GHS",
                "GIP",
                "GMD",
                "GNF",
                "GTQ",
                "GYD",
                "HKD",
                "HNL",
                "HTG",
                "HUF",
                "IDR",
                "ILS",
                "INR",
                "IQD",
                "IRR",
                "ISK",
                "JMD",
                "JOD",
                "JPY",
                "KES",
                "KGS",
                "KHR",
                "KMF",
                "KPW",
                "KRW",
                "KWD",
                "KYD",
                "KZT",
                "LAK",
                "LBP",
                "LKR",
                "LRD",
                "LSL",
                "LYD",
                "MAD",
                "MDL",
                "MGA",
                "MKD",
                "MMK",
                "MNT",
                "MOP",
                "MRU",
                "MUR",
                "MVR",
                "MWK",
                "MXN",
                "MXV",
                "MYR",
                "MZN",
                "NAD",
                "NGN",
                "NIO",
                "NOK",
                "NPR",
                "NZD",
                "OMR",
                "PAB",
                "PEN",
                "PGK",
                "PHP",
                "PKR",
                "PLN",
                "PYG",
                "QAR",
                "RON",
                "RSD",
                "RUB",
                "RWF",
                "SAR",
                "SBD",
                "SCR",
                "SDG",
                "SEK",
                "SGD",
                "SHP",
                "SLE",
                "SOS",
                "SRD",
                "SSP",
                "STN",
                "SVC",
                "SYP",
                "SZL",
                "THB",
                "TJS",
                "TMT",
                "TND",
                "TOP",
                "TRY",
                "TTD",
                "TWD",
                "TZS",
                "UAH",
                "UGX",
                "USD",
                "USN",
                "UYI",
                "UYU",
                "UYW",
                "UZS",
                "VED",
                "VES",
                "VND",
                "VUV",
                "WST",
                "XAF",
                "XAG",
                "XAU",
                "XBA",
                "XBB",
                "XBC",
                "XBD",
                "XCD",
                "XDR",
                "XOF",
                "XPD",
                "XPF",
                "XPT",
                "XSU",
                "XTS",
                "XUA",
                "XXX",
                "YER",
                "ZAR",
                "ZMW",
                "ZWG"
              ]
            }
          },
          {
            "name": "currency_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated currency_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on status.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated status values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on posted_date.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated posted_date values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[gte]",
            "in": "query",
            "required": false,
            "description": "posted_date greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[lte]",
            "in": "query",
            "required": false,
            "description": "posted_date less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of estimates.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Estimate"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Create an estimate",
        "operationId": "create_estimates",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/EstimateWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/EstimateWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created estimates record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/Estimate"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Update an estimate",
        "operationId": "update_estimates",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/EstimateWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/EstimateWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated estimates record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/Estimate"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/estimates/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Get an estimate",
        "operationId": "get_estimates",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single estimates record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Estimate"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/expenses": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "List expenses",
        "operationId": "list_expenses",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand: line_items, documents.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on status.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated status values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on contact_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated contact_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on currency_id.",
            "schema": {
              "type": "string",
              "enum": [
                "AED",
                "AFN",
                "ALL",
                "AMD",
                "ANG",
                "AOA",
                "ARS",
                "AUD",
                "AWG",
                "AZN",
                "BAM",
                "BBD",
                "BDT",
                "BGN",
                "BHD",
                "BIF",
                "BMD",
                "BND",
                "BOB",
                "BOV",
                "BRL",
                "BSD",
                "BTN",
                "BWP",
                "BYN",
                "BZD",
                "CAD",
                "CDF",
                "CHE",
                "CHF",
                "CHW",
                "CLF",
                "CLP",
                "CNY",
                "COP",
                "COU",
                "CRC",
                "CUC",
                "CUP",
                "CVE",
                "CZK",
                "DJF",
                "DKK",
                "DOP",
                "DZD",
                "EGP",
                "ERN",
                "ETB",
                "EUR",
                "FJD",
                "FKP",
                "GBP",
                "GEL",
                "GHS",
                "GIP",
                "GMD",
                "GNF",
                "GTQ",
                "GYD",
                "HKD",
                "HNL",
                "HTG",
                "HUF",
                "IDR",
                "ILS",
                "INR",
                "IQD",
                "IRR",
                "ISK",
                "JMD",
                "JOD",
                "JPY",
                "KES",
                "KGS",
                "KHR",
                "KMF",
                "KPW",
                "KRW",
                "KWD",
                "KYD",
                "KZT",
                "LAK",
                "LBP",
                "LKR",
                "LRD",
                "LSL",
                "LYD",
                "MAD",
                "MDL",
                "MGA",
                "MKD",
                "MMK",
                "MNT",
                "MOP",
                "MRU",
                "MUR",
                "MVR",
                "MWK",
                "MXN",
                "MXV",
                "MYR",
                "MZN",
                "NAD",
                "NGN",
                "NIO",
                "NOK",
                "NPR",
                "NZD",
                "OMR",
                "PAB",
                "PEN",
                "PGK",
                "PHP",
                "PKR",
                "PLN",
                "PYG",
                "QAR",
                "RON",
                "RSD",
                "RUB",
                "RWF",
                "SAR",
                "SBD",
                "SCR",
                "SDG",
                "SEK",
                "SGD",
                "SHP",
                "SLE",
                "SOS",
                "SRD",
                "SSP",
                "STN",
                "SVC",
                "SYP",
                "SZL",
                "THB",
                "TJS",
                "TMT",
                "TND",
                "TOP",
                "TRY",
                "TTD",
                "TWD",
                "TZS",
                "UAH",
                "UGX",
                "USD",
                "USN",
                "UYI",
                "UYU",
                "UYW",
                "UZS",
                "VED",
                "VES",
                "VND",
                "VUV",
                "WST",
                "XAF",
                "XAG",
                "XAU",
                "XBA",
                "XBB",
                "XBC",
                "XBD",
                "XCD",
                "XDR",
                "XOF",
                "XPD",
                "XPF",
                "XPT",
                "XSU",
                "XTS",
                "XUA",
                "XXX",
                "YER",
                "ZAR",
                "ZMW",
                "ZWG"
              ]
            }
          },
          {
            "name": "currency_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated currency_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "document_number[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on document_number.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "document_number[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated document_number values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on account_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated account_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "payment_mode[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on payment_mode.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "payment_mode[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated payment_mode values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on posted_date.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated posted_date values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[gte]",
            "in": "query",
            "required": false,
            "description": "posted_date greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[lte]",
            "in": "query",
            "required": false,
            "description": "posted_date less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of expenses.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Expense"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Create an expense",
        "operationId": "create_expenses",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ExpenseWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/ExpenseWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created expenses record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/Expense"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Update an expense",
        "operationId": "update_expenses",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "run_async",
            "in": "query",
            "required": false,
            "description": "Process the write asynchronously. Required when `data` is an array (batch write).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ExpenseWrite"
                      },
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/ExpenseWrite"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated expenses record (sync) or a sync id (async).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/Expense"
                            }
                          ],
                          "nullable": true,
                          "description": "The written record, read back (synchronous writes only)."
                        },
                        "sync_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sync_id"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/expenses/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Get an expense",
        "operationId": "get_expenses",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single expenses record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Expense"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/cash_flow_statements": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "List cash flow statements",
        "operationId": "list_cash_flow_statements",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "description": "Roll up consecutive monthly rows into N-month buckets. Requires period_start[gte] and period_end[lte].",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "currency_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on currency_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated currency_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period_start[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on period_start.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period_start[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated period_start values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period_start[gte]",
            "in": "query",
            "required": false,
            "description": "period_start greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period_start[lte]",
            "in": "query",
            "required": false,
            "description": "period_start less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period_end[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on period_end.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period_end[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated period_end values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period_end[gte]",
            "in": "query",
            "required": false,
            "description": "period_end greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period_end[lte]",
            "in": "query",
            "required": false,
            "description": "period_end less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of cash_flow_statements.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CashFlowStatement"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/cash_flow_statements/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Get a cash flow statement",
        "operationId": "get_cash_flow_statements",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single cash_flow_statements record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CashFlowStatement"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/goods_receipt_notes": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "List goods receipt notes",
        "operationId": "list_goods_receipt_notes",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand: line_items, contact, currency.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on status.",
            "schema": {
              "type": "string",
              "enum": [
                "DRAFT",
                "SUBMITTED",
                "PARTIALLY_PAID",
                "PAID",
                "OVERDUE",
                "VOID",
                "UNKNOWN"
              ]
            }
          },
          {
            "name": "status[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated status values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on contact_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated contact_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on currency_id.",
            "schema": {
              "type": "string",
              "enum": [
                "AED",
                "AFN",
                "ALL",
                "AMD",
                "ANG",
                "AOA",
                "ARS",
                "AUD",
                "AWG",
                "AZN",
                "BAM",
                "BBD",
                "BDT",
                "BGN",
                "BHD",
                "BIF",
                "BMD",
                "BND",
                "BOB",
                "BOV",
                "BRL",
                "BSD",
                "BTN",
                "BWP",
                "BYN",
                "BZD",
                "CAD",
                "CDF",
                "CHE",
                "CHF",
                "CHW",
                "CLF",
                "CLP",
                "CNY",
                "COP",
                "COU",
                "CRC",
                "CUC",
                "CUP",
                "CVE",
                "CZK",
                "DJF",
                "DKK",
                "DOP",
                "DZD",
                "EGP",
                "ERN",
                "ETB",
                "EUR",
                "FJD",
                "FKP",
                "GBP",
                "GEL",
                "GHS",
                "GIP",
                "GMD",
                "GNF",
                "GTQ",
                "GYD",
                "HKD",
                "HNL",
                "HTG",
                "HUF",
                "IDR",
                "ILS",
                "INR",
                "IQD",
                "IRR",
                "ISK",
                "JMD",
                "JOD",
                "JPY",
                "KES",
                "KGS",
                "KHR",
                "KMF",
                "KPW",
                "KRW",
                "KWD",
                "KYD",
                "KZT",
                "LAK",
                "LBP",
                "LKR",
                "LRD",
                "LSL",
                "LYD",
                "MAD",
                "MDL",
                "MGA",
                "MKD",
                "MMK",
                "MNT",
                "MOP",
                "MRU",
                "MUR",
                "MVR",
                "MWK",
                "MXN",
                "MXV",
                "MYR",
                "MZN",
                "NAD",
                "NGN",
                "NIO",
                "NOK",
                "NPR",
                "NZD",
                "OMR",
                "PAB",
                "PEN",
                "PGK",
                "PHP",
                "PKR",
                "PLN",
                "PYG",
                "QAR",
                "RON",
                "RSD",
                "RUB",
                "RWF",
                "SAR",
                "SBD",
                "SCR",
                "SDG",
                "SEK",
                "SGD",
                "SHP",
                "SLE",
                "SOS",
                "SRD",
                "SSP",
                "STN",
                "SVC",
                "SYP",
                "SZL",
                "THB",
                "TJS",
                "TMT",
                "TND",
                "TOP",
                "TRY",
                "TTD",
                "TWD",
                "TZS",
                "UAH",
                "UGX",
                "USD",
                "USN",
                "UYI",
                "UYU",
                "UYW",
                "UZS",
                "VED",
                "VES",
                "VND",
                "VUV",
                "WST",
                "XAF",
                "XAG",
                "XAU",
                "XBA",
                "XBB",
                "XBC",
                "XBD",
                "XCD",
                "XDR",
                "XOF",
                "XPD",
                "XPF",
                "XPT",
                "XSU",
                "XTS",
                "XUA",
                "XXX",
                "YER",
                "ZAR",
                "ZMW",
                "ZWG"
              ]
            }
          },
          {
            "name": "currency_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated currency_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "document_number[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on document_number.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "document_number[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated document_number values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_integration_type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_integration_type[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_integration_type values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on posted_date.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated posted_date values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[gte]",
            "in": "query",
            "required": false,
            "description": "posted_date greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "posted_date[lte]",
            "in": "query",
            "required": false,
            "description": "posted_date less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of goods_receipt_notes.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GoodsReceiptNote"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/goods_receipt_notes/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "Accounting"
        ],
        "summary": "Get a goods receipt note",
        "operationId": "get_goods_receipt_notes",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single goods_receipt_notes record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/GoodsReceiptNote"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/companies": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "CRM"
        ],
        "summary": "List companies",
        "operationId": "list_companies",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "name[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated name values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "industry[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on industry.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "industry[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated industry values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "domain[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on domain.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "domain[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated domain values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "owner_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on owner_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "owner_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated owner_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on created_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated created_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[gte]",
            "in": "query",
            "required": false,
            "description": "created_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at[lte]",
            "in": "query",
            "required": false,
            "description": "created_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of companies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Company"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/companies/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "CRM"
        ],
        "summary": "Get a company",
        "operationId": "get_companies",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single companies record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Company"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/owners": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "CRM"
        ],
        "summary": "List owners",
        "operationId": "list_owners",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "name[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated name values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on email.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated email values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of owners.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Owner"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/owners/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "CRM"
        ],
        "summary": "Get an owner",
        "operationId": "get_owners",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single owners record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Owner"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/leads": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "CRM"
        ],
        "summary": "List leads",
        "operationId": "list_leads",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "name[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated name values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on email.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated email values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "company_name[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on company_name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "company_name[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated company_name values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on status.",
            "schema": {
              "type": "string",
              "enum": [
                "OPEN",
                "CLOSED",
                "QUALIFIED",
                "UNQUALIFIED"
              ]
            }
          },
          {
            "name": "status[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated status values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lead_source[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on lead_source.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lead_source[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated lead_source values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "owner_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on owner_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "owner_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated owner_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of leads.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Lead"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/leads/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "CRM"
        ],
        "summary": "Get a lead",
        "operationId": "get_leads",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single leads record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Lead"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/pipelines": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "CRM"
        ],
        "summary": "List pipelines",
        "operationId": "list_pipelines",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand: stages.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated name values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on status.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated status values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of pipelines.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Pipeline"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/pipelines/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "CRM"
        ],
        "summary": "Get a pipeline",
        "operationId": "get_pipelines",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single pipelines record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Pipeline"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/opportunities": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "CRM"
        ],
        "summary": "List opportunities",
        "operationId": "list_opportunities",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "name[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated name values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on status.",
            "schema": {
              "type": "string",
              "enum": [
                "OPEN",
                "WON",
                "LOST"
              ]
            }
          },
          {
            "name": "status[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated status values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pipeline_stage_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on pipeline_stage_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pipeline_stage_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated pipeline_stage_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pipeline_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on pipeline_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pipeline_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated pipeline_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on account_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated account_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on contact_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated contact_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "owner_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on owner_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "owner_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated owner_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on currency_id.",
            "schema": {
              "type": "string",
              "enum": [
                "AED",
                "AFN",
                "ALL",
                "AMD",
                "ANG",
                "AOA",
                "ARS",
                "AUD",
                "AWG",
                "AZN",
                "BAM",
                "BBD",
                "BDT",
                "BGN",
                "BHD",
                "BIF",
                "BMD",
                "BND",
                "BOB",
                "BOV",
                "BRL",
                "BSD",
                "BTN",
                "BWP",
                "BYN",
                "BZD",
                "CAD",
                "CDF",
                "CHE",
                "CHF",
                "CHW",
                "CLF",
                "CLP",
                "CNY",
                "COP",
                "COU",
                "CRC",
                "CUC",
                "CUP",
                "CVE",
                "CZK",
                "DJF",
                "DKK",
                "DOP",
                "DZD",
                "EGP",
                "ERN",
                "ETB",
                "EUR",
                "FJD",
                "FKP",
                "GBP",
                "GEL",
                "GHS",
                "GIP",
                "GMD",
                "GNF",
                "GTQ",
                "GYD",
                "HKD",
                "HNL",
                "HTG",
                "HUF",
                "IDR",
                "ILS",
                "INR",
                "IQD",
                "IRR",
                "ISK",
                "JMD",
                "JOD",
                "JPY",
                "KES",
                "KGS",
                "KHR",
                "KMF",
                "KPW",
                "KRW",
                "KWD",
                "KYD",
                "KZT",
                "LAK",
                "LBP",
                "LKR",
                "LRD",
                "LSL",
                "LYD",
                "MAD",
                "MDL",
                "MGA",
                "MKD",
                "MMK",
                "MNT",
                "MOP",
                "MRU",
                "MUR",
                "MVR",
                "MWK",
                "MXN",
                "MXV",
                "MYR",
                "MZN",
                "NAD",
                "NGN",
                "NIO",
                "NOK",
                "NPR",
                "NZD",
                "OMR",
                "PAB",
                "PEN",
                "PGK",
                "PHP",
                "PKR",
                "PLN",
                "PYG",
                "QAR",
                "RON",
                "RSD",
                "RUB",
                "RWF",
                "SAR",
                "SBD",
                "SCR",
                "SDG",
                "SEK",
                "SGD",
                "SHP",
                "SLE",
                "SOS",
                "SRD",
                "SSP",
                "STN",
                "SVC",
                "SYP",
                "SZL",
                "THB",
                "TJS",
                "TMT",
                "TND",
                "TOP",
                "TRY",
                "TTD",
                "TWD",
                "TZS",
                "UAH",
                "UGX",
                "USD",
                "USN",
                "UYI",
                "UYU",
                "UYW",
                "UZS",
                "VED",
                "VES",
                "VND",
                "VUV",
                "WST",
                "XAF",
                "XAG",
                "XAU",
                "XBA",
                "XBB",
                "XBC",
                "XBD",
                "XCD",
                "XDR",
                "XOF",
                "XPD",
                "XPF",
                "XPT",
                "XSU",
                "XTS",
                "XUA",
                "XXX",
                "YER",
                "ZAR",
                "ZMW",
                "ZWG"
              ]
            }
          },
          {
            "name": "currency_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated currency_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of opportunities.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Opportunity"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/opportunities/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "CRM"
        ],
        "summary": "Get an opportunity",
        "operationId": "get_opportunities",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single opportunities record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Opportunity"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/notes": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "CRM"
        ],
        "summary": "List notes",
        "operationId": "list_notes",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "owner_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on owner_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "owner_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated owner_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on account_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated account_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on contact_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated contact_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "opportunity_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on opportunity_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "opportunity_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated opportunity_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lead_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on lead_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lead_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated lead_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of notes.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Note"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/notes/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "CRM"
        ],
        "summary": "Get a note",
        "operationId": "get_notes",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single notes record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Note"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/tasks": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "CRM"
        ],
        "summary": "List tasks",
        "operationId": "list_tasks",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max records to return.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "description": "Cursor for the next page (from a previous response).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prev",
            "in": "query",
            "required": false,
            "description": "Cursor for the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted_records",
            "in": "query",
            "required": false,
            "description": "Include soft-deleted records.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "return_count",
            "in": "query",
            "required": false,
            "description": "Include the total match count in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "subject[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on subject.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subject[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated subject values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on status.",
            "schema": {
              "type": "string",
              "enum": [
                "OPEN",
                "IN_PROGRESS",
                "COMPLETED"
              ]
            }
          },
          {
            "name": "status[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated status values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "priority[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on priority.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "priority[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated priority values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "owner_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on owner_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "owner_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated owner_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on account_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated account_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on contact_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated contact_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "opportunity_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on opportunity_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "opportunity_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated opportunity_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lead_id[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on lead_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lead_id[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated lead_id values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[eq]",
            "in": "query",
            "required": false,
            "description": "Exact match on rootfi_updated_at.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[in]",
            "in": "query",
            "required": false,
            "description": "Comma-separated rootfi_updated_at values (OR match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[gte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at greater-than-or-equal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootfi_updated_at[lte]",
            "in": "query",
            "required": false,
            "description": "rootfi_updated_at less-than-or-equal.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of tasks.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Task"
                          }
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "next": {
                          "type": "string",
                          "nullable": true
                        },
                        "prev": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "data",
                        "total_count",
                        "next",
                        "prev"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/core/companies/{companyId}/tasks/{id}": {
      "get": {
        "x-audience": "customer",
        "tags": [
          "CRM"
        ],
        "summary": "Get a task",
        "operationId": "get_tasks",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "Commenda company id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The record's rootfi_id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "Comma-separated related resources to expand.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single tasks record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Task"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "info": {
    "title": "Commenda Integrations V4 API",
    "description": "Commenda Integrations — unified accounting, commerce, and CRM API.",
    "version": "4.0.0",
    "contact": {}
  },
  "tags": [],
  "servers": [
    {
      "url": "https://api.integrations.commenda.io",
      "description": "Production"
    }
  ],
  "components": {
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "in": "header",
        "name": "api_key",
        "description": "Your Commenda Integrations API key, sent in the `api_key` header."
      }
    },
    "schemas": {
      "Account": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier assigned by Commenda for this account"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was last updated in Commenda's system (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Unique identifier for this account in the source accounting platform"
          },
          "nominal_code": {
            "type": "string",
            "nullable": true,
            "description": "The nominal code of the account"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "The name of the account"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "The description of the account"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "description": "ISO 4217 currency code"
          },
          "current_balance": {
            "type": "number",
            "nullable": true,
            "description": "The current balance of the account"
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "ARCHIVED",
              "UNKNOWN"
            ],
            "nullable": true,
            "description": "The status of the account"
          },
          "category": {
            "type": "string",
            "enum": [
              "ASSET",
              "EXPENSE",
              "LIABILITY",
              "EQUITY",
              "INCOME",
              "BANK",
              "UNKNOWN"
            ],
            "nullable": true,
            "description": "The category of the account"
          },
          "sub_category": {
            "type": "string",
            "nullable": true,
            "description": "The sub category of the account"
          },
          "parent_account_id": {
            "type": "string",
            "nullable": true,
            "description": "The parent account ID of the account"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The date and time the account was last updated"
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ],
        "description": "An account contained within the business entity's chart of accounts."
      },
      "AccountWrite": {
        "type": "object",
        "properties": {
          "platform_id": {
            "type": "string",
            "example": "string"
          },
          "nominal_code": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "example": "AED"
          },
          "current_balance": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "ARCHIVED",
              "UNKNOWN"
            ],
            "nullable": true,
            "example": "ACTIVE"
          },
          "category": {
            "type": "string",
            "enum": [
              "ASSET",
              "EXPENSE",
              "LIABILITY",
              "EQUITY",
              "INCOME",
              "BANK",
              "UNKNOWN"
            ],
            "nullable": true,
            "example": "ASSET"
          },
          "sub_category": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "parent_account_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          }
        },
        "required": [
          "platform_id"
        ]
      },
      "Address": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string"
          },
          "parent_id": {
            "type": "string",
            "nullable": true
          },
          "parent_type": {
            "type": "string",
            "enum": [
              "ACCOUNT",
              "BALANCE_SHEET",
              "BANK_ACCOUNT",
              "BANK_TRANSACTION",
              "BILL",
              "BILL_CREDIT_NOTE",
              "BILL_PAYMENT",
              "CASH_FLOW_STATEMENT",
              "COMPANY_INFO",
              "CONTACT",
              "CURRENCY",
              "DOCUMENT",
              "EXPENSE",
              "GOODS_RECEIPT_NOTE",
              "INCOME_STATEMENT",
              "INVOICE",
              "INVOICE_CREDIT_NOTE",
              "INVOICE_PAYMENT",
              "ITEM",
              "JOURNAL_ENTRY",
              "JOURNAL_LINE",
              "PROJECT",
              "PURCHASE_ORDER",
              "SALES_ORDER",
              "ESTIMATE",
              "TAX_RATE",
              "TRACKING_CATEGORY",
              "CASH_SALE",
              "CASH_REFUND",
              "BALANCE",
              "DISPUTE",
              "ORDER",
              "PAYOUT",
              "SUBSCRIPTION",
              "TRANSACTION",
              "EVENT",
              "FULFILLMENT",
              "INVENTORY",
              "COMPANY",
              "LEAD",
              "OPPORTUNITY",
              "PIPELINE",
              "PIPELINE_STAGE",
              "NOTE",
              "TASK",
              "OWNER",
              "ENGAGEMENT",
              "ADDRESS",
              "EXTERNAL_LINK",
              "LINE_ITEM",
              "PHONE_NUMBER",
              "VARIANT"
            ],
            "nullable": true
          },
          "type": {
            "type": "string",
            "enum": [
              "SHIPPING",
              "BILLING",
              "COMPANY",
              "WAREHOUSE"
            ],
            "nullable": true
          },
          "street": {
            "type": "string",
            "nullable": true
          },
          "street2": {
            "type": "string",
            "nullable": true
          },
          "locality": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "postal_code": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ]
      },
      "AddressWrite": {
        "type": "object",
        "properties": {
          "platform_id": {
            "type": "string",
            "example": "string"
          },
          "parent_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "parent_type": {
            "type": "string",
            "enum": [
              "ACCOUNT",
              "BALANCE_SHEET",
              "BANK_ACCOUNT",
              "BANK_TRANSACTION",
              "BILL",
              "BILL_CREDIT_NOTE",
              "BILL_PAYMENT",
              "CASH_FLOW_STATEMENT",
              "COMPANY_INFO",
              "CONTACT",
              "CURRENCY",
              "DOCUMENT",
              "EXPENSE",
              "GOODS_RECEIPT_NOTE",
              "INCOME_STATEMENT",
              "INVOICE",
              "INVOICE_CREDIT_NOTE",
              "INVOICE_PAYMENT",
              "ITEM",
              "JOURNAL_ENTRY",
              "JOURNAL_LINE",
              "PROJECT",
              "PURCHASE_ORDER",
              "SALES_ORDER",
              "ESTIMATE",
              "TAX_RATE",
              "TRACKING_CATEGORY",
              "CASH_SALE",
              "CASH_REFUND",
              "BALANCE",
              "DISPUTE",
              "ORDER",
              "PAYOUT",
              "SUBSCRIPTION",
              "TRANSACTION",
              "EVENT",
              "FULFILLMENT",
              "INVENTORY",
              "COMPANY",
              "LEAD",
              "OPPORTUNITY",
              "PIPELINE",
              "PIPELINE_STAGE",
              "NOTE",
              "TASK",
              "OWNER",
              "ENGAGEMENT",
              "ADDRESS",
              "EXTERNAL_LINK",
              "LINE_ITEM",
              "PHONE_NUMBER",
              "VARIANT"
            ],
            "nullable": true,
            "example": "ACCOUNT"
          },
          "type": {
            "type": "string",
            "enum": [
              "SHIPPING",
              "BILLING",
              "COMPANY",
              "WAREHOUSE"
            ],
            "nullable": true,
            "example": "SHIPPING"
          },
          "street": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "street2": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "locality": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "city": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "state": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "postal_code": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "country": {
            "type": "string",
            "nullable": true,
            "example": "string"
          }
        },
        "required": [
          "platform_id"
        ]
      },
      "ApiActivityDay": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string"
          },
          "success": {
            "type": "number"
          },
          "failed": {
            "type": "number"
          }
        },
        "required": [
          "date",
          "success",
          "failed"
        ]
      },
      "ApiLogJob": {
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string"
          },
          "dataModel": {
            "type": "string",
            "enum": [
              "ACCOUNT",
              "BALANCE_SHEET",
              "BANK_ACCOUNT",
              "BANK_TRANSACTION",
              "BILL",
              "BILL_CREDIT_NOTE",
              "BILL_PAYMENT",
              "CASH_FLOW_STATEMENT",
              "COMPANY_INFO",
              "CONTACT",
              "CURRENCY",
              "DOCUMENT",
              "EXPENSE",
              "GOODS_RECEIPT_NOTE",
              "INCOME_STATEMENT",
              "INVOICE",
              "INVOICE_CREDIT_NOTE",
              "INVOICE_PAYMENT",
              "ITEM",
              "JOURNAL_ENTRY",
              "JOURNAL_LINE",
              "PROJECT",
              "PURCHASE_ORDER",
              "SALES_ORDER",
              "ESTIMATE",
              "TAX_RATE",
              "TRACKING_CATEGORY",
              "CASH_SALE",
              "CASH_REFUND",
              "BALANCE",
              "DISPUTE",
              "ORDER",
              "PAYOUT",
              "SUBSCRIPTION",
              "TRANSACTION",
              "EVENT",
              "FULFILLMENT",
              "INVENTORY",
              "COMPANY",
              "LEAD",
              "OPPORTUNITY",
              "PIPELINE",
              "PIPELINE_STAGE",
              "NOTE",
              "TASK",
              "OWNER",
              "ENGAGEMENT",
              "ADDRESS",
              "EXTERNAL_LINK",
              "LINE_ITEM",
              "PHONE_NUMBER",
              "VARIANT"
            ]
          },
          "jobType": {
            "type": "string",
            "enum": [
              "PUSH",
              "PULL",
              "CUSTOM"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILED",
              "CREATED",
              "RUNNING"
            ]
          },
          "error": {
            "type": "object"
          },
          "errorCode": {
            "type": "object"
          },
          "startTime": {
            "type": "object"
          },
          "endTime": {
            "type": "object"
          },
          "responseLength": {
            "type": "object"
          }
        },
        "required": [
          "jobId",
          "dataModel",
          "jobType",
          "status",
          "error"
        ]
      },
      "ApiLogRequest": {
        "type": "object",
        "properties": {
          "headers": {
            "type": "object"
          },
          "body": {
            "type": "object"
          },
          "query": {
            "type": "object"
          },
          "params": {
            "type": "object"
          }
        },
        "required": [
          "body"
        ]
      },
      "ApiLogResponse": {
        "type": "object",
        "properties": {
          "body": {
            "type": "object"
          },
          "statusCode": {
            "type": "number"
          }
        },
        "required": [
          "body",
          "statusCode"
        ]
      },
      "Balance": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier for this balance record"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When this record was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When this record was last updated (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Platform-specific balance identifier"
          },
          "total_balance": {
            "type": "number",
            "nullable": true,
            "description": "Total balance including pending funds"
          },
          "available_balance": {
            "type": "number",
            "nullable": true,
            "description": "Funds available for immediate use or payout"
          },
          "pending_balance": {
            "type": "number",
            "nullable": true,
            "description": "Funds not yet available (processing, holds, etc.)"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "description": "ISO 4217 currency code"
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ],
        "description": "The Balance object represents the current account balance for a payment gateway account."
      },
      "BalanceSheet": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier assigned by Commenda for this balance sheet"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was last updated in Commenda's system (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Unique identifier for this balance sheet in the source accounting platform"
          },
          "assets": {
            "description": "The line items for assets of the balance sheet report",
            "nullable": true
          },
          "liabilities": {
            "description": "The line items for liabilities of the balance sheet report",
            "nullable": true
          },
          "equity": {
            "description": "The line items for equity of the balance sheet report",
            "nullable": true
          },
          "net_assets": {
            "type": "number",
            "nullable": true,
            "description": "The net assets of the balance sheet report"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true
          },
          "period_start": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The start date of the balance sheet report period"
          },
          "period_end": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The end date of the balance sheet report period"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The date and time the balance sheet was last updated"
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ],
        "description": "A financial report that shows a business's assets, liabilities, and equity at a specific point in time. In an accounting platform, a balance sheet is typically generated automatically based on the financial transactions that have been recorded in the system."
      },
      "BankAccount": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier assigned by Commenda for this bank account"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was last updated in Commenda's system (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Unique identifier for this bank account in the source accounting platform"
          },
          "institution_name": {
            "type": "string",
            "nullable": true,
            "description": "The name of the financial institution for the bank account"
          },
          "account_name": {
            "type": "string",
            "nullable": true,
            "description": "The name of the bank account"
          },
          "account_number": {
            "type": "string",
            "nullable": true,
            "description": "The bank account number"
          },
          "balance": {
            "type": "number",
            "nullable": true,
            "description": "The current balance of the bank account"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "description": "ISO 4217 currency code"
          },
          "category": {
            "type": "string",
            "nullable": true,
            "description": "The category of the bank account"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The date and time the bank account was last updated"
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ],
        "description": "A Bank Account represents the financial accounts maintained by the business entity at various banking institutions, capturing account-specific details."
      },
      "BankAccountWrite": {
        "type": "object",
        "properties": {
          "platform_id": {
            "type": "string",
            "example": "string"
          },
          "institution_name": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "account_name": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "account_number": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "balance": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "example": "AED"
          },
          "category": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          }
        },
        "required": [
          "platform_id"
        ]
      },
      "BankTransaction": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier assigned by Commenda for this bank transaction"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was last updated in Commenda's system (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Unique identifier for this bank transaction in the source accounting platform"
          },
          "contact_id": {
            "type": "string",
            "nullable": true,
            "description": "The contact ID of the bank transaction"
          },
          "account_id": {
            "type": "string",
            "nullable": true,
            "description": "The account ID of the bank transaction"
          },
          "from_account_id": {
            "type": "string",
            "nullable": true,
            "description": "The from account ID of the bank transaction"
          },
          "to_account_id": {
            "type": "string",
            "nullable": true,
            "description": "The to account ID of the bank transaction"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "description": "ISO 4217 currency code"
          },
          "amount": {
            "type": "number",
            "nullable": true,
            "description": "The total amount of the bank transaction"
          },
          "type": {
            "type": "string",
            "nullable": true,
            "description": "The type of the bank transaction"
          },
          "debit_or_credit": {
            "type": "string",
            "enum": [
              "CREDIT",
              "DEBIT",
              "UNKNOWN"
            ],
            "nullable": true,
            "description": "The type of transaction"
          },
          "status": {
            "type": "string",
            "nullable": true,
            "description": "The status of the bank transaction"
          },
          "currency_rate": {
            "type": "number",
            "nullable": true,
            "description": "The currency rate of the bank transaction"
          },
          "transaction_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The transaction date of the bank transaction"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The date and time the bank transaction was last updated"
          },
          "contact": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Contact"
            },
            "nullable": true
          },
          "bank_account": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BankAccount"
            },
            "nullable": true
          },
          "currency": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Currency"
            },
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ],
        "description": "Bank Transactions include the Transactional banking data for a specific company and account."
      },
      "BankTransactionWrite": {
        "type": "object",
        "properties": {
          "platform_id": {
            "type": "string",
            "example": "string"
          },
          "contact_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "account_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "from_account_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "to_account_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "example": "AED"
          },
          "amount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "type": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "debit_or_credit": {
            "type": "string",
            "enum": [
              "CREDIT",
              "DEBIT",
              "UNKNOWN"
            ],
            "nullable": true,
            "example": "CREDIT"
          },
          "status": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "currency_rate": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "transaction_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "contact": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactWrite"
            },
            "nullable": true
          },
          "bank_account": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BankAccountWrite"
            },
            "nullable": true
          },
          "currency": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CurrencyWrite"
            },
            "nullable": true
          }
        },
        "required": [
          "platform_id"
        ]
      },
      "Bill": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier assigned by Commenda for this bill"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was last updated in Commenda's system (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Unique identifier for this bill in the source accounting platform"
          },
          "document_number": {
            "type": "string",
            "nullable": true,
            "description": "The document number of the bill"
          },
          "posted_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The posted date of the bill"
          },
          "due_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The due date of the bill"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "description": "ISO 4217 currency code"
          },
          "currency_rate": {
            "type": "number",
            "nullable": true,
            "description": "The currency rate of the bill"
          },
          "sub_total": {
            "type": "number",
            "nullable": true,
            "description": "The sub total of the bill"
          },
          "tax_amount": {
            "type": "number",
            "nullable": true,
            "description": "The tax amount of the bill"
          },
          "total_discount": {
            "type": "number",
            "nullable": true,
            "description": "The total discount of the bill"
          },
          "total_amount": {
            "type": "number",
            "nullable": true,
            "description": "The total amount of the bill"
          },
          "amount_due": {
            "type": "number",
            "nullable": true,
            "description": "The amount due of the bill"
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "SUBMITTED",
              "PARTIALLY_PAID",
              "PAID",
              "OVERDUE",
              "VOID",
              "UNKNOWN"
            ],
            "nullable": true,
            "description": "The status of the bill"
          },
          "contact_id": {
            "type": "string",
            "nullable": true,
            "description": "The contact ID of the bill"
          },
          "memo": {
            "type": "string",
            "nullable": true,
            "description": "The memo or notes of the bill"
          },
          "purchase_order_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The purchase order IDs associated with the bill"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The date and time the bill was last updated"
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineItem"
            },
            "nullable": true
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Document"
            },
            "nullable": true
          },
          "contact": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Contact"
            },
            "nullable": true
          },
          "currency": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Currency"
            },
            "nullable": true
          },
          "bill_payments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BillPayment"
            },
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id",
          "purchase_order_ids"
        ],
        "description": "A record of goods or services purchased from a vendor."
      },
      "BillCreditNote": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier assigned by Commenda for this bill credit note"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was last updated in Commenda's system (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Unique identifier for this bill credit note in the source accounting platform"
          },
          "contact_id": {
            "type": "string",
            "nullable": true,
            "description": "The contact ID of the bill credit note"
          },
          "document_number": {
            "type": "string",
            "nullable": true,
            "description": "The document number of the bill credit note"
          },
          "total_amount": {
            "type": "number",
            "nullable": true,
            "description": "The total amount of the bill credit note"
          },
          "remaining_credit": {
            "type": "number",
            "nullable": true,
            "description": "The remaining credit amount of the bill credit note"
          },
          "posted_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The posted date of the bill credit note"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "description": "ISO 4217 currency code"
          },
          "memo": {
            "type": "string",
            "nullable": true,
            "description": "The memo or notes of the bill credit note"
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "SUBMITTED",
              "PARTIALLY_PAID",
              "PAID",
              "OVERDUE",
              "VOID",
              "UNKNOWN"
            ],
            "nullable": true,
            "description": "The status of the bill credit note"
          },
          "bill_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The bill IDs associated with the bill credit note"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The date and time the bill credit note was last updated"
          },
          "contact": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Contact"
            },
            "nullable": true
          },
          "currency": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Currency"
            },
            "nullable": true
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineItem"
            },
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id",
          "bill_ids"
        ],
        "description": "A Bill Credit Note is a financial transaction representing a reduction that can be applied against one or multiple bills issued to Vendors."
      },
      "BillCreditNoteWrite": {
        "type": "object",
        "properties": {
          "platform_id": {
            "type": "string",
            "example": "string"
          },
          "contact_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "document_number": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "total_amount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "remaining_credit": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "posted_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "example": "AED"
          },
          "memo": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "SUBMITTED",
              "PARTIALLY_PAID",
              "PAID",
              "OVERDUE",
              "VOID",
              "UNKNOWN"
            ],
            "nullable": true,
            "example": "DRAFT"
          },
          "bill_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "string"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "contact": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactWrite"
            },
            "nullable": true
          },
          "currency": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CurrencyWrite"
            },
            "nullable": true
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineItemWrite"
            },
            "nullable": true
          }
        },
        "required": [
          "platform_id",
          "bill_ids"
        ]
      },
      "BillPayment": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier assigned by Commenda for this bill payment"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was last updated in Commenda's system (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Unique identifier for this bill payment in the source accounting platform"
          },
          "bill_id": {
            "type": "string",
            "nullable": true,
            "description": "The bill ID of the bill payment"
          },
          "payment_id": {
            "type": "string",
            "nullable": true,
            "description": "The payment ID of the bill payment"
          },
          "credit_note_id": {
            "type": "string",
            "nullable": true,
            "description": "The credit note ID associated with the bill payment (if paying via debit note)"
          },
          "amount": {
            "type": "number",
            "nullable": true,
            "description": "The total amount of the bill payment"
          },
          "payment_mode": {
            "type": "string",
            "nullable": true,
            "description": "The payment mode of the bill payment"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "description": "ISO 4217 currency code"
          },
          "currency_rate": {
            "type": "number",
            "nullable": true,
            "description": "The currency rate of the bill payment"
          },
          "memo": {
            "type": "string",
            "nullable": true,
            "description": "The memo or notes of the bill payment"
          },
          "payment_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The payment date of the bill payment"
          },
          "account_id": {
            "type": "string",
            "nullable": true,
            "description": "The account ID of the bill payment"
          },
          "contact_id": {
            "type": "string",
            "nullable": true,
            "description": "The contact ID of the bill payment"
          },
          "document_number": {
            "type": "string",
            "nullable": true,
            "description": "The document number of the bill payment"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The date and time the bill payment was last updated"
          },
          "bill": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Bill"
            },
            "nullable": true
          },
          "contact": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Contact"
            },
            "nullable": true
          },
          "currency": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Currency"
            },
            "nullable": true
          },
          "account": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Account"
            },
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ],
        "description": "The Bill Payments Data Model is designed to standardise and simplify the management of bill payment information across various accounting platforms."
      },
      "BillPaymentWrite": {
        "type": "object",
        "properties": {
          "platform_id": {
            "type": "string",
            "example": "string"
          },
          "bill_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "payment_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "credit_note_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "amount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "payment_mode": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "example": "AED"
          },
          "currency_rate": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "memo": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "payment_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "account_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "contact_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "document_number": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "bill": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BillWrite"
            },
            "nullable": true
          },
          "contact": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactWrite"
            },
            "nullable": true
          },
          "currency": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CurrencyWrite"
            },
            "nullable": true
          },
          "account": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountWrite"
            },
            "nullable": true
          }
        },
        "required": [
          "platform_id"
        ]
      },
      "BillWrite": {
        "type": "object",
        "properties": {
          "platform_id": {
            "type": "string",
            "example": "string"
          },
          "document_number": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "posted_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "due_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "example": "AED"
          },
          "currency_rate": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "sub_total": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "tax_amount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "total_discount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "total_amount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "amount_due": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "SUBMITTED",
              "PARTIALLY_PAID",
              "PAID",
              "OVERDUE",
              "VOID",
              "UNKNOWN"
            ],
            "nullable": true,
            "example": "DRAFT"
          },
          "contact_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "memo": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "purchase_order_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "string"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineItemWrite"
            },
            "nullable": true
          },
          "contact": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactWrite"
            },
            "nullable": true
          },
          "currency": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CurrencyWrite"
            },
            "nullable": true
          },
          "bill_payments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BillPaymentWrite"
            },
            "nullable": true
          }
        },
        "required": [
          "platform_id",
          "purchase_order_ids"
        ]
      },
      "CashFlowStatement": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier assigned by Commenda for this cash flow statement"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was last updated in Commenda's system (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Unique identifier for this cash flow statement in the source accounting platform"
          },
          "operating_activities": {
            "description": "The line items for operating activities of the cash flow statement report",
            "nullable": true
          },
          "investing_activities": {
            "description": "The line items for investing activities of the cash flow statement report",
            "nullable": true
          },
          "financing_activities": {
            "description": "The line items for financing activities of the cash flow statement report",
            "nullable": true
          },
          "cash_at_beginning_of_period": {
            "type": "number",
            "nullable": true,
            "description": "The total amount at the beginning of the period"
          },
          "cash_at_end_of_period": {
            "type": "number",
            "nullable": true,
            "description": "The total amount at the end of the period"
          },
          "period_start": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The start date of the cash flow statement report period"
          },
          "period_end": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The end date of the cash flow statement report period"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The date and time the cash flow statement was last updated"
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ],
        "description": "Cash flow statements are financial statements that show the inflow and outflow of cash and cash equivalents from a company's operations, investments, and financing activities over a specific period of time."
      },
      "CashRefund": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "platform_id": {
            "type": "string"
          },
          "platform_unique_id": {
            "type": "string",
            "nullable": true
          },
          "posted_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "document_number": {
            "type": "string",
            "nullable": true
          },
          "contact_id": {
            "type": "string",
            "nullable": true
          },
          "total_discount": {
            "type": "number",
            "nullable": true
          },
          "sub_total": {
            "type": "number",
            "nullable": true
          },
          "tax_amount": {
            "type": "number",
            "nullable": true
          },
          "total_amount": {
            "type": "number",
            "nullable": true
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true
          },
          "memo": {
            "type": "string",
            "nullable": true
          },
          "shipping_amount": {
            "type": "number",
            "nullable": true
          },
          "currency_rate": {
            "type": "number",
            "nullable": true
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "SUBMITTED",
              "PARTIALLY_PAID",
              "PAID",
              "OVERDUE",
              "VOID",
              "UNKNOWN"
            ],
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineItem"
            },
            "nullable": true
          },
          "contact": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Contact"
            },
            "nullable": true
          },
          "currency": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Currency"
            },
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "platform_id",
          "rootfi_integration_type"
        ],
        "description": "Cash refund records from connected accounting platforms."
      },
      "CashSale": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "platform_id": {
            "type": "string"
          },
          "platform_unique_id": {
            "type": "string",
            "nullable": true
          },
          "document_number": {
            "type": "string",
            "nullable": true
          },
          "posted_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true
          },
          "total_discount": {
            "type": "number",
            "nullable": true
          },
          "sub_total": {
            "type": "number",
            "nullable": true
          },
          "tax_amount": {
            "type": "number",
            "nullable": true
          },
          "total_amount": {
            "type": "number",
            "nullable": true
          },
          "memo": {
            "type": "string",
            "nullable": true
          },
          "shipping_amount": {
            "type": "number",
            "nullable": true
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "SUBMITTED",
              "PARTIALLY_PAID",
              "PAID",
              "OVERDUE",
              "VOID",
              "UNKNOWN"
            ],
            "nullable": true
          },
          "currency_rate": {
            "type": "number",
            "nullable": true
          },
          "contact_id": {
            "type": "string",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineItem"
            },
            "nullable": true
          },
          "contact": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Contact"
            },
            "nullable": true
          },
          "currency": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Currency"
            },
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "platform_id",
          "rootfi_integration_type"
        ],
        "description": "Cash sale records from connected accounting platforms."
      },
      "Company": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier assigned by Commenda for this company"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was last updated in Commenda's system (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Unique identifier for this company in the source CRM platform"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "The name of the company"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "A description of the company"
          },
          "industry": {
            "type": "string",
            "nullable": true,
            "description": "The industry the company operates in"
          },
          "website": {
            "type": "string",
            "nullable": true,
            "description": "The company's website URL"
          },
          "domain": {
            "type": "string",
            "nullable": true,
            "description": "The company's domain"
          },
          "number_of_employees": {
            "type": "integer",
            "nullable": true,
            "description": "The number of employees at the company"
          },
          "annual_revenue": {
            "type": "number",
            "nullable": true,
            "description": "The company's annual revenue"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "description": "The ISO-4217 currency code for the company's annual revenue"
          },
          "owner_id": {
            "type": "string",
            "nullable": true,
            "description": "The ID of the user who owns this company"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The date and time the company was last updated"
          },
          "last_activity_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The date and time of the most recent activity with the company"
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ],
        "description": "A company is a business tracked in a CRM — the account that contacts belong to."
      },
      "CompanyInfo": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier assigned by Commenda for this company info"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was last updated in Commenda's system (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Unique identifier for this company info in the source accounting platform"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "The name of the company"
          },
          "legal_name": {
            "type": "string",
            "nullable": true,
            "description": "The legal name of the company"
          },
          "tax_number": {
            "type": "string",
            "nullable": true,
            "description": "The tax number of the company"
          },
          "registration_number": {
            "type": "string",
            "nullable": true,
            "description": "The registration number of the company"
          },
          "base_currency": {
            "type": "string",
            "nullable": true,
            "description": "The base currency of the company"
          },
          "fiscal_start_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The fiscal year start date of the company"
          },
          "org_created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The date and time the organization was created"
          },
          "timezone": {
            "type": "string",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The date and time the company info was last updated"
          },
          "addresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Address"
            },
            "nullable": true
          },
          "phone_numbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PhoneNumber"
            },
            "nullable": true
          },
          "external_links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExternalLink"
            },
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ],
        "description": "The Company Info Data Model is designed to simplify the management and retrieval of company-related information across various accounting platforms."
      },
      "ConnectionHealthBucket": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "HEALTHY",
              "DISCONNECTED",
              "EXPIRED",
              "PENDING",
              "RATE_LIMIT_EXCEEDED"
            ]
          },
          "count": {
            "type": "number"
          }
        },
        "required": [
          "status",
          "count"
        ]
      },
      "Contact": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier assigned by Commenda for this contact"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was last updated in Commenda's system (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Unique identifier for this contact in the source accounting platform"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "The name of the contact"
          },
          "contact_name": {
            "type": "string",
            "nullable": true,
            "description": "The name of the contact person for the contact"
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "tax_number": {
            "type": "string",
            "nullable": true,
            "description": "The contact's tax number"
          },
          "type": {
            "type": "string",
            "enum": [
              "CUSTOMER",
              "VENDOR",
              "BOTH",
              "UNKNOWN"
            ],
            "nullable": true,
            "description": "The type of contact"
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "INACTIVE",
              "SUSPENDED",
              "ARCHIVED",
              "UNKNOWN"
            ],
            "nullable": true,
            "description": "The status of the contact"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "description": "The ISO-4217 currency code of the contact"
          },
          "registration_number": {
            "type": "string",
            "nullable": true,
            "description": "The contact's identifying or registration number"
          },
          "website": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The date and time the contact was last updated"
          },
          "addresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Address"
            },
            "nullable": true
          },
          "phone_numbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PhoneNumber"
            },
            "nullable": true
          },
          "external_links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExternalLink"
            },
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ],
        "description": "A contact is an individual or company that buys or sells goods or services from a business. Commonly referred to as a customer on a corresponding invoice or a vendor for a bill."
      },
      "ContactWrite": {
        "type": "object",
        "properties": {
          "platform_id": {
            "type": "string",
            "example": "string"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "contact_name": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "email": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "phone": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "tax_number": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "CUSTOMER",
              "VENDOR",
              "BOTH",
              "UNKNOWN"
            ],
            "nullable": true,
            "example": "CUSTOMER"
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "INACTIVE",
              "SUSPENDED",
              "ARCHIVED",
              "UNKNOWN"
            ],
            "nullable": true,
            "example": "ACTIVE"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "example": "AED"
          },
          "registration_number": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "website": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "addresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AddressWrite"
            },
            "nullable": true
          },
          "phone_numbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PhoneNumberWrite"
            },
            "nullable": true
          },
          "external_links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExternalLinkWrite"
            },
            "nullable": true
          }
        },
        "required": [
          "platform_id"
        ]
      },
      "CreateInviteLinkDTO": {
        "type": "object",
        "properties": {
          "integration": {
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ],
            "type": "string",
            "example": "QUICKBOOKS"
          },
          "companyName": {
            "type": "string",
            "example": "Acme Inc"
          },
          "syncFrom": {
            "type": "string",
            "format": "date-time",
            "example": "2024-01-01T00:00:00Z"
          },
          "syncConfig": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WriteSyncConfigModel"
            }
          }
        },
        "required": [
          "integration",
          "companyName"
        ]
      },
      "CreateInviteLinkResponse": {
        "type": "object",
        "properties": {
          "inviteLink": {
            "$ref": "#/components/schemas/CreatedInviteLink"
          }
        },
        "required": [
          "inviteLink"
        ]
      },
      "CreateWebhookConfigDTO": {
        "type": "object",
        "properties": {
          "webhook_type": {
            "enum": [
              "INTEGRATION",
              "DATA_MODEL_CHANGES",
              "CONNECTION_CHANGED",
              "SYNC_COMPLETED",
              "SYNC_STARTED",
              "DISCONNECT_REQUESTED"
            ],
            "type": "string",
            "example": "DATA_MODEL_CHANGES"
          },
          "integration_type": {
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ],
            "type": "string",
            "example": "QUICKBOOKS"
          },
          "name": {
            "type": "string",
            "example": "My webhook"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "example": "https://example.com/webhooks"
          },
          "topics": {
            "example": [
              "orders/create"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "state": {
            "enum": [
              "ENABLED",
              "DISABLED"
            ],
            "type": "string",
            "example": "ENABLED"
          },
          "signing_key": {
            "type": "string",
            "example": "your-signing-key"
          },
          "headers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookHeaderDTO"
            }
          }
        },
        "required": [
          "webhook_type",
          "name",
          "url"
        ]
      },
      "CreateWebhookConfigResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SerializedWebhookConfig"
          }
        },
        "required": [
          "data"
        ]
      },
      "CreateWebhookCredentialDTO": {
        "type": "object",
        "properties": {
          "integration_type": {
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ],
            "type": "string",
            "example": "QUICKBOOKS"
          },
          "signing_secret": {
            "type": "string",
            "example": "your-signing-secret"
          },
          "verification_mode": {
            "enum": [
              "URL_PARAM",
              "HEADER"
            ],
            "type": "string",
            "example": "HEADER"
          },
          "rootfi_company_id": {
            "type": "number",
            "nullable": true,
            "minimum": 1,
            "example": 1234
          }
        },
        "required": [
          "integration_type",
          "signing_secret",
          "verification_mode"
        ]
      },
      "CreateWebhookCredentialResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SerializedWebhookCredential"
          }
        },
        "required": [
          "data"
        ]
      },
      "CreatedInviteLink": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "inviteLinkId": {
            "type": "string"
          },
          "companyId": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "inviteLinkId",
          "companyId"
        ]
      },
      "Currency": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier assigned by Commenda for this currency"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was last updated in Commenda's system (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Unique identifier for this currency in the source accounting platform"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "The name of the currency"
          },
          "code": {
            "type": "string",
            "nullable": true,
            "description": "The ISO-4217 currency code"
          },
          "symbol": {
            "type": "string",
            "nullable": true,
            "description": "The symbol that represents the currency"
          },
          "is_base_currency": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the currency is the base currency for the company"
          },
          "exchange_rate": {
            "type": "number",
            "nullable": true,
            "description": "The exchange rate for the currency"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The date and time the currency was last updated"
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ],
        "description": "The Currencies Data Model streamlines access to currency information across various accounting platforms, providing a consistent and unified representation of currency data."
      },
      "CurrencyWrite": {
        "type": "object",
        "properties": {
          "platform_id": {
            "type": "string",
            "example": "string"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "code": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "symbol": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "is_base_currency": {
            "type": "boolean",
            "nullable": true,
            "example": false
          },
          "exchange_rate": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          }
        },
        "required": [
          "platform_id"
        ]
      },
      "DashboardStats": {
        "type": "object",
        "properties": {
          "totalCompanies": {
            "type": "number"
          },
          "activeConnections": {
            "type": "number"
          },
          "totalConnections": {
            "type": "number"
          },
          "syncsThisMonth": {
            "type": "number"
          },
          "syncCompletionRate": {
            "type": "number"
          },
          "stuckJobsThisMonth": {
            "type": "number"
          },
          "recordsSyncedThisMonth": {
            "type": "number"
          },
          "avgSyncDurationSeconds": {
            "type": "object"
          },
          "apiRequestsThisMonth": {
            "type": "number"
          },
          "webhookDeliveryRate": {
            "type": "number"
          },
          "webhooksThisMonth": {
            "type": "number"
          }
        },
        "required": [
          "totalCompanies",
          "activeConnections",
          "totalConnections",
          "syncsThisMonth",
          "syncCompletionRate",
          "stuckJobsThisMonth",
          "recordsSyncedThisMonth",
          "apiRequestsThisMonth",
          "webhookDeliveryRate",
          "webhooksThisMonth"
        ]
      },
      "DashboardStatsResponse": {
        "type": "object",
        "properties": {
          "stats": {
            "$ref": "#/components/schemas/DashboardStats"
          },
          "syncActivity": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SyncActivityDay"
            }
          },
          "apiActivity": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiActivityDay"
            }
          },
          "webhookStats": {
            "$ref": "#/components/schemas/WebhookStats"
          },
          "connectionHealth": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConnectionHealthBucket"
            }
          },
          "integrationBreakdown": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IntegrationBucket"
            }
          }
        },
        "required": [
          "stats",
          "syncActivity",
          "apiActivity",
          "webhookStats",
          "connectionHealth",
          "integrationBreakdown"
        ]
      },
      "DataModelCounts": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number"
          },
          "success": {
            "type": "number"
          },
          "failed": {
            "type": "number"
          },
          "running": {
            "type": "number"
          },
          "pending": {
            "type": "number"
          }
        },
        "required": [
          "total",
          "success",
          "failed",
          "running",
          "pending"
        ]
      },
      "DataModelSyncConfig": {
        "type": "object",
        "properties": {
          "dataModel": {
            "type": "string",
            "enum": [
              "ACCOUNT",
              "BALANCE_SHEET",
              "BANK_ACCOUNT",
              "BANK_TRANSACTION",
              "BILL",
              "BILL_CREDIT_NOTE",
              "BILL_PAYMENT",
              "CASH_FLOW_STATEMENT",
              "COMPANY_INFO",
              "CONTACT",
              "CURRENCY",
              "DOCUMENT",
              "EXPENSE",
              "GOODS_RECEIPT_NOTE",
              "INCOME_STATEMENT",
              "INVOICE",
              "INVOICE_CREDIT_NOTE",
              "INVOICE_PAYMENT",
              "ITEM",
              "JOURNAL_ENTRY",
              "JOURNAL_LINE",
              "PROJECT",
              "PURCHASE_ORDER",
              "SALES_ORDER",
              "ESTIMATE",
              "TAX_RATE",
              "TRACKING_CATEGORY",
              "CASH_SALE",
              "CASH_REFUND",
              "BALANCE",
              "DISPUTE",
              "ORDER",
              "PAYOUT",
              "SUBSCRIPTION",
              "TRANSACTION",
              "EVENT",
              "FULFILLMENT",
              "INVENTORY",
              "COMPANY",
              "LEAD",
              "OPPORTUNITY",
              "PIPELINE",
              "PIPELINE_STAGE",
              "NOTE",
              "TASK",
              "OWNER",
              "ENGAGEMENT",
              "ADDRESS",
              "EXTERNAL_LINK",
              "LINE_ITEM",
              "PHONE_NUMBER",
              "VARIANT"
            ]
          },
          "category": {
            "type": "string",
            "enum": [
              "ACCOUNTING",
              "PAYMENTS",
              "ECOMMERCE",
              "CRM",
              "HRIS"
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "scopeAccess": {
            "$ref": "#/components/schemas/ScopeAccess"
          },
          "frequency": {
            "type": "string",
            "enum": [
              "WEEKLY",
              "MONTHLY",
              "YEARLY",
              "DAILY",
              "HOURLY",
              "NEVER"
            ]
          },
          "interval": {
            "type": "number"
          },
          "syncFrom": {
            "type": "object",
            "nullable": true
          },
          "isOverridden": {
            "type": "boolean"
          },
          "isChild": {
            "type": "boolean"
          }
        },
        "required": [
          "dataModel",
          "category",
          "enabled",
          "scopeAccess",
          "frequency",
          "interval",
          "syncFrom",
          "isOverridden",
          "isChild"
        ]
      },
      "DataModelSyncConfigResponse": {
        "type": "object",
        "properties": {
          "dataModel": {
            "type": "string",
            "enum": [
              "ACCOUNT",
              "BALANCE_SHEET",
              "BANK_ACCOUNT",
              "BANK_TRANSACTION",
              "BILL",
              "BILL_CREDIT_NOTE",
              "BILL_PAYMENT",
              "CASH_FLOW_STATEMENT",
              "COMPANY_INFO",
              "CONTACT",
              "CURRENCY",
              "DOCUMENT",
              "EXPENSE",
              "GOODS_RECEIPT_NOTE",
              "INCOME_STATEMENT",
              "INVOICE",
              "INVOICE_CREDIT_NOTE",
              "INVOICE_PAYMENT",
              "ITEM",
              "JOURNAL_ENTRY",
              "JOURNAL_LINE",
              "PROJECT",
              "PURCHASE_ORDER",
              "SALES_ORDER",
              "ESTIMATE",
              "TAX_RATE",
              "TRACKING_CATEGORY",
              "CASH_SALE",
              "CASH_REFUND",
              "BALANCE",
              "DISPUTE",
              "ORDER",
              "PAYOUT",
              "SUBSCRIPTION",
              "TRANSACTION",
              "EVENT",
              "FULFILLMENT",
              "INVENTORY",
              "COMPANY",
              "LEAD",
              "OPPORTUNITY",
              "PIPELINE",
              "PIPELINE_STAGE",
              "NOTE",
              "TASK",
              "OWNER",
              "ENGAGEMENT",
              "ADDRESS",
              "EXTERNAL_LINK",
              "LINE_ITEM",
              "PHONE_NUMBER",
              "VARIANT"
            ]
          },
          "category": {
            "type": "string",
            "enum": [
              "ACCOUNTING",
              "PAYMENTS",
              "ECOMMERCE",
              "CRM",
              "HRIS"
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "scopeAccess": {
            "$ref": "#/components/schemas/ScopeAccessResponse"
          },
          "frequency": {
            "type": "string",
            "enum": [
              "WEEKLY",
              "MONTHLY",
              "YEARLY",
              "DAILY",
              "HOURLY",
              "NEVER"
            ]
          },
          "interval": {
            "type": "number"
          },
          "syncFrom": {
            "type": "string",
            "nullable": true
          },
          "isOverridden": {
            "type": "boolean"
          },
          "isChild": {
            "type": "boolean"
          }
        },
        "required": [
          "dataModel",
          "category",
          "enabled",
          "scopeAccess",
          "frequency",
          "interval",
          "syncFrom",
          "isOverridden",
          "isChild"
        ]
      },
      "DisconnectRequestResolver": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "number"
          },
          "name": {
            "type": "object",
            "nullable": true
          },
          "email": {
            "type": "string"
          }
        },
        "required": [
          "rootfi_id",
          "email"
        ]
      },
      "DisconnectRequestResponse": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "number"
          },
          "rootfi_company_id": {
            "type": "number"
          },
          "company_name": {
            "type": "object",
            "nullable": true
          },
          "integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "APPROVED",
              "REJECTED",
              "CANCELLED"
            ]
          },
          "requester_ip": {
            "type": "object",
            "nullable": true
          },
          "resolved_by_user_id": {
            "type": "object",
            "nullable": true
          },
          "resolved_by": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/DisconnectRequestResolver"
              }
            ]
          },
          "resolved_at": {
            "type": "object",
            "nullable": true
          },
          "rootfi_created_at": {
            "type": "string"
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_company_id",
          "integration_type",
          "status",
          "rootfi_created_at"
        ]
      },
      "Dispute": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier for this dispute"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When this dispute was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When this dispute was last updated (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Platform-specific dispute identifier"
          },
          "transaction_id": {
            "type": "string",
            "nullable": true,
            "description": "Reference to the disputed Transaction"
          },
          "invoice_id": {
            "type": "string",
            "nullable": true,
            "description": "Reference to the related Invoice"
          },
          "contact_id": {
            "type": "string",
            "nullable": true,
            "description": "Reference to the Contact"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "description": "ISO 4217 currency code"
          },
          "amount": {
            "type": "number",
            "nullable": true,
            "description": "Disputed amount"
          },
          "status": {
            "type": "string",
            "enum": [
              "OPEN",
              "UNDER_REVIEW",
              "WON",
              "LOST",
              "WARNING_CLOSED",
              "UNKNOWN"
            ],
            "nullable": true,
            "description": "Current dispute status"
          },
          "reason": {
            "type": "string",
            "enum": [
              "FRAUDULENT",
              "DUPLICATE",
              "UNRECOGNIZED",
              "QUALITY_ISSUE",
              "NOT_RECEIVED",
              "CANCELED",
              "OTHER"
            ],
            "nullable": true,
            "description": "Standardized dispute reason"
          },
          "reason_code": {
            "type": "string",
            "nullable": true,
            "description": "Platform-specific reason code"
          },
          "gateway": {
            "type": "string",
            "nullable": true,
            "description": "Payment gateway name"
          },
          "gateway_dispute_id": {
            "type": "string",
            "nullable": true,
            "description": "Platform-specific dispute ID"
          },
          "evidence_due_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Deadline for submitting evidence (ISO 8601)"
          },
          "resolution_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Date dispute was resolved (null if pending) (ISO 8601)"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Original dispute creation timestamp (ISO 8601)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Last update timestamp (ISO 8601)"
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ],
        "description": "The Dispute object represents a contact dispute or chargeback on a payment transaction."
      },
      "Document": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier assigned by Commenda for this document"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was last updated in Commenda's system (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Unique identifier for this document in the source accounting platform"
          },
          "file_name": {
            "type": "string",
            "nullable": true,
            "description": "The file name of the document"
          },
          "file_type": {
            "type": "string",
            "nullable": true,
            "description": "The file type of the document (MIME Type)"
          },
          "file_size": {
            "type": "number",
            "nullable": true,
            "description": "The file size of the document in bytes"
          },
          "document_type_id": {
            "type": "string",
            "nullable": true,
            "description": "The document type ID of the document"
          },
          "document_type": {
            "type": "string",
            "enum": [
              "BILL",
              "INVOICE",
              "EXPENSE",
              "BILL_CREDIT_NOTE",
              "INVOICE_CREDIT_NOTE",
              "PURCHASE_ORDER",
              "SALES_ORDER",
              "JOURNAL_ENTRY"
            ],
            "nullable": true,
            "description": "The document type of the document"
          },
          "document_uploaded": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether RootFi has uploaded the document to its servers"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The date and time the document was last updated"
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ],
        "description": "The Documents Data Model simplifies the handling of document documents across various accounting platforms, providing a standardised approach to accessing and managing document-related information."
      },
      "Estimate": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string"
          },
          "contact_id": {
            "type": "string"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true
          },
          "currency_rate": {
            "type": "number",
            "nullable": true
          },
          "document_number": {
            "type": "string"
          },
          "posted_date": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "SUBMITTED",
              "PARTIALLY_PAID",
              "PAID",
              "OVERDUE",
              "VOID",
              "UNKNOWN",
              "DEPOSITED",
              "NOT_DEPOSITED",
              "PENDING",
              "PROCESSING",
              "ON_HOLD",
              "COMPLETED",
              "CANCELLED",
              "REFUNDED",
              "FAILED",
              "TRASH"
            ]
          },
          "memo": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "contact": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Contact"
            },
            "nullable": true
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineItem"
            },
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id",
          "contact_id",
          "document_number",
          "posted_date",
          "status"
        ],
        "description": "The Estimates data model."
      },
      "EstimateWrite": {
        "type": "object",
        "properties": {
          "platform_id": {
            "type": "string",
            "example": "string"
          },
          "contact_id": {
            "type": "string",
            "example": "string"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "example": "AED"
          },
          "currency_rate": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "document_number": {
            "type": "string",
            "example": "string"
          },
          "posted_date": {
            "type": "string",
            "format": "date-time",
            "example": "2024-01-01T00:00:00Z"
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "SUBMITTED",
              "PARTIALLY_PAID",
              "PAID",
              "OVERDUE",
              "VOID",
              "UNKNOWN",
              "DEPOSITED",
              "NOT_DEPOSITED",
              "PENDING",
              "PROCESSING",
              "ON_HOLD",
              "COMPLETED",
              "CANCELLED",
              "REFUNDED",
              "FAILED",
              "TRASH"
            ],
            "example": "DRAFT"
          },
          "memo": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "contact": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactWrite"
            },
            "nullable": true
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineItemWrite"
            },
            "nullable": true
          }
        },
        "required": [
          "platform_id",
          "contact_id",
          "document_number",
          "posted_date",
          "status"
        ]
      },
      "Expense": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier assigned by Commenda for this expense"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was last updated in Commenda's system (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Unique identifier for this expense in the source accounting platform"
          },
          "document_number": {
            "type": "string",
            "nullable": true,
            "description": "The document number of the expense"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "description": "The ISO-4217 currency code of the expense"
          },
          "currency_rate": {
            "type": "number",
            "nullable": true,
            "description": "The currency rate of the expense"
          },
          "memo": {
            "type": "string",
            "nullable": true,
            "description": "The memo or notes of the expense"
          },
          "account_id": {
            "type": "string",
            "nullable": true,
            "description": "The account ID of the expense"
          },
          "payment_mode": {
            "type": "string",
            "nullable": true,
            "description": "The payment mode of the expense"
          },
          "posted_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The posted date of the expense"
          },
          "sub_total": {
            "type": "number",
            "nullable": true,
            "description": "The sub total of the expense"
          },
          "tax_amount": {
            "type": "number",
            "nullable": true,
            "description": "The tax amount of the expense"
          },
          "total_discount": {
            "type": "number",
            "nullable": true,
            "description": "The total discount of the expense"
          },
          "total_amount": {
            "type": "number",
            "nullable": true,
            "description": "The total amount of the expense"
          },
          "contact_id": {
            "type": "string",
            "nullable": true,
            "description": "The contact ID of the expense"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The date and time the expense was last updated"
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineItem"
            },
            "nullable": true
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Document"
            },
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ],
        "description": "Payment made by a business at the time of purchase (ex. a credit card payment)."
      },
      "ExpenseWrite": {
        "type": "object",
        "properties": {
          "platform_id": {
            "type": "string",
            "example": "string"
          },
          "document_number": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "example": "AED"
          },
          "currency_rate": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "memo": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "account_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "payment_mode": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "posted_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "sub_total": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "tax_amount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "total_discount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "total_amount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "contact_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineItemWrite"
            },
            "nullable": true
          }
        },
        "required": [
          "platform_id"
        ]
      },
      "ExternalLink": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string"
          },
          "parent_id": {
            "type": "string",
            "nullable": true
          },
          "parent_type": {
            "type": "string",
            "enum": [
              "ACCOUNT",
              "BALANCE_SHEET",
              "BANK_ACCOUNT",
              "BANK_TRANSACTION",
              "BILL",
              "BILL_CREDIT_NOTE",
              "BILL_PAYMENT",
              "CASH_FLOW_STATEMENT",
              "COMPANY_INFO",
              "CONTACT",
              "CURRENCY",
              "DOCUMENT",
              "EXPENSE",
              "GOODS_RECEIPT_NOTE",
              "INCOME_STATEMENT",
              "INVOICE",
              "INVOICE_CREDIT_NOTE",
              "INVOICE_PAYMENT",
              "ITEM",
              "JOURNAL_ENTRY",
              "JOURNAL_LINE",
              "PROJECT",
              "PURCHASE_ORDER",
              "SALES_ORDER",
              "ESTIMATE",
              "TAX_RATE",
              "TRACKING_CATEGORY",
              "CASH_SALE",
              "CASH_REFUND",
              "BALANCE",
              "DISPUTE",
              "ORDER",
              "PAYOUT",
              "SUBSCRIPTION",
              "TRANSACTION",
              "EVENT",
              "FULFILLMENT",
              "INVENTORY",
              "COMPANY",
              "LEAD",
              "OPPORTUNITY",
              "PIPELINE",
              "PIPELINE_STAGE",
              "NOTE",
              "TASK",
              "OWNER",
              "ENGAGEMENT",
              "ADDRESS",
              "EXTERNAL_LINK",
              "LINE_ITEM",
              "PHONE_NUMBER",
              "VARIANT"
            ],
            "nullable": true
          },
          "link": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "enum": [
              "WEBSITE",
              "EMAIL"
            ],
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ]
      },
      "ExternalLinkWrite": {
        "type": "object",
        "properties": {
          "platform_id": {
            "type": "string",
            "example": "string"
          },
          "parent_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "parent_type": {
            "type": "string",
            "enum": [
              "ACCOUNT",
              "BALANCE_SHEET",
              "BANK_ACCOUNT",
              "BANK_TRANSACTION",
              "BILL",
              "BILL_CREDIT_NOTE",
              "BILL_PAYMENT",
              "CASH_FLOW_STATEMENT",
              "COMPANY_INFO",
              "CONTACT",
              "CURRENCY",
              "DOCUMENT",
              "EXPENSE",
              "GOODS_RECEIPT_NOTE",
              "INCOME_STATEMENT",
              "INVOICE",
              "INVOICE_CREDIT_NOTE",
              "INVOICE_PAYMENT",
              "ITEM",
              "JOURNAL_ENTRY",
              "JOURNAL_LINE",
              "PROJECT",
              "PURCHASE_ORDER",
              "SALES_ORDER",
              "ESTIMATE",
              "TAX_RATE",
              "TRACKING_CATEGORY",
              "CASH_SALE",
              "CASH_REFUND",
              "BALANCE",
              "DISPUTE",
              "ORDER",
              "PAYOUT",
              "SUBSCRIPTION",
              "TRANSACTION",
              "EVENT",
              "FULFILLMENT",
              "INVENTORY",
              "COMPANY",
              "LEAD",
              "OPPORTUNITY",
              "PIPELINE",
              "PIPELINE_STAGE",
              "NOTE",
              "TASK",
              "OWNER",
              "ENGAGEMENT",
              "ADDRESS",
              "EXTERNAL_LINK",
              "LINE_ITEM",
              "PHONE_NUMBER",
              "VARIANT"
            ],
            "nullable": true,
            "example": "ACCOUNT"
          },
          "link": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "WEBSITE",
              "EMAIL"
            ],
            "nullable": true,
            "example": "WEBSITE"
          }
        },
        "required": [
          "platform_id"
        ]
      },
      "GetApiLogResponse": {
        "type": "object",
        "properties": {
          "apiLog": {
            "$ref": "#/components/schemas/SerializedApiLogDetail"
          }
        },
        "required": [
          "apiLog"
        ]
      },
      "GetCompanyResponse": {
        "type": "object",
        "properties": {
          "company": {
            "$ref": "#/components/schemas/SerializedCompany"
          }
        },
        "required": [
          "company"
        ]
      },
      "GetIntegrationResponse": {
        "type": "object",
        "properties": {
          "integration": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/SerializedIntegration"
              }
            ]
          }
        },
        "required": [
          "integration"
        ]
      },
      "GetSyncConfigForIntegrationResponse": {
        "type": "object",
        "properties": {
          "syncConfig": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataModelSyncConfig"
            }
          }
        },
        "required": [
          "syncConfig"
        ]
      },
      "GetWebhookConfigResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SerializedWebhookConfig"
          }
        },
        "required": [
          "data"
        ]
      },
      "GetWebhookCredentialResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SerializedWebhookCredential"
          }
        },
        "required": [
          "data"
        ]
      },
      "GetWebhookLogResponse": {
        "type": "object",
        "properties": {
          "webhookLog": {
            "$ref": "#/components/schemas/SerializedWebhookLogDetail"
          }
        },
        "required": [
          "webhookLog"
        ]
      },
      "GetWebhookSetupResponse": {
        "type": "object",
        "properties": {
          "webhook_url": {
            "type": "string"
          },
          "settings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IntegrationPlatformWebhookSetting"
            }
          }
        },
        "required": [
          "webhook_url",
          "settings"
        ]
      },
      "GetWebhookTopicsResponse": {
        "type": "object",
        "properties": {
          "topics": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "topics"
        ]
      },
      "GoodsReceiptNote": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "document_number": {
            "type": "string",
            "nullable": true
          },
          "posted_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "delivery_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true
          },
          "currency_rate": {
            "type": "number",
            "nullable": true
          },
          "sub_total": {
            "type": "number",
            "nullable": true
          },
          "tax_amount": {
            "type": "number",
            "nullable": true
          },
          "total_discount": {
            "type": "number",
            "nullable": true
          },
          "total_amount": {
            "type": "number",
            "nullable": true
          },
          "payment_mode": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "SUBMITTED",
              "PARTIALLY_PAID",
              "PAID",
              "OVERDUE",
              "VOID",
              "UNKNOWN"
            ],
            "nullable": true
          },
          "contact_id": {
            "type": "string",
            "nullable": true
          },
          "purchase_order_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineItem"
            },
            "nullable": true
          },
          "contact": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Contact"
            },
            "nullable": true
          },
          "currency": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Currency"
            },
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id",
          "purchase_order_ids"
        ],
        "description": "The Goods Receipt Notes data model."
      },
      "IncomeStatement": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier assigned by Commenda for this income statement"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was last updated in Commenda's system (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Unique identifier for this income statement in the source accounting platform"
          },
          "revenue": {
            "description": "The line items for revenue of the income statement report",
            "nullable": true
          },
          "cost_of_goods_sold": {
            "description": "The line items for cost of goods sold of the income statement report",
            "nullable": true
          },
          "gross_profit": {
            "type": "number",
            "nullable": true,
            "description": "The gross profit of the income statement report"
          },
          "operating_expenses": {
            "description": "The line items for operating expenses of the income statement report",
            "nullable": true
          },
          "operating_profit": {
            "type": "number",
            "nullable": true,
            "description": "The operating profit of the income statement report"
          },
          "non_operating_revenue": {
            "description": "The line items for non-operating revenue of the income statement report",
            "nullable": true
          },
          "non_operating_expenses": {
            "description": "The line items for non-operating expenses of the income statement report",
            "nullable": true
          },
          "earnings_before_taxes": {
            "type": "number",
            "nullable": true
          },
          "taxes": {
            "description": "Arbitrary JSON (object or array; shape varies by data model).",
            "nullable": true
          },
          "net_profit": {
            "type": "number",
            "nullable": true,
            "description": "The net profit of the income statement report"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true
          },
          "period_start": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The start date of the income statement report period"
          },
          "period_end": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The end date of the income statement report period"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The date and time the income statement was last updated"
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ],
        "description": "An Income Statement is a financial report that shows a business's revenue, expenses, and net income or loss over a specific period of time. In an accounting platform, an income statement is typically generated automatically based on the financial transactions that have been recorded in the system."
      },
      "InitSyncBodyDTO": {
        "type": "object",
        "properties": {
          "dataModelsToSync": {
            "description": "Limit the sync to specific data models. Omit to sync all configured models.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataModelSyncConfig"
            }
          },
          "fullSync": {
            "type": "boolean",
            "example": false
          },
          "isManualSync": {
            "type": "boolean",
            "example": true
          },
          "notifyAllSyncedRecords": {
            "type": "boolean",
            "example": false,
            "description": "Fire update webhooks for records that were fetched but unchanged."
          }
        }
      },
      "InitSyncResponse": {
        "type": "object",
        "properties": {
          "sync": {
            "$ref": "#/components/schemas/InitSyncResult"
          }
        },
        "required": [
          "sync"
        ]
      },
      "InitSyncResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "dataModelsSyncing": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "ACCOUNT",
                "BALANCE_SHEET",
                "BANK_ACCOUNT",
                "BANK_TRANSACTION",
                "BILL",
                "BILL_CREDIT_NOTE",
                "BILL_PAYMENT",
                "CASH_FLOW_STATEMENT",
                "COMPANY_INFO",
                "CONTACT",
                "CURRENCY",
                "DOCUMENT",
                "EXPENSE",
                "GOODS_RECEIPT_NOTE",
                "INCOME_STATEMENT",
                "INVOICE",
                "INVOICE_CREDIT_NOTE",
                "INVOICE_PAYMENT",
                "ITEM",
                "JOURNAL_ENTRY",
                "JOURNAL_LINE",
                "PROJECT",
                "PURCHASE_ORDER",
                "SALES_ORDER",
                "ESTIMATE",
                "TAX_RATE",
                "TRACKING_CATEGORY",
                "CASH_SALE",
                "CASH_REFUND",
                "BALANCE",
                "DISPUTE",
                "ORDER",
                "PAYOUT",
                "SUBSCRIPTION",
                "TRANSACTION",
                "EVENT",
                "FULFILLMENT",
                "INVENTORY",
                "COMPANY",
                "LEAD",
                "OPPORTUNITY",
                "PIPELINE",
                "PIPELINE_STAGE",
                "NOTE",
                "TASK",
                "OWNER",
                "ENGAGEMENT",
                "ADDRESS",
                "EXTERNAL_LINK",
                "LINE_ITEM",
                "PHONE_NUMBER",
                "VARIANT"
              ]
            }
          }
        },
        "required": [
          "id",
          "dataModelsSyncing"
        ]
      },
      "IntegrationBucket": {
        "type": "object",
        "properties": {
          "integration": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "count": {
            "type": "number"
          }
        },
        "required": [
          "integration",
          "count"
        ]
      },
      "IntegrationPlatformWebhookSetting": {
        "type": "object",
        "properties": {
          "binding": {
            "type": "string",
            "enum": [
              "query",
              "header"
            ]
          },
          "name": {
            "type": "string"
          },
          "purpose": {
            "type": "string",
            "enum": [
              "INTEGRATION_ENTITY_ID",
              "VERIFICATION_TOKEN"
            ]
          }
        },
        "required": [
          "binding",
          "name",
          "purpose"
        ]
      },
      "Inventory": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier for this inventory record"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Platform-specific inventory identifier"
          },
          "item_id": {
            "type": "string",
            "nullable": true,
            "description": "Reference to the related item"
          },
          "variant_id": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "sku": {
            "type": "string",
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "nullable": true,
            "description": "Total quantity on hand"
          },
          "reserved_quantity": {
            "type": "integer",
            "nullable": true,
            "description": "Quantity allocated to pending orders"
          },
          "available_quantity": {
            "type": "integer",
            "nullable": true,
            "description": "Quantity available for new orders"
          },
          "status": {
            "type": "string",
            "enum": [
              "IN_STOCK",
              "OUT_OF_STOCK",
              "LOW_STOCK",
              "DISCONTINUED",
              "UNKNOWN"
            ],
            "nullable": true,
            "description": "`IN_STOCK`, `LOW_STOCK`, `OUT_OF_STOCK`, `DISCONTINUED`"
          },
          "is_trackable": {
            "type": "boolean",
            "nullable": true
          },
          "reorder_level": {
            "type": "integer",
            "nullable": true
          },
          "reorder_quantity": {
            "type": "integer",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Last update timestamp (ISO 8601)"
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ],
        "description": "Inventory tracks stock levels and availability for catalog items across e-commerce platforms."
      },
      "InviteLinkDetailResponse": {
        "type": "object",
        "properties": {
          "inviteLink": {
            "$ref": "#/components/schemas/SerializedInviteLinkDetail"
          }
        },
        "required": [
          "inviteLink"
        ]
      },
      "InviteMemberDTO": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "example": "jane@example.com"
          },
          "name": {
            "type": "string",
            "maxLength": 200,
            "example": "Jane Doe"
          }
        },
        "required": [
          "email",
          "name"
        ]
      },
      "InviteMemberResponse": {
        "type": "object",
        "properties": {
          "member": {
            "$ref": "#/components/schemas/InvitedMember"
          }
        },
        "required": [
          "member"
        ]
      },
      "InvitedMember": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          }
        },
        "required": [
          "id"
        ]
      },
      "Invoice": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier assigned by Commenda for this invoice"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was last updated in Commenda's system (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Unique identifier for this invoice in the source accounting platform"
          },
          "contact_id": {
            "type": "string",
            "nullable": true,
            "description": "The contact ID of the invoice"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "description": "ISO 4217 currency code"
          },
          "currency_rate": {
            "type": "number",
            "nullable": true,
            "description": "The currency rate of the invoice"
          },
          "document_number": {
            "type": "string",
            "nullable": true,
            "description": "The document number of the invoice"
          },
          "posted_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The posted date of the invoice"
          },
          "due_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The due date of the invoice"
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "SUBMITTED",
              "PARTIALLY_PAID",
              "PAID",
              "OVERDUE",
              "VOID",
              "UNKNOWN"
            ],
            "nullable": true,
            "description": "The status of the invoice"
          },
          "sub_total": {
            "type": "number",
            "nullable": true,
            "description": "The sub total of the invoice"
          },
          "tax_amount": {
            "type": "number",
            "nullable": true,
            "description": "The tax amount of the invoice"
          },
          "total_discount": {
            "type": "number",
            "nullable": true,
            "description": "The total discount of the invoice"
          },
          "shipping_amount": {
            "type": "number",
            "nullable": true
          },
          "total_amount": {
            "type": "number",
            "nullable": true,
            "description": "The total amount of the invoice"
          },
          "amount_paid": {
            "type": "number",
            "nullable": true
          },
          "amount_refunded": {
            "type": "number",
            "nullable": true
          },
          "amount_credited": {
            "type": "number",
            "nullable": true
          },
          "amount_due": {
            "type": "number",
            "nullable": true,
            "description": "The amount due of the invoice"
          },
          "memo": {
            "type": "string",
            "nullable": true,
            "description": "The memo or notes of the invoice"
          },
          "subscription_id": {
            "type": "string",
            "nullable": true
          },
          "payment_link": {
            "type": "string",
            "nullable": true
          },
          "payment_link_expires_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "transaction_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "order_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sales_order_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The sales order IDs associated with the invoice"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The date and time the invoice was last updated"
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineItem"
            },
            "nullable": true
          },
          "addresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Address"
            },
            "nullable": true
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Document"
            },
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id",
          "transaction_ids",
          "order_ids",
          "sales_order_ids"
        ],
        "description": "An itemized record of goods sold or services provided to a customer."
      },
      "InvoiceCreditNote": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier assigned by Commenda for this invoice credit note"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was last updated in Commenda's system (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Unique identifier for this invoice credit note in the source accounting platform"
          },
          "contact_id": {
            "type": "string",
            "nullable": true,
            "description": "The contact ID of the invoice credit note"
          },
          "document_number": {
            "type": "string",
            "nullable": true,
            "description": "The document number of the invoice credit note"
          },
          "total_amount": {
            "type": "number",
            "nullable": true,
            "description": "The total amount of the invoice credit note"
          },
          "total_discount": {
            "type": "number",
            "nullable": true
          },
          "remaining_credit": {
            "type": "number",
            "nullable": true,
            "description": "The remaining credit amount of the invoice credit note"
          },
          "shipping_amount": {
            "type": "number",
            "nullable": true
          },
          "posted_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The posted date of the invoice credit note"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "description": "ISO 4217 currency code"
          },
          "memo": {
            "type": "string",
            "nullable": true,
            "description": "The memo or notes of the invoice credit note"
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "SUBMITTED",
              "PARTIALLY_PAID",
              "PAID",
              "OVERDUE",
              "VOID",
              "UNKNOWN"
            ],
            "nullable": true,
            "description": "The status of the invoice credit note"
          },
          "invoice_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The invoice IDs associated with the invoice credit note"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The date and time the invoice credit note was last updated"
          },
          "contact": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Contact"
            },
            "nullable": true
          },
          "currency": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Currency"
            },
            "nullable": true
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineItem"
            },
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id",
          "invoice_ids"
        ],
        "description": "An Invoice Credit Note is a financial transaction representing a reduction that can be applied against one or multiple invoices issued to Customers."
      },
      "InvoiceCreditNoteWrite": {
        "type": "object",
        "properties": {
          "platform_id": {
            "type": "string",
            "example": "string"
          },
          "contact_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "document_number": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "total_amount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "total_discount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "remaining_credit": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "shipping_amount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "posted_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "example": "AED"
          },
          "memo": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "SUBMITTED",
              "PARTIALLY_PAID",
              "PAID",
              "OVERDUE",
              "VOID",
              "UNKNOWN"
            ],
            "nullable": true,
            "example": "DRAFT"
          },
          "invoice_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "string"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "contact": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactWrite"
            },
            "nullable": true
          },
          "currency": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CurrencyWrite"
            },
            "nullable": true
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineItemWrite"
            },
            "nullable": true
          }
        },
        "required": [
          "platform_id",
          "invoice_ids"
        ]
      },
      "InvoicePayment": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier assigned by Commenda for this invoice payment"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was last updated in Commenda's system (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Unique identifier for this invoice payment in the source accounting platform"
          },
          "payment_id": {
            "type": "string",
            "nullable": true
          },
          "invoice_id": {
            "type": "string",
            "nullable": true,
            "description": "The invoice ID of the invoice payment"
          },
          "account_id": {
            "type": "string",
            "nullable": true,
            "description": "The account ID of the invoice payment"
          },
          "credit_note_id": {
            "type": "string",
            "nullable": true,
            "description": "The credit note ID associated with the invoice payment (if paying via credit note)"
          },
          "amount": {
            "type": "number",
            "nullable": true,
            "description": "The total amount of the invoice payment"
          },
          "payment_mode": {
            "type": "string",
            "nullable": true,
            "description": "The payment mode of the invoice payment"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "description": "ISO 4217 currency code"
          },
          "currency_rate": {
            "type": "number",
            "nullable": true,
            "description": "The currency rate of the invoice payment"
          },
          "document_number": {
            "type": "string",
            "nullable": true,
            "description": "The document number of the invoice payment"
          },
          "memo": {
            "type": "string",
            "nullable": true,
            "description": "The memo or notes of the invoice payment"
          },
          "payment_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The payment date of the invoice payment"
          },
          "contact_id": {
            "type": "string",
            "nullable": true,
            "description": "The contact ID of the invoice payment"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The date and time the invoice payment was last updated"
          },
          "invoice": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Invoice"
            },
            "nullable": true
          },
          "contact": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Contact"
            },
            "nullable": true
          },
          "currency": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Currency"
            },
            "nullable": true
          },
          "account": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Account"
            },
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ],
        "description": "The payments recorded against Invoices."
      },
      "InvoicePaymentWrite": {
        "type": "object",
        "properties": {
          "platform_id": {
            "type": "string",
            "example": "string"
          },
          "payment_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "invoice_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "account_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "credit_note_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "amount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "payment_mode": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "example": "AED"
          },
          "currency_rate": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "document_number": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "memo": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "payment_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "contact_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "invoice": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceWrite"
            },
            "nullable": true
          },
          "contact": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactWrite"
            },
            "nullable": true
          },
          "currency": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CurrencyWrite"
            },
            "nullable": true
          },
          "account": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountWrite"
            },
            "nullable": true
          }
        },
        "required": [
          "platform_id"
        ]
      },
      "InvoiceWrite": {
        "type": "object",
        "properties": {
          "platform_id": {
            "type": "string",
            "example": "string"
          },
          "contact_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "example": "AED"
          },
          "currency_rate": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "document_number": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "posted_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "due_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "SUBMITTED",
              "PARTIALLY_PAID",
              "PAID",
              "OVERDUE",
              "VOID",
              "UNKNOWN"
            ],
            "nullable": true,
            "example": "DRAFT"
          },
          "sub_total": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "tax_amount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "total_discount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "shipping_amount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "total_amount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "amount_paid": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "amount_refunded": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "amount_credited": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "amount_due": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "memo": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "subscription_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "payment_link": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "payment_link_expires_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "transaction_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "string"
            ]
          },
          "order_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "string"
            ]
          },
          "sales_order_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "string"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineItemWrite"
            },
            "nullable": true
          },
          "addresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AddressWrite"
            },
            "nullable": true
          }
        },
        "required": [
          "platform_id",
          "transaction_ids",
          "order_ids",
          "sales_order_ids"
        ]
      },
      "Item": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier assigned by Commenda for this item"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was last updated in Commenda's system (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Unique identifier for this item in the source accounting platform"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "The name of the item"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "The description of the item"
          },
          "code": {
            "type": "string",
            "nullable": true,
            "description": "The reference code of the item"
          },
          "sku": {
            "type": "string",
            "nullable": true
          },
          "price": {
            "type": "number",
            "nullable": true
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true
          },
          "type": {
            "type": "string",
            "enum": [
              "INVENTORY",
              "NON_INVENTORY",
              "SERVICE",
              "DIGITAL",
              "UNKNOWN"
            ],
            "nullable": true,
            "description": "The type of the item"
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "ACTIVE",
              "ARCHIVED",
              "UNKNOWN"
            ],
            "nullable": true,
            "description": "The status of the item"
          },
          "quantity_on_hand": {
            "type": "integer",
            "nullable": true,
            "description": "The quantity on hand for the item"
          },
          "is_bill_item": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether there are details (bill_item) of this item getting purchased"
          },
          "bill_item": {
            "description": "Item details of this item getting purchased",
            "nullable": true
          },
          "is_invoice_item": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether there are details (invoice_item) of this item getting sold"
          },
          "invoice_item": {
            "description": "Item details of this item getting sold",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The date and time the item was last updated"
          },
          "variants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Variant"
            },
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ],
        "description": "The Items Data Model is designed to simplify the management and retrieval of item-related information across various accounting platforms."
      },
      "ItemWrite": {
        "type": "object",
        "properties": {
          "platform_id": {
            "type": "string",
            "example": "string"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "code": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "sku": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "price": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "example": "AED"
          },
          "type": {
            "type": "string",
            "enum": [
              "INVENTORY",
              "NON_INVENTORY",
              "SERVICE",
              "DIGITAL",
              "UNKNOWN"
            ],
            "nullable": true,
            "example": "INVENTORY"
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "ACTIVE",
              "ARCHIVED",
              "UNKNOWN"
            ],
            "nullable": true,
            "example": "DRAFT"
          },
          "quantity_on_hand": {
            "type": "integer",
            "nullable": true,
            "example": 0
          },
          "is_bill_item": {
            "type": "boolean",
            "nullable": true,
            "example": false
          },
          "bill_item": {
            "description": "Arbitrary JSON (object or array; shape varies by data model).",
            "nullable": true,
            "example": {}
          },
          "is_invoice_item": {
            "type": "boolean",
            "nullable": true,
            "example": false
          },
          "invoice_item": {
            "description": "Arbitrary JSON (object or array; shape varies by data model).",
            "nullable": true,
            "example": {}
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "variants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VariantWrite"
            },
            "nullable": true
          }
        },
        "required": [
          "platform_id"
        ]
      },
      "JournalEntry": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier assigned by Commenda for this journal entry"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was last updated in Commenda's system (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Unique identifier for this journal entry in the source accounting platform"
          },
          "account_id": {
            "type": "string",
            "nullable": true,
            "description": "The account ID of the journal entry"
          },
          "amount": {
            "type": "number",
            "nullable": true,
            "description": "The total amount of the journal entry"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "description": "ISO 4217 currency code"
          },
          "currency_rate": {
            "type": "number",
            "nullable": true,
            "description": "The currency rate of the journal entry"
          },
          "journal_entry_type": {
            "type": "string",
            "nullable": true,
            "description": "The type of the journal entry"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "The description of the journal entry"
          },
          "posted_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The posted date of the journal entry"
          },
          "document_number": {
            "type": "string",
            "nullable": true,
            "description": "The document number of the journal entry"
          },
          "business_unit_id": {
            "type": "string",
            "nullable": true,
            "description": "The business unit ID of the journal entry"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The date and time the journal entry was last updated"
          },
          "journal_lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JournalLine"
            },
            "nullable": true
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Document"
            },
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ],
        "description": "A Journal is a running record of a company's financial transactions used to record the debits and credits of each transaction."
      },
      "JournalEntryWrite": {
        "type": "object",
        "properties": {
          "platform_id": {
            "type": "string",
            "example": "string"
          },
          "account_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "amount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "example": "AED"
          },
          "currency_rate": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "journal_entry_type": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "posted_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "document_number": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "business_unit_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "journal_lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JournalLineWrite"
            },
            "nullable": true
          }
        },
        "required": [
          "platform_id"
        ]
      },
      "JournalLine": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string"
          },
          "parent_id": {
            "type": "string",
            "nullable": true
          },
          "parent_type": {
            "type": "string",
            "enum": [
              "ACCOUNT",
              "BALANCE_SHEET",
              "BANK_ACCOUNT",
              "BANK_TRANSACTION",
              "BILL",
              "BILL_CREDIT_NOTE",
              "BILL_PAYMENT",
              "CASH_FLOW_STATEMENT",
              "COMPANY_INFO",
              "CONTACT",
              "CURRENCY",
              "DOCUMENT",
              "EXPENSE",
              "GOODS_RECEIPT_NOTE",
              "INCOME_STATEMENT",
              "INVOICE",
              "INVOICE_CREDIT_NOTE",
              "INVOICE_PAYMENT",
              "ITEM",
              "JOURNAL_ENTRY",
              "JOURNAL_LINE",
              "PROJECT",
              "PURCHASE_ORDER",
              "SALES_ORDER",
              "ESTIMATE",
              "TAX_RATE",
              "TRACKING_CATEGORY",
              "CASH_SALE",
              "CASH_REFUND",
              "BALANCE",
              "DISPUTE",
              "ORDER",
              "PAYOUT",
              "SUBSCRIPTION",
              "TRANSACTION",
              "EVENT",
              "FULFILLMENT",
              "INVENTORY",
              "COMPANY",
              "LEAD",
              "OPPORTUNITY",
              "PIPELINE",
              "PIPELINE_STAGE",
              "NOTE",
              "TASK",
              "OWNER",
              "ENGAGEMENT",
              "ADDRESS",
              "EXTERNAL_LINK",
              "LINE_ITEM",
              "PHONE_NUMBER",
              "VARIANT"
            ],
            "nullable": true
          },
          "account_id": {
            "type": "string",
            "nullable": true
          },
          "contact_id": {
            "type": "string",
            "nullable": true
          },
          "tax_id": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "enum": [
              "CREDIT",
              "DEBIT"
            ],
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "net_amount": {
            "type": "number",
            "nullable": true
          },
          "tax_amount": {
            "type": "number",
            "nullable": true
          },
          "tracking_category_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id",
          "tracking_category_ids"
        ]
      },
      "JournalLineWrite": {
        "type": "object",
        "properties": {
          "platform_id": {
            "type": "string",
            "example": "string"
          },
          "parent_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "parent_type": {
            "type": "string",
            "enum": [
              "ACCOUNT",
              "BALANCE_SHEET",
              "BANK_ACCOUNT",
              "BANK_TRANSACTION",
              "BILL",
              "BILL_CREDIT_NOTE",
              "BILL_PAYMENT",
              "CASH_FLOW_STATEMENT",
              "COMPANY_INFO",
              "CONTACT",
              "CURRENCY",
              "DOCUMENT",
              "EXPENSE",
              "GOODS_RECEIPT_NOTE",
              "INCOME_STATEMENT",
              "INVOICE",
              "INVOICE_CREDIT_NOTE",
              "INVOICE_PAYMENT",
              "ITEM",
              "JOURNAL_ENTRY",
              "JOURNAL_LINE",
              "PROJECT",
              "PURCHASE_ORDER",
              "SALES_ORDER",
              "ESTIMATE",
              "TAX_RATE",
              "TRACKING_CATEGORY",
              "CASH_SALE",
              "CASH_REFUND",
              "BALANCE",
              "DISPUTE",
              "ORDER",
              "PAYOUT",
              "SUBSCRIPTION",
              "TRANSACTION",
              "EVENT",
              "FULFILLMENT",
              "INVENTORY",
              "COMPANY",
              "LEAD",
              "OPPORTUNITY",
              "PIPELINE",
              "PIPELINE_STAGE",
              "NOTE",
              "TASK",
              "OWNER",
              "ENGAGEMENT",
              "ADDRESS",
              "EXTERNAL_LINK",
              "LINE_ITEM",
              "PHONE_NUMBER",
              "VARIANT"
            ],
            "nullable": true,
            "example": "ACCOUNT"
          },
          "account_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "contact_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "tax_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "CREDIT",
              "DEBIT"
            ],
            "nullable": true,
            "example": "CREDIT"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "net_amount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "tax_amount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "tracking_category_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "string"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          }
        },
        "required": [
          "platform_id",
          "tracking_category_ids"
        ]
      },
      "Lead": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "first_name": {
            "type": "string",
            "nullable": true
          },
          "last_name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "company_name": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "lead_source": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "OPEN",
              "CLOSED",
              "QUALIFIED",
              "UNQUALIFIED"
            ],
            "nullable": true
          },
          "is_converted": {
            "type": "boolean",
            "nullable": true
          },
          "converted_contact_id": {
            "type": "string",
            "nullable": true
          },
          "converted_account_id": {
            "type": "string",
            "nullable": true
          },
          "converted_opportunity_id": {
            "type": "string",
            "nullable": true
          },
          "converted_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "owner_id": {
            "type": "string",
            "nullable": true
          },
          "amount": {
            "type": "number",
            "nullable": true
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ],
        "description": "The Leads data model."
      },
      "LineItem": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string"
          },
          "parent_id": {
            "type": "string",
            "nullable": true
          },
          "parent_type": {
            "type": "string",
            "enum": [
              "BILL",
              "INVOICE",
              "BILL_CREDIT_NOTE",
              "INVOICE_CREDIT_NOTE",
              "GOODS_RECEIPT_NOTE",
              "EXPENSE",
              "PURCHASE_ORDER",
              "SALES_ORDER",
              "CASH_REFUND",
              "CASH_SALE",
              "JOURNAL_ENTRY",
              "ORDER",
              "SUBSCRIPTION",
              "ESTIMATE"
            ],
            "nullable": true
          },
          "item_id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "quantity": {
            "type": "number",
            "nullable": true
          },
          "unit_amount": {
            "type": "number",
            "nullable": true
          },
          "tax_amount": {
            "type": "number",
            "nullable": true
          },
          "discount_amount": {
            "type": "number",
            "nullable": true
          },
          "sub_total": {
            "type": "number",
            "nullable": true
          },
          "total_amount": {
            "type": "number",
            "nullable": true
          },
          "tax_id": {
            "type": "string",
            "nullable": true
          },
          "account_id": {
            "type": "string",
            "nullable": true
          },
          "variant_id": {
            "type": "string",
            "nullable": true
          },
          "tracking_category_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "item": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Item"
            },
            "nullable": true
          },
          "tax": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaxRate"
            },
            "nullable": true
          },
          "account": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Account"
            },
            "nullable": true
          },
          "variant": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Variant"
            },
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id",
          "tracking_category_ids"
        ],
        "description": "Line items across invoices, bills, orders, and other parent records."
      },
      "LineItemWrite": {
        "type": "object",
        "properties": {
          "platform_id": {
            "type": "string",
            "example": "string"
          },
          "parent_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "parent_type": {
            "type": "string",
            "enum": [
              "BILL",
              "INVOICE",
              "BILL_CREDIT_NOTE",
              "INVOICE_CREDIT_NOTE",
              "GOODS_RECEIPT_NOTE",
              "EXPENSE",
              "PURCHASE_ORDER",
              "SALES_ORDER",
              "CASH_REFUND",
              "CASH_SALE",
              "JOURNAL_ENTRY",
              "ORDER",
              "SUBSCRIPTION",
              "ESTIMATE"
            ],
            "nullable": true,
            "example": "BILL"
          },
          "item_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "quantity": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "unit_amount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "tax_amount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "discount_amount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "sub_total": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "total_amount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "tax_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "account_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "variant_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "tracking_category_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "string"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          }
        },
        "required": [
          "platform_id",
          "tracking_category_ids"
        ]
      },
      "ListApiLogsResponse": {
        "type": "object",
        "properties": {
          "apiLogs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SerializedApiLog"
            }
          },
          "count": {
            "type": "number"
          },
          "next": {
            "type": "object"
          }
        },
        "required": [
          "apiLogs",
          "count"
        ]
      },
      "ListCompaniesResponse": {
        "type": "object",
        "properties": {
          "companies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SerializedCompany"
            }
          },
          "count": {
            "type": "number"
          },
          "next": {
            "type": "number",
            "nullable": true
          }
        },
        "required": [
          "companies",
          "count",
          "next"
        ]
      },
      "ListDisconnectRequestsResponse": {
        "type": "object",
        "properties": {
          "disconnect_requests": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DisconnectRequestResponse"
            }
          }
        },
        "required": [
          "disconnect_requests"
        ]
      },
      "ListIntegrationsResponse": {
        "type": "object",
        "properties": {
          "integrations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SerializedIntegration"
            }
          },
          "count": {
            "type": "number"
          }
        },
        "required": [
          "integrations",
          "count"
        ]
      },
      "ListInviteLinksResponse": {
        "type": "object",
        "properties": {
          "inviteLinks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SerializedInviteLink"
            }
          },
          "count": {
            "type": "number"
          },
          "next": {
            "type": "number",
            "nullable": true
          }
        },
        "required": [
          "inviteLinks",
          "count",
          "next"
        ]
      },
      "ListJobsResponse": {
        "type": "object",
        "properties": {
          "jobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SerializedJob"
            }
          },
          "count": {
            "type": "number"
          },
          "next": {
            "type": "object",
            "nullable": true
          }
        },
        "required": [
          "jobs",
          "count"
        ]
      },
      "ListMembersResponse": {
        "type": "object",
        "properties": {
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SerializedMember"
            }
          },
          "count": {
            "type": "number"
          }
        },
        "required": [
          "members",
          "count"
        ]
      },
      "ListSyncsResponse": {
        "type": "object",
        "properties": {
          "syncs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SerializedSync"
            }
          },
          "count": {
            "type": "number"
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "syncs",
          "count",
          "next"
        ]
      },
      "ListWebhookConfigsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SerializedWebhookConfig"
            }
          }
        },
        "required": [
          "data"
        ]
      },
      "ListWebhookCredentialsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SerializedWebhookCredential"
            }
          }
        },
        "required": [
          "data"
        ]
      },
      "ListWebhookLogsResponse": {
        "type": "object",
        "properties": {
          "webhookLogs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SerializedWebhookLog"
            }
          },
          "count": {
            "type": "number"
          },
          "next": {
            "type": "object"
          }
        },
        "required": [
          "webhookLogs",
          "count"
        ]
      },
      "Note": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string"
          },
          "content": {
            "type": "string",
            "nullable": true
          },
          "owner_id": {
            "type": "string",
            "nullable": true
          },
          "account_id": {
            "type": "string",
            "nullable": true
          },
          "contact_id": {
            "type": "string",
            "nullable": true
          },
          "opportunity_id": {
            "type": "string",
            "nullable": true
          },
          "lead_id": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ],
        "description": "The Notes data model."
      },
      "Opportunity": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "account_id": {
            "type": "string",
            "nullable": true
          },
          "contact_id": {
            "type": "string",
            "nullable": true
          },
          "pipeline_id": {
            "type": "string",
            "nullable": true
          },
          "pipeline_stage_id": {
            "type": "string",
            "nullable": true
          },
          "owner_id": {
            "type": "string",
            "nullable": true
          },
          "amount": {
            "type": "number",
            "nullable": true
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "OPEN",
              "WON",
              "LOST"
            ],
            "nullable": true
          },
          "probability": {
            "type": "number",
            "nullable": true
          },
          "close_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "last_activity_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ],
        "description": "The Opportunities data model."
      },
      "Order": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier for this order"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When this order was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When this order was last updated (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Platform-specific order identifier"
          },
          "order_number": {
            "type": "string",
            "nullable": true
          },
          "contact_id": {
            "type": "string",
            "nullable": true,
            "description": "Reference to the Contact"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "description": "ISO 4217 currency code"
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "PROCESSING",
              "COMPLETED",
              "CANCELED",
              "ON_HOLD",
              "UNKNOWN"
            ],
            "nullable": true,
            "description": "Current order status"
          },
          "payment_status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "PENDING",
              "PAID",
              "PARTIALLY_PAID",
              "FAILED",
              "REFUNDED",
              "PARTIALLY_REFUNDED",
              "VOIDED",
              "UNKNOWN"
            ],
            "nullable": true,
            "description": "Payment state of the order"
          },
          "fulfillment_status": {
            "type": "string",
            "enum": [
              "UNFULFILLED",
              "PARTIALLY_FULFILLED",
              "FULFILLED",
              "RETURNED",
              "UNKNOWN"
            ],
            "nullable": true
          },
          "total_amount": {
            "type": "number",
            "nullable": true,
            "description": "Total order amount"
          },
          "total_discount": {
            "type": "number",
            "nullable": true,
            "description": "Total discount amount"
          },
          "total_tax": {
            "type": "number",
            "nullable": true,
            "description": "Total tax amount"
          },
          "shipping_amount": {
            "type": "number",
            "nullable": true
          },
          "invoice_id": {
            "type": "string",
            "nullable": true,
            "description": "Reference to the primary Invoice"
          },
          "invoice_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "References to all related invoices"
          },
          "transaction_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true,
            "description": "Platform ids of the related transactions."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Original creation timestamp from platform (ISO 8601)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Last update timestamp from platform (ISO 8601)"
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineItem"
            },
            "nullable": true
          },
          "line_item_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true,
            "description": "Platform ids of the related line_items."
          },
          "transactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Transaction"
            },
            "nullable": true
          },
          "addresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Address"
            },
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id",
          "invoice_ids",
          "transaction_ids"
        ],
        "description": "The Order object represents a purchase order, typically linked to an invoice, tracking commercial transaction details with embedded transactions."
      },
      "Owner": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "first_name": {
            "type": "string",
            "nullable": true
          },
          "last_name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "is_active": {
            "type": "boolean",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ],
        "description": "The Owners data model."
      },
      "PassthroughDataDTO": {
        "type": "object",
        "properties": {
          "config_id": {
            "type": "string",
            "example": "config_123"
          },
          "method": {
            "enum": [
              "GET",
              "POST",
              "PUT",
              "PATCH",
              "DELETE"
            ],
            "type": "string",
            "example": "GET"
          },
          "path": {
            "type": "string",
            "description": "Path on the connected platform's own API — the passthrough forwards the request there (this example targets QuickBooks).",
            "example": "/v3/company/{realmId}/invoice"
          },
          "params": {
            "type": "object",
            "additionalProperties": true,
            "example": {
              "page": 1
            }
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "example": {
              "Content-Type": "application/json"
            }
          },
          "data": {
            "type": "object",
            "example": {}
          },
          "response_type": {
            "type": "string",
            "example": "json"
          }
        }
      },
      "PassthroughRequestDTO": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "number",
            "example": 1234
          },
          "data": {
            "$ref": "#/components/schemas/PassthroughDataDTO"
          }
        },
        "required": [
          "company_id",
          "data"
        ]
      },
      "Payout": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier for this payout"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When this payout was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When this payout was last updated (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Platform-specific payout identifier"
          },
          "gateway_account_id": {
            "type": "string",
            "nullable": true,
            "description": "Payment gateway account identifier"
          },
          "amount": {
            "type": "number",
            "nullable": true,
            "description": "Payout amount"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "description": "ISO 4217 currency code"
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "IN_TRANSIT",
              "PAID",
              "CANCELED",
              "FAILED",
              "UNKNOWN"
            ],
            "nullable": true,
            "description": "Current payout status"
          },
          "schedule": {
            "type": "string",
            "enum": [
              "MANUAL",
              "AUTOMATIC",
              "UNKNOWN"
            ],
            "nullable": true,
            "description": "Payout schedule type"
          },
          "type": {
            "type": "string",
            "enum": [
              "BANK_ACCOUNT",
              "CARD",
              "FPX",
              "UNKNOWN"
            ],
            "nullable": true,
            "description": "Destination account type"
          },
          "method": {
            "type": "string",
            "nullable": true,
            "description": "Payout method details"
          },
          "arrival_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Date funds will arrive in merchant account (ISO 8601)"
          },
          "gateway": {
            "type": "string",
            "nullable": true,
            "description": "Payment gateway name"
          },
          "destination": {
            "description": "Bank account details",
            "nullable": true
          },
          "transaction_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Transactions included in this payout"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Original creation timestamp (ISO 8601)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Last update timestamp (ISO 8601)"
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id",
          "transaction_ids"
        ],
        "description": "The Payout object represents a transfer of funds from the payment platform to the merchant's bank account."
      },
      "PhoneNumber": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string"
          },
          "parent_id": {
            "type": "string",
            "nullable": true
          },
          "parent_type": {
            "type": "string",
            "enum": [
              "ACCOUNT",
              "BALANCE_SHEET",
              "BANK_ACCOUNT",
              "BANK_TRANSACTION",
              "BILL",
              "BILL_CREDIT_NOTE",
              "BILL_PAYMENT",
              "CASH_FLOW_STATEMENT",
              "COMPANY_INFO",
              "CONTACT",
              "CURRENCY",
              "DOCUMENT",
              "EXPENSE",
              "GOODS_RECEIPT_NOTE",
              "INCOME_STATEMENT",
              "INVOICE",
              "INVOICE_CREDIT_NOTE",
              "INVOICE_PAYMENT",
              "ITEM",
              "JOURNAL_ENTRY",
              "JOURNAL_LINE",
              "PROJECT",
              "PURCHASE_ORDER",
              "SALES_ORDER",
              "ESTIMATE",
              "TAX_RATE",
              "TRACKING_CATEGORY",
              "CASH_SALE",
              "CASH_REFUND",
              "BALANCE",
              "DISPUTE",
              "ORDER",
              "PAYOUT",
              "SUBSCRIPTION",
              "TRANSACTION",
              "EVENT",
              "FULFILLMENT",
              "INVENTORY",
              "COMPANY",
              "LEAD",
              "OPPORTUNITY",
              "PIPELINE",
              "PIPELINE_STAGE",
              "NOTE",
              "TASK",
              "OWNER",
              "ENGAGEMENT",
              "ADDRESS",
              "EXTERNAL_LINK",
              "LINE_ITEM",
              "PHONE_NUMBER",
              "VARIANT"
            ],
            "nullable": true
          },
          "number": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "enum": [
              "MOBILE",
              "TELEPHONE",
              "FAX"
            ],
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ]
      },
      "PhoneNumberWrite": {
        "type": "object",
        "properties": {
          "platform_id": {
            "type": "string",
            "example": "string"
          },
          "parent_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "parent_type": {
            "type": "string",
            "enum": [
              "ACCOUNT",
              "BALANCE_SHEET",
              "BANK_ACCOUNT",
              "BANK_TRANSACTION",
              "BILL",
              "BILL_CREDIT_NOTE",
              "BILL_PAYMENT",
              "CASH_FLOW_STATEMENT",
              "COMPANY_INFO",
              "CONTACT",
              "CURRENCY",
              "DOCUMENT",
              "EXPENSE",
              "GOODS_RECEIPT_NOTE",
              "INCOME_STATEMENT",
              "INVOICE",
              "INVOICE_CREDIT_NOTE",
              "INVOICE_PAYMENT",
              "ITEM",
              "JOURNAL_ENTRY",
              "JOURNAL_LINE",
              "PROJECT",
              "PURCHASE_ORDER",
              "SALES_ORDER",
              "ESTIMATE",
              "TAX_RATE",
              "TRACKING_CATEGORY",
              "CASH_SALE",
              "CASH_REFUND",
              "BALANCE",
              "DISPUTE",
              "ORDER",
              "PAYOUT",
              "SUBSCRIPTION",
              "TRANSACTION",
              "EVENT",
              "FULFILLMENT",
              "INVENTORY",
              "COMPANY",
              "LEAD",
              "OPPORTUNITY",
              "PIPELINE",
              "PIPELINE_STAGE",
              "NOTE",
              "TASK",
              "OWNER",
              "ENGAGEMENT",
              "ADDRESS",
              "EXTERNAL_LINK",
              "LINE_ITEM",
              "PHONE_NUMBER",
              "VARIANT"
            ],
            "nullable": true,
            "example": "ACCOUNT"
          },
          "number": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "MOBILE",
              "TELEPHONE",
              "FAX"
            ],
            "nullable": true,
            "example": "MOBILE"
          }
        },
        "required": [
          "platform_id"
        ]
      },
      "Pipeline": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "stages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PipelineStage"
            },
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ],
        "description": "The Pipelines data model."
      },
      "PipelineStage": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string"
          },
          "pipeline_id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "display_order": {
            "type": "integer",
            "nullable": true
          },
          "probability": {
            "type": "number",
            "nullable": true
          },
          "is_won": {
            "type": "boolean",
            "nullable": true
          },
          "is_closed": {
            "type": "boolean",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ]
      },
      "PlatformTopicsResponse": {
        "type": "object",
        "properties": {
          "topics": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "topics"
        ]
      },
      "Project": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier assigned by Commenda for this project"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was last updated in Commenda's system (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Unique identifier for this project in the source accounting platform"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "The name of the project"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "The description of the project"
          },
          "status": {
            "type": "string",
            "nullable": true,
            "description": "The status of the project"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The date and time the project was last updated"
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ],
        "description": "The Projects Data Model is designed to simplify the management and retrieval of projects information across various accounting platforms."
      },
      "ProjectWrite": {
        "type": "object",
        "properties": {
          "platform_id": {
            "type": "string",
            "example": "string"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "status": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          }
        },
        "required": [
          "platform_id"
        ]
      },
      "PurchaseOrder": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier assigned by Commenda for this purchase order"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was last updated in Commenda's system (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Unique identifier for this purchase order in the source accounting platform"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "The description of the purchase order"
          },
          "document_number": {
            "type": "string",
            "nullable": true,
            "description": "The document number of the purchase order"
          },
          "posted_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The posted date of the purchase order"
          },
          "delivery_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The delivery date of the purchase order"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "description": "ISO 4217 currency code"
          },
          "currency_rate": {
            "type": "number",
            "nullable": true,
            "description": "The currency rate of the purchase order"
          },
          "sub_total": {
            "type": "number",
            "nullable": true,
            "description": "The sub total of the purchase order"
          },
          "tax_amount": {
            "type": "number",
            "nullable": true,
            "description": "The tax amount of the purchase order"
          },
          "total_discount": {
            "type": "number",
            "nullable": true,
            "description": "The total discount of the purchase order"
          },
          "total_amount": {
            "type": "number",
            "nullable": true,
            "description": "The total amount of the purchase order"
          },
          "payment_mode": {
            "type": "string",
            "nullable": true,
            "description": "The payment mode of the purchase order"
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "SUBMITTED",
              "PARTIALLY_PAID",
              "PAID",
              "OVERDUE",
              "VOID",
              "UNKNOWN"
            ],
            "nullable": true,
            "description": "The status of the purchase order"
          },
          "contact_id": {
            "type": "string",
            "nullable": true,
            "description": "The contact ID of the purchase order"
          },
          "bill_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The bill IDs associated with the purchase order"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The date and time the purchase order was last updated"
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineItem"
            },
            "nullable": true
          },
          "contact": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Contact"
            },
            "nullable": true
          },
          "currency": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Currency"
            },
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id",
          "bill_ids"
        ],
        "description": "A record of goods or services purchased from a vendor."
      },
      "PurchaseOrderWrite": {
        "type": "object",
        "properties": {
          "platform_id": {
            "type": "string",
            "example": "string"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "document_number": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "posted_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "delivery_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "example": "AED"
          },
          "currency_rate": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "sub_total": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "tax_amount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "total_discount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "total_amount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "payment_mode": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "SUBMITTED",
              "PARTIALLY_PAID",
              "PAID",
              "OVERDUE",
              "VOID",
              "UNKNOWN"
            ],
            "nullable": true,
            "example": "DRAFT"
          },
          "contact_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "bill_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "string"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineItemWrite"
            },
            "nullable": true
          },
          "contact": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactWrite"
            },
            "nullable": true
          },
          "currency": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CurrencyWrite"
            },
            "nullable": true
          }
        },
        "required": [
          "platform_id",
          "bill_ids"
        ]
      },
      "ResolveDisconnectRequestDTO": {
        "type": "object",
        "properties": {
          "status": {
            "enum": [
              "APPROVED",
              "REJECTED",
              "CANCELLED"
            ],
            "type": "string",
            "example": "APPROVED"
          }
        },
        "required": [
          "status"
        ]
      },
      "SalesOrder": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier assigned by Commenda for this sales order"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was last updated in Commenda's system (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Unique identifier for this sales order in the source accounting platform"
          },
          "posted_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The posted date of the sales order"
          },
          "delivery_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The delivery date of the sales order"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "The description of the sales order"
          },
          "document_number": {
            "type": "string",
            "nullable": true,
            "description": "The document number of the sales order"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "description": "ISO 4217 currency code"
          },
          "currency_rate": {
            "type": "number",
            "nullable": true,
            "description": "The currency rate of the sales order"
          },
          "sub_total": {
            "type": "number",
            "nullable": true,
            "description": "The sub total of the sales order"
          },
          "tax_amount": {
            "type": "number",
            "nullable": true,
            "description": "The tax amount of the sales order"
          },
          "total_discount": {
            "type": "number",
            "nullable": true,
            "description": "The total discount of the sales order"
          },
          "total_amount": {
            "type": "number",
            "nullable": true,
            "description": "The total amount of the sales order"
          },
          "payment_mode": {
            "type": "string",
            "nullable": true,
            "description": "The payment mode of the sales order"
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "SUBMITTED",
              "PARTIALLY_PAID",
              "PAID",
              "OVERDUE",
              "VOID",
              "UNKNOWN"
            ],
            "nullable": true,
            "description": "The status of the sales order"
          },
          "contact_id": {
            "type": "string",
            "nullable": true,
            "description": "The contact ID of the sales order"
          },
          "invoice_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The invoice IDs associated with the sales order"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The date and time the sales order was last updated"
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineItem"
            },
            "nullable": true
          },
          "contact": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Contact"
            },
            "nullable": true
          },
          "currency": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Currency"
            },
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id",
          "invoice_ids"
        ],
        "description": "A record of goods or services sold to a customer."
      },
      "SalesOrderWrite": {
        "type": "object",
        "properties": {
          "platform_id": {
            "type": "string",
            "example": "string"
          },
          "posted_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "delivery_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "document_number": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "example": "AED"
          },
          "currency_rate": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "sub_total": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "tax_amount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "total_discount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "total_amount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "payment_mode": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "SUBMITTED",
              "PARTIALLY_PAID",
              "PAID",
              "OVERDUE",
              "VOID",
              "UNKNOWN"
            ],
            "nullable": true,
            "example": "DRAFT"
          },
          "contact_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "invoice_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "string"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineItemWrite"
            },
            "nullable": true
          },
          "contact": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactWrite"
            },
            "nullable": true
          },
          "currency": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CurrencyWrite"
            },
            "nullable": true
          }
        },
        "required": [
          "platform_id",
          "invoice_ids"
        ]
      },
      "SaveIntegrationDTO": {
        "type": "object",
        "properties": {
          "integrationType": {
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ],
            "type": "string",
            "example": "QUICKBOOKS"
          },
          "clientId": {
            "type": "string",
            "example": "your-client-id"
          },
          "clientSecret": {
            "type": "string",
            "example": "your-client-secret"
          },
          "isRootfiIdentity": {
            "type": "boolean",
            "example": false
          },
          "isDisabled": {
            "type": "boolean",
            "example": false
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true,
            "example": {
              "environment": "production"
            }
          }
        },
        "required": [
          "integrationType"
        ]
      },
      "SaveIntegrationResponse": {
        "type": "object",
        "properties": {
          "integration": {
            "$ref": "#/components/schemas/SavedIntegration"
          }
        },
        "required": [
          "integration"
        ]
      },
      "SavedIntegration": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          }
        },
        "required": [
          "id"
        ]
      },
      "ScopeAccess": {
        "type": "object",
        "properties": {
          "READ": {
            "type": "boolean"
          },
          "CREATE": {
            "type": "boolean"
          },
          "UPDATE": {
            "type": "boolean"
          },
          "DELETE": {
            "type": "boolean"
          }
        },
        "required": [
          "READ",
          "CREATE",
          "UPDATE",
          "DELETE"
        ]
      },
      "ScopeAccessModel": {
        "type": "object",
        "properties": {
          "READ": {
            "type": "boolean",
            "example": true
          },
          "CREATE": {
            "type": "boolean",
            "example": false
          },
          "UPDATE": {
            "type": "boolean",
            "example": false
          },
          "DELETE": {
            "type": "boolean",
            "example": false
          }
        },
        "required": [
          "READ",
          "CREATE",
          "UPDATE",
          "DELETE"
        ]
      },
      "ScopeAccessResponse": {
        "type": "object",
        "properties": {
          "READ": {
            "type": "boolean"
          },
          "CREATE": {
            "type": "boolean"
          },
          "UPDATE": {
            "type": "boolean"
          },
          "DELETE": {
            "type": "boolean"
          }
        },
        "required": [
          "READ",
          "CREATE",
          "UPDATE",
          "DELETE"
        ]
      },
      "SerializedApiLog": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "method": {
            "type": "string",
            "enum": [
              "GET",
              "POST",
              "PUT",
              "PATCH",
              "DELETE"
            ]
          },
          "url": {
            "type": "string"
          },
          "statusCode": {
            "type": "number"
          },
          "apiStatus": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILED"
            ]
          },
          "responseTime": {
            "type": "number"
          },
          "logType": {
            "type": "string",
            "enum": [
              "API",
              "DASHBOARD",
              "CONNECTION",
              "INTERNAL",
              "SDK",
              "SYNC_API",
              "PASSTHROUGH"
            ]
          },
          "companyId": {
            "type": "object"
          },
          "integration": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "errorCode": {
            "type": "object"
          },
          "jobId": {
            "type": "object"
          },
          "createdAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "requestId",
          "method",
          "url",
          "statusCode",
          "apiStatus",
          "responseTime",
          "logType",
          "createdAt"
        ]
      },
      "SerializedApiLogDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "method": {
            "type": "string",
            "enum": [
              "GET",
              "POST",
              "PUT",
              "PATCH",
              "DELETE"
            ]
          },
          "url": {
            "type": "string"
          },
          "statusCode": {
            "type": "number"
          },
          "apiStatus": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILED"
            ]
          },
          "responseTime": {
            "type": "number"
          },
          "logType": {
            "type": "string",
            "enum": [
              "API",
              "DASHBOARD",
              "CONNECTION",
              "INTERNAL",
              "SDK",
              "SYNC_API",
              "PASSTHROUGH"
            ]
          },
          "companyId": {
            "type": "object"
          },
          "integration": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "errorCode": {
            "type": "object"
          },
          "jobId": {
            "type": "object"
          },
          "createdAt": {
            "type": "string"
          },
          "host": {
            "type": "object"
          },
          "traceHeader": {
            "type": "object"
          },
          "request": {
            "$ref": "#/components/schemas/ApiLogRequest"
          },
          "response": {
            "$ref": "#/components/schemas/ApiLogResponse"
          },
          "job": {
            "$ref": "#/components/schemas/ApiLogJob"
          }
        },
        "required": [
          "id",
          "requestId",
          "method",
          "url",
          "statusCode",
          "apiStatus",
          "responseTime",
          "logType",
          "createdAt"
        ]
      },
      "SerializedCompany": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "inviteLinkId": {
            "type": "string",
            "nullable": true
          },
          "companyId": {
            "type": "number"
          },
          "companyName": {
            "type": "string",
            "nullable": true
          },
          "integration": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "integrationCategory": {
            "type": "string",
            "enum": [
              "ACCOUNTING",
              "PAYMENTS",
              "ECOMMERCE",
              "CRM",
              "HRIS"
            ]
          },
          "integrationEntityId": {
            "type": "string",
            "nullable": true
          },
          "connectionStatus": {
            "type": "string",
            "enum": [
              "HEALTHY",
              "DISCONNECTED",
              "EXPIRED",
              "PENDING",
              "RATE_LIMIT_EXCEEDED"
            ],
            "nullable": true
          },
          "syncStatus": {
            "type": "string",
            "enum": [
              "IDLE",
              "FETCHING",
              "SLEEPING",
              "PARSING",
              "RUNNING"
            ],
            "nullable": true
          },
          "hasActiveSync": {
            "type": "boolean"
          },
          "lastSynced": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "syncFrom": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "dataModelConfigs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataModelSyncConfigResponse"
            }
          },
          "connection": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/SerializedConnection"
              }
            ]
          }
        },
        "required": [
          "id",
          "inviteLinkId",
          "companyId",
          "companyName",
          "integration",
          "integrationCategory",
          "integrationEntityId",
          "connectionStatus",
          "syncStatus",
          "hasActiveSync",
          "lastSynced",
          "syncFrom",
          "createdAt",
          "dataModelConfigs",
          "connection"
        ]
      },
      "SerializedConnection": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "companyId": {
            "type": "number"
          },
          "organisationId": {
            "type": "number"
          },
          "integrationType": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "integrationEntityId": {
            "type": "string",
            "nullable": true
          },
          "category": {
            "type": "string",
            "enum": [
              "ACCOUNTING",
              "PAYMENTS",
              "ECOMMERCE",
              "CRM",
              "HRIS"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "HEALTHY",
              "DISCONNECTED",
              "EXPIRED",
              "PENDING",
              "RATE_LIMIT_EXCEEDED"
            ]
          },
          "syncStatus": {
            "type": "string",
            "enum": [
              "IDLE",
              "FETCHING",
              "SLEEPING",
              "PARSING",
              "RUNNING"
            ]
          },
          "syncResumeAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastSynced": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "variables": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true
          }
        },
        "required": [
          "id",
          "createdAt",
          "updatedAt",
          "companyId",
          "organisationId",
          "integrationType",
          "integrationEntityId",
          "category",
          "status",
          "syncStatus",
          "syncResumeAt",
          "lastSynced",
          "variables"
        ]
      },
      "SerializedDeliveryAttempt": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "attemptNumber": {
            "type": "number"
          },
          "success": {
            "type": "boolean"
          },
          "statusCode": {
            "type": "object"
          },
          "errorMessage": {
            "type": "object"
          },
          "createdAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "attemptNumber",
          "success",
          "createdAt"
        ]
      },
      "SerializedIntegration": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "integrationType": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "category": {
            "type": "string",
            "enum": [
              "ACCOUNTING",
              "PAYMENTS",
              "ECOMMERCE",
              "CRM",
              "HRIS"
            ]
          },
          "isDisabled": {
            "type": "boolean"
          },
          "isRootfiIdentity": {
            "type": "boolean"
          },
          "clientId": {
            "type": "string",
            "nullable": true
          },
          "clientSecret": {
            "type": "string",
            "nullable": true
          },
          "companyCount": {
            "type": "number"
          },
          "metadata": {
            "type": "object",
            "nullable": true
          }
        },
        "required": [
          "id",
          "integrationType",
          "category",
          "isDisabled",
          "isRootfiIdentity",
          "clientId",
          "clientSecret",
          "companyCount"
        ]
      },
      "SerializedInviteLink": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "inviteLinkId": {
            "type": "string"
          },
          "companyId": {
            "type": "number",
            "nullable": true
          },
          "integration": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "integrationCategory": {
            "type": "string",
            "enum": [
              "ACCOUNTING",
              "PAYMENTS",
              "ECOMMERCE",
              "CRM",
              "HRIS"
            ]
          },
          "syncFrom": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "inviteLinkId",
          "companyId",
          "integration",
          "integrationCategory",
          "syncFrom",
          "createdAt"
        ]
      },
      "SerializedInviteLinkDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "inviteLinkId": {
            "type": "string"
          },
          "companyId": {
            "type": "number",
            "nullable": true
          },
          "integration": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "integrationCategory": {
            "type": "string",
            "enum": [
              "ACCOUNTING",
              "PAYMENTS",
              "ECOMMERCE",
              "CRM",
              "HRIS"
            ]
          },
          "syncFrom": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "dataModelConfigs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataModelSyncConfigResponse"
            }
          }
        },
        "required": [
          "id",
          "inviteLinkId",
          "companyId",
          "integration",
          "integrationCategory",
          "syncFrom",
          "createdAt",
          "dataModelConfigs"
        ]
      },
      "SerializedJob": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "dataModel": {
            "type": "string",
            "enum": [
              "ACCOUNT",
              "BALANCE_SHEET",
              "BANK_ACCOUNT",
              "BANK_TRANSACTION",
              "BILL",
              "BILL_CREDIT_NOTE",
              "BILL_PAYMENT",
              "CASH_FLOW_STATEMENT",
              "COMPANY_INFO",
              "CONTACT",
              "CURRENCY",
              "DOCUMENT",
              "EXPENSE",
              "GOODS_RECEIPT_NOTE",
              "INCOME_STATEMENT",
              "INVOICE",
              "INVOICE_CREDIT_NOTE",
              "INVOICE_PAYMENT",
              "ITEM",
              "JOURNAL_ENTRY",
              "JOURNAL_LINE",
              "PROJECT",
              "PURCHASE_ORDER",
              "SALES_ORDER",
              "ESTIMATE",
              "TAX_RATE",
              "TRACKING_CATEGORY",
              "CASH_SALE",
              "CASH_REFUND",
              "BALANCE",
              "DISPUTE",
              "ORDER",
              "PAYOUT",
              "SUBSCRIPTION",
              "TRANSACTION",
              "EVENT",
              "FULFILLMENT",
              "INVENTORY",
              "COMPANY",
              "LEAD",
              "OPPORTUNITY",
              "PIPELINE",
              "PIPELINE_STAGE",
              "NOTE",
              "TASK",
              "OWNER",
              "ENGAGEMENT",
              "ADDRESS",
              "EXTERNAL_LINK",
              "LINE_ITEM",
              "PHONE_NUMBER",
              "VARIANT"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILED",
              "CREATED",
              "RUNNING"
            ]
          },
          "jobType": {
            "type": "string",
            "enum": [
              "PUSH",
              "PULL",
              "CUSTOM"
            ]
          },
          "configMode": {
            "type": "string",
            "enum": [
              "CREATE",
              "READ",
              "UPDATE",
              "DELETE",
              "DOWNLOAD",
              "CUSTOM"
            ]
          },
          "recordsSynced": {
            "type": "object",
            "nullable": true
          },
          "retryCount": {
            "type": "number"
          },
          "parentJobId": {
            "type": "object",
            "nullable": true
          },
          "errorCode": {
            "type": "object",
            "nullable": true
          },
          "errorMessage": {
            "type": "object",
            "nullable": true
          },
          "errorResponse": {
            "type": "object",
            "nullable": true
          },
          "startTime": {
            "type": "object",
            "nullable": true
          },
          "endTime": {
            "type": "object",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "dataModel",
          "status",
          "jobType",
          "configMode",
          "retryCount",
          "createdAt"
        ]
      },
      "SerializedMember": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "email": {
            "type": "string"
          },
          "name": {
            "type": "object",
            "nullable": true
          },
          "role": {
            "type": "object",
            "nullable": true
          },
          "joinedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "email",
          "joinedAt"
        ]
      },
      "SerializedSync": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "companyId": {
            "type": "number",
            "nullable": true
          },
          "integrationType": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "dataModels": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "ACCOUNT",
                "BALANCE_SHEET",
                "BANK_ACCOUNT",
                "BANK_TRANSACTION",
                "BILL",
                "BILL_CREDIT_NOTE",
                "BILL_PAYMENT",
                "CASH_FLOW_STATEMENT",
                "COMPANY_INFO",
                "CONTACT",
                "CURRENCY",
                "DOCUMENT",
                "EXPENSE",
                "GOODS_RECEIPT_NOTE",
                "INCOME_STATEMENT",
                "INVOICE",
                "INVOICE_CREDIT_NOTE",
                "INVOICE_PAYMENT",
                "ITEM",
                "JOURNAL_ENTRY",
                "JOURNAL_LINE",
                "PROJECT",
                "PURCHASE_ORDER",
                "SALES_ORDER",
                "ESTIMATE",
                "TAX_RATE",
                "TRACKING_CATEGORY",
                "CASH_SALE",
                "CASH_REFUND",
                "BALANCE",
                "DISPUTE",
                "ORDER",
                "PAYOUT",
                "SUBSCRIPTION",
                "TRANSACTION",
                "EVENT",
                "FULFILLMENT",
                "INVENTORY",
                "COMPANY",
                "LEAD",
                "OPPORTUNITY",
                "PIPELINE",
                "PIPELINE_STAGE",
                "NOTE",
                "TASK",
                "OWNER",
                "ENGAGEMENT",
                "ADDRESS",
                "EXTERNAL_LINK",
                "LINE_ITEM",
                "PHONE_NUMBER",
                "VARIANT"
              ]
            }
          },
          "configMode": {
            "type": "string",
            "enum": [
              "CREATE",
              "READ",
              "UPDATE",
              "DELETE",
              "DOWNLOAD",
              "CUSTOM"
            ]
          },
          "fullSync": {
            "type": "boolean"
          },
          "syncType": {
            "type": "string",
            "enum": [
              "MANUAL",
              "AUTO_SYNC"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "RUNNING",
              "FAILED",
              "PARTIAL_SUCCESS"
            ]
          },
          "jobCounts": {
            "$ref": "#/components/schemas/SyncJobCounts"
          },
          "dataModelCounts": {
            "$ref": "#/components/schemas/DataModelCounts"
          },
          "startTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "endTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "companyId",
          "integrationType",
          "dataModels",
          "configMode",
          "fullSync",
          "syncType",
          "status",
          "jobCounts",
          "dataModelCounts",
          "startTime",
          "endTime",
          "createdAt"
        ]
      },
      "SerializedWebhookConfig": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "number"
          },
          "rootfi_created_at": {
            "type": "string"
          },
          "rootfi_updated_at": {
            "type": "string"
          },
          "rootfi_organisation_id": {
            "type": "number"
          },
          "webhook_type": {
            "type": "string",
            "enum": [
              "INTEGRATION",
              "DATA_MODEL_CHANGES",
              "CONNECTION_CHANGED",
              "SYNC_COMPLETED",
              "SYNC_STARTED",
              "DISCONNECT_REQUESTED"
            ]
          },
          "integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "ENABLED",
              "DISABLED"
            ]
          },
          "topics": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "headers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookHeaderDTO"
            }
          },
          "signature_header": {
            "type": "object"
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_organisation_id",
          "webhook_type",
          "name",
          "url",
          "state",
          "topics"
        ]
      },
      "SerializedWebhookCredential": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "number"
          },
          "rootfi_created_at": {
            "type": "string"
          },
          "rootfi_updated_at": {
            "type": "string"
          },
          "rootfi_organisation_id": {
            "type": "number"
          },
          "integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "rootfi_company_id": {
            "type": "object",
            "nullable": true
          },
          "verification_token": {
            "type": "object",
            "nullable": true
          },
          "verification_mode": {
            "type": "string",
            "enum": [
              "URL_PARAM",
              "HEADER"
            ],
            "nullable": true
          },
          "signing_secret_masked": {
            "type": "object",
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_organisation_id",
          "integration_type"
        ]
      },
      "SerializedWebhookLog": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "webhookName": {
            "type": "string"
          },
          "webhookUrl": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "PENDING",
              "PROCESSING",
              "DELIVERED",
              "FAILED"
            ]
          },
          "latestStatusCode": {
            "type": "object"
          },
          "attemptCount": {
            "type": "number"
          },
          "eventType": {
            "type": "object"
          },
          "integration": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "syncId": {
            "type": "object"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "webhookName",
          "webhookUrl",
          "state",
          "attemptCount",
          "createdAt",
          "updatedAt"
        ]
      },
      "SerializedWebhookLogDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "webhookName": {
            "type": "string"
          },
          "webhookUrl": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "PENDING",
              "PROCESSING",
              "DELIVERED",
              "FAILED"
            ]
          },
          "latestStatusCode": {
            "type": "object"
          },
          "attemptCount": {
            "type": "number"
          },
          "eventType": {
            "type": "object"
          },
          "integration": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "syncId": {
            "type": "object"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "payload": {
            "type": "object"
          },
          "attempts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SerializedDeliveryAttempt"
            }
          }
        },
        "required": [
          "id",
          "webhookName",
          "webhookUrl",
          "state",
          "attemptCount",
          "createdAt",
          "updatedAt",
          "payload",
          "attempts"
        ]
      },
      "Subscription": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier for this subscription"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When this subscription was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When this subscription was last updated (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Platform-specific subscription identifier"
          },
          "contact_id": {
            "type": "string",
            "nullable": true,
            "description": "Reference to the Contact subscribed"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "description": "ISO 4217 currency code for subscription charges"
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "IN_TRIAL",
              "CANCELED",
              "PAUSED",
              "PAST_DUE",
              "INCOMPLETE",
              "UNKNOWN"
            ],
            "nullable": true,
            "description": "Current status of the subscription"
          },
          "amount": {
            "type": "number",
            "nullable": true,
            "description": "Recurring charge amount per billing cycle"
          },
          "interval": {
            "type": "string",
            "enum": [
              "DAY",
              "WEEK",
              "MONTH",
              "YEAR"
            ],
            "nullable": true,
            "description": "Billing frequency unit (day, week, month, year)"
          },
          "interval_count": {
            "type": "integer",
            "nullable": true,
            "description": "Number of intervals between billings (e.g., 2 = every 2 months)"
          },
          "next_billing_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Next scheduled billing date (ISO 8601)"
          },
          "last_invoice_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Date when the last invoice was generated (ISO 8601)"
          },
          "last_payment_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Date when the last successful payment was received (ISO 8601)"
          },
          "invoice_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "References to all invoices generated from this subscription"
          },
          "transaction_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "References to all transactions (payments, refunds, fees)"
          },
          "line_item_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Original creation timestamp from platform (ISO 8601)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Last update timestamp from platform (ISO 8601)"
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineItem"
            },
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id",
          "invoice_ids",
          "transaction_ids",
          "line_item_ids"
        ],
        "description": "The Subscription object represents a recurring billing arrangement with a contact, automatically generating invoices at regular intervals."
      },
      "SubscriptionWrite": {
        "type": "object",
        "properties": {
          "platform_id": {
            "type": "string",
            "example": "string"
          },
          "contact_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "example": "AED"
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "IN_TRIAL",
              "CANCELED",
              "PAUSED",
              "PAST_DUE",
              "INCOMPLETE",
              "UNKNOWN"
            ],
            "nullable": true,
            "example": "ACTIVE"
          },
          "amount": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "interval": {
            "type": "string",
            "enum": [
              "DAY",
              "WEEK",
              "MONTH",
              "YEAR"
            ],
            "nullable": true,
            "example": "DAY"
          },
          "interval_count": {
            "type": "integer",
            "nullable": true,
            "example": 0
          },
          "next_billing_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "last_invoice_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "last_payment_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "invoice_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "string"
            ]
          },
          "transaction_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "string"
            ]
          },
          "line_item_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "string"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineItemWrite"
            },
            "nullable": true
          }
        },
        "required": [
          "platform_id",
          "invoice_ids",
          "transaction_ids",
          "line_item_ids"
        ]
      },
      "SyncActivityDay": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string"
          },
          "success": {
            "type": "number"
          },
          "failed": {
            "type": "number"
          }
        },
        "required": [
          "date",
          "success",
          "failed"
        ]
      },
      "SyncJobCounts": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number"
          },
          "success": {
            "type": "number"
          },
          "failed": {
            "type": "number"
          },
          "running": {
            "type": "number"
          },
          "pending": {
            "type": "number"
          }
        },
        "required": [
          "total",
          "success",
          "failed",
          "running",
          "pending"
        ]
      },
      "Task": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string"
          },
          "subject": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "OPEN",
              "IN_PROGRESS",
              "COMPLETED"
            ],
            "nullable": true
          },
          "priority": {
            "type": "string",
            "nullable": true
          },
          "due_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "completed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "owner_id": {
            "type": "string",
            "nullable": true
          },
          "account_id": {
            "type": "string",
            "nullable": true
          },
          "contact_id": {
            "type": "string",
            "nullable": true
          },
          "opportunity_id": {
            "type": "string",
            "nullable": true
          },
          "lead_id": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ],
        "description": "The Tasks data model."
      },
      "TaxRate": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier assigned by Commenda for this tax rate"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was last updated in Commenda's system (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Unique identifier for this tax rate in the source accounting platform"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "The display name of the tax rate"
          },
          "code": {
            "type": "string",
            "nullable": true,
            "description": "The simple ID or code for the tax rate"
          },
          "rate": {
            "type": "number",
            "nullable": true
          },
          "tax_type": {
            "type": "string",
            "nullable": true,
            "description": "The type of tax as mentioned in the accounting platform"
          },
          "effective_tax_rate": {
            "type": "number",
            "nullable": true,
            "description": "The total tax rate after accounting for the compounding effects of all tax components"
          },
          "total_tax_rate": {
            "type": "number",
            "nullable": true,
            "description": "The sum of all the tax rate components"
          },
          "components": {
            "description": "The list of tax rate components",
            "nullable": true
          },
          "jurisdiction": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "ARCHIVED",
              "UNKNOWN"
            ],
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The date and time the tax rate was last updated"
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ],
        "description": "A Tax Rate is the percentage at which an individual or corporation is taxed."
      },
      "TaxRateWrite": {
        "type": "object",
        "properties": {
          "platform_id": {
            "type": "string",
            "example": "string"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "code": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "rate": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "tax_type": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "effective_tax_rate": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "total_tax_rate": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "components": {
            "description": "Arbitrary JSON (object or array; shape varies by data model).",
            "nullable": true,
            "example": {}
          },
          "jurisdiction": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "ARCHIVED",
              "UNKNOWN"
            ],
            "nullable": true,
            "example": "ACTIVE"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T00:00:00Z"
          }
        },
        "required": [
          "platform_id"
        ]
      },
      "TrackingCategory": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier assigned by Commenda for this tracking category"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this record was last updated in Commenda's system (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Unique identifier for this tracking category in the source accounting platform"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "The name of the tracking category"
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "ARCHIVED",
              "UNKNOWN"
            ],
            "nullable": true,
            "description": "The status of the tracking category"
          },
          "parent_id": {
            "type": "string",
            "nullable": true,
            "description": "The parent tracking category ID of the tracking category"
          },
          "has_children": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the tracking category has child tracking categories"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The date and time the tracking category was last updated"
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ],
        "description": "Tracking Categories are used to classify and track financial data across different segments or dimensions within the business entity."
      },
      "Transaction": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer",
            "description": "Unique identifier for this transaction"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When this transaction was created in Commenda's system (ISO 8601)"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When this transaction was last updated (ISO 8601)"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string",
            "description": "Platform-specific transaction identifier"
          },
          "type": {
            "type": "string",
            "enum": [
              "PAYMENT",
              "REFUND",
              "CREDIT_NOTE",
              "FEE",
              "CHARGEBACK",
              "PAYOUT",
              "ADJUSTMENT"
            ],
            "nullable": true,
            "description": "Type of transaction (`PAYMENT`, `REFUND`, `CREDIT_NOTE`, etc.)"
          },
          "invoice_id": {
            "type": "string",
            "nullable": true,
            "description": "Reference to the associated Invoice"
          },
          "order_id": {
            "type": "string",
            "nullable": true,
            "description": "Reference to the associated Order (if applicable)"
          },
          "subscription_id": {
            "type": "string",
            "nullable": true,
            "description": "Reference to the associated Subscription (for recurring payments)"
          },
          "contact_id": {
            "type": "string",
            "nullable": true,
            "description": "Reference to the Contact"
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "description": "ISO 4217 currency code"
          },
          "amount": {
            "type": "number",
            "nullable": true,
            "description": "Transaction amount (always positive; type indicates direction)"
          },
          "status": {
            "type": "string",
            "enum": [
              "REQUIRES_ACTION",
              "PENDING",
              "AUTHORIZED",
              "PAID",
              "FAILED",
              "CANCELED",
              "REFUNDED",
              "UNKNOWN",
              "REVERSED"
            ],
            "nullable": true,
            "description": "Current status of the transaction"
          },
          "payment_method_type": {
            "type": "string",
            "enum": [
              "CARD",
              "BANK_TRANSFER",
              "WIRE_TRANSFER",
              "PAYPAL",
              "APPLE_PAY",
              "GOOGLE_PAY",
              "CHECK",
              "CASH",
              "CRYPTO",
              "OTHER",
              "UNKNOWN"
            ],
            "nullable": true,
            "description": "Payment method used (for payments)"
          },
          "gateway": {
            "type": "string",
            "nullable": true,
            "description": "Payment gateway/processor name (e.g., \"stripe\", \"razorpay\")"
          },
          "gateway_transaction_id": {
            "type": "string",
            "nullable": true,
            "description": "Platform-specific transaction ID from the gateway"
          },
          "original_transaction_id": {
            "type": "string",
            "nullable": true,
            "description": "For refunds/reversals, reference to the original payment"
          },
          "reference_number": {
            "type": "string",
            "nullable": true,
            "description": "Human-readable reference number"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Human-readable description of the transaction"
          },
          "reason": {
            "type": "string",
            "enum": [
              "CUSTOMER_REQUEST",
              "DUPLICATE",
              "FRAUD",
              "QUALITY_ISSUE",
              "BILLING_ERROR",
              "LOYALTY_DISCOUNT",
              "PROMOTIONAL",
              "ADJUSTMENT",
              "OTHER"
            ],
            "nullable": true,
            "description": "Standardized reason code (primarily for refunds/credit notes)"
          },
          "reason_code": {
            "type": "string",
            "nullable": true,
            "description": "Platform-specific reason code"
          },
          "metadata": {
            "description": "Additional platform-specific data",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Original transaction timestamp from platform (ISO 8601)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Last update timestamp from platform (ISO 8601)"
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ],
        "description": "The Transaction object represents all monetary movements in the payment system - a unified model consolidating payments, refunds, and credit notes."
      },
      "UpdateCompanyDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "Acme Inc"
          }
        }
      },
      "UpdateCompanySyncConfigDTO": {
        "type": "object",
        "properties": {
          "configs": {
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WriteSyncConfigModel"
            }
          }
        },
        "required": [
          "configs"
        ]
      },
      "UpdateInviteLinkDTO": {
        "type": "object",
        "properties": {
          "companyName": {
            "type": "string",
            "example": "Acme Inc"
          },
          "syncFrom": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "example": "2024-01-01T00:00:00Z"
          },
          "syncConfig": {
            "nullable": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WriteSyncConfigModel"
            }
          }
        }
      },
      "UpdateOrgSyncConfigDTO": {
        "type": "object",
        "properties": {
          "propagate": {
            "type": "boolean",
            "example": false
          },
          "configs": {
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WriteSyncConfigModel"
            }
          }
        },
        "required": [
          "configs"
        ]
      },
      "UpdateWebhookConfigDTO": {
        "type": "object",
        "properties": {
          "webhook_type": {
            "enum": [
              "INTEGRATION",
              "DATA_MODEL_CHANGES",
              "CONNECTION_CHANGED",
              "SYNC_COMPLETED",
              "SYNC_STARTED",
              "DISCONNECT_REQUESTED"
            ],
            "type": "string",
            "example": "DATA_MODEL_CHANGES"
          },
          "name": {
            "type": "string",
            "example": "My webhook"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "example": "https://example.com/webhooks"
          },
          "topics": {
            "example": [
              "orders/create"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "state": {
            "enum": [
              "ENABLED",
              "DISABLED"
            ],
            "type": "string",
            "example": "ENABLED"
          },
          "signing_key": {
            "type": "string",
            "example": "your-signing-key"
          },
          "headers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookHeaderDTO"
            }
          }
        }
      },
      "UpdateWebhookCredentialDTO": {
        "type": "object",
        "properties": {
          "signing_secret": {
            "type": "string",
            "example": "your-signing-secret"
          },
          "verification_mode": {
            "enum": [
              "URL_PARAM",
              "HEADER"
            ],
            "type": "string",
            "example": "HEADER"
          }
        }
      },
      "Variant": {
        "type": "object",
        "properties": {
          "rootfi_id": {
            "type": "integer"
          },
          "rootfi_created_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "rootfi_integration_type": {
            "type": "string",
            "enum": [
              "BUSY",
              "CLEARBOOKS",
              "FREEAGENT",
              "FRESHBOOKS",
              "KASHFLOW",
              "MEKARI_JURNAL",
              "MS_DYNAMICS_365",
              "MS_DYNAMICS_365_FO",
              "MYOB_BUSINESS",
              "NETSUITE",
              "ODOO_ACCOUNTING",
              "QOYOD",
              "QUICKBOOKS",
              "QUICKBOOKS_SANDBOX",
              "ROOTFI_SANDBOX",
              "SAGE_CLOUD_ACCOUNTING",
              "SAGE_ZA_CLOUD_ACCOUNTING",
              "SAGE_INTACCT",
              "TALLY",
              "WAFEQ",
              "WAVE",
              "XERO",
              "ZOHO_BOOKS",
              "PUZZLE_SANDBOX",
              "PUZZLE",
              "RILLET",
              "RILLET_SANDBOX",
              "AMAZON",
              "BIG_COMMERCE",
              "SHOPIFY",
              "SQUARESPACE",
              "WIX",
              "WOO_COMMERCE",
              "GOOGLE_PLAYSTORE",
              "CHARGEBEE",
              "MOLLIE",
              "PAYPAL",
              "PAYPAL_SANDBOX",
              "RAZORPAY",
              "SQUARE",
              "SQUARE_SANDBOX",
              "STRIPE",
              "STRIPE_TEST",
              "STRIPE_SANDBOX",
              "ZOHO_INVOICE",
              "PADDLE",
              "PADDLE_SANDBOX",
              "HUBSPOT",
              "PIPEDRIVE",
              "SALES_FORCE",
              "ZOHO_CRM",
              "GUSTO"
            ]
          },
          "platform_id": {
            "type": "string"
          },
          "parent_id": {
            "type": "string",
            "nullable": true
          },
          "parent_type": {
            "type": "string",
            "enum": [
              "ACCOUNT",
              "BALANCE_SHEET",
              "BANK_ACCOUNT",
              "BANK_TRANSACTION",
              "BILL",
              "BILL_CREDIT_NOTE",
              "BILL_PAYMENT",
              "CASH_FLOW_STATEMENT",
              "COMPANY_INFO",
              "CONTACT",
              "CURRENCY",
              "DOCUMENT",
              "EXPENSE",
              "GOODS_RECEIPT_NOTE",
              "INCOME_STATEMENT",
              "INVOICE",
              "INVOICE_CREDIT_NOTE",
              "INVOICE_PAYMENT",
              "ITEM",
              "JOURNAL_ENTRY",
              "JOURNAL_LINE",
              "PROJECT",
              "PURCHASE_ORDER",
              "SALES_ORDER",
              "ESTIMATE",
              "TAX_RATE",
              "TRACKING_CATEGORY",
              "CASH_SALE",
              "CASH_REFUND",
              "BALANCE",
              "DISPUTE",
              "ORDER",
              "PAYOUT",
              "SUBSCRIPTION",
              "TRANSACTION",
              "EVENT",
              "FULFILLMENT",
              "INVENTORY",
              "COMPANY",
              "LEAD",
              "OPPORTUNITY",
              "PIPELINE",
              "PIPELINE_STAGE",
              "NOTE",
              "TASK",
              "OWNER",
              "ENGAGEMENT",
              "ADDRESS",
              "EXTERNAL_LINK",
              "LINE_ITEM",
              "PHONE_NUMBER",
              "VARIANT"
            ],
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "sku": {
            "type": "string",
            "nullable": true
          },
          "price": {
            "type": "number",
            "nullable": true
          },
          "compare_at_price": {
            "type": "number",
            "nullable": true
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "ARCHIVED",
              "DRAFT",
              "UNKNOWN"
            ],
            "nullable": true
          },
          "attributes": {
            "description": "Arbitrary JSON (object or array; shape varies by data model).",
            "nullable": true
          }
        },
        "required": [
          "rootfi_id",
          "rootfi_created_at",
          "rootfi_updated_at",
          "rootfi_integration_type",
          "platform_id"
        ]
      },
      "VariantWrite": {
        "type": "object",
        "properties": {
          "platform_id": {
            "type": "string",
            "example": "string"
          },
          "parent_id": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "parent_type": {
            "type": "string",
            "enum": [
              "ACCOUNT",
              "BALANCE_SHEET",
              "BANK_ACCOUNT",
              "BANK_TRANSACTION",
              "BILL",
              "BILL_CREDIT_NOTE",
              "BILL_PAYMENT",
              "CASH_FLOW_STATEMENT",
              "COMPANY_INFO",
              "CONTACT",
              "CURRENCY",
              "DOCUMENT",
              "EXPENSE",
              "GOODS_RECEIPT_NOTE",
              "INCOME_STATEMENT",
              "INVOICE",
              "INVOICE_CREDIT_NOTE",
              "INVOICE_PAYMENT",
              "ITEM",
              "JOURNAL_ENTRY",
              "JOURNAL_LINE",
              "PROJECT",
              "PURCHASE_ORDER",
              "SALES_ORDER",
              "ESTIMATE",
              "TAX_RATE",
              "TRACKING_CATEGORY",
              "CASH_SALE",
              "CASH_REFUND",
              "BALANCE",
              "DISPUTE",
              "ORDER",
              "PAYOUT",
              "SUBSCRIPTION",
              "TRANSACTION",
              "EVENT",
              "FULFILLMENT",
              "INVENTORY",
              "COMPANY",
              "LEAD",
              "OPPORTUNITY",
              "PIPELINE",
              "PIPELINE_STAGE",
              "NOTE",
              "TASK",
              "OWNER",
              "ENGAGEMENT",
              "ADDRESS",
              "EXTERNAL_LINK",
              "LINE_ITEM",
              "PHONE_NUMBER",
              "VARIANT"
            ],
            "nullable": true,
            "example": "ACCOUNT"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "sku": {
            "type": "string",
            "nullable": true,
            "example": "string"
          },
          "price": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "compare_at_price": {
            "type": "number",
            "nullable": true,
            "example": 0
          },
          "currency_id": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAF",
              "XAG",
              "XAU",
              "XBA",
              "XBB",
              "XBC",
              "XBD",
              "XCD",
              "XDR",
              "XOF",
              "XPD",
              "XPF",
              "XPT",
              "XSU",
              "XTS",
              "XUA",
              "XXX",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ],
            "nullable": true,
            "example": "AED"
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "ARCHIVED",
              "DRAFT",
              "UNKNOWN"
            ],
            "nullable": true,
            "example": "ACTIVE"
          },
          "attributes": {
            "description": "Arbitrary JSON (object or array; shape varies by data model).",
            "nullable": true,
            "example": {}
          }
        },
        "required": [
          "platform_id"
        ]
      },
      "WebhookHeaderDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "X-Custom-Header"
          },
          "value": {
            "type": "string",
            "example": "custom-value"
          }
        },
        "required": [
          "name",
          "value"
        ]
      },
      "WebhookStats": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number"
          },
          "successful": {
            "type": "number"
          },
          "failed": {
            "type": "number"
          },
          "deliveryRate": {
            "type": "number"
          }
        },
        "required": [
          "total",
          "successful",
          "failed",
          "deliveryRate"
        ]
      },
      "WriteSyncConfigModel": {
        "type": "object",
        "properties": {
          "interval": {
            "type": "number",
            "minimum": 1,
            "example": 1
          },
          "frequency": {
            "type": "string",
            "enum": [
              "WEEKLY",
              "MONTHLY",
              "YEARLY",
              "DAILY",
              "HOURLY",
              "NEVER"
            ],
            "example": "DAILY"
          },
          "data_model": {
            "type": "string",
            "enum": [
              "ACCOUNT",
              "BALANCE_SHEET",
              "BANK_ACCOUNT",
              "BANK_TRANSACTION",
              "BILL",
              "BILL_CREDIT_NOTE",
              "BILL_PAYMENT",
              "CASH_FLOW_STATEMENT",
              "COMPANY_INFO",
              "CONTACT",
              "CURRENCY",
              "DOCUMENT",
              "EXPENSE",
              "GOODS_RECEIPT_NOTE",
              "INCOME_STATEMENT",
              "INVOICE",
              "INVOICE_CREDIT_NOTE",
              "INVOICE_PAYMENT",
              "ITEM",
              "JOURNAL_ENTRY",
              "JOURNAL_LINE",
              "PROJECT",
              "PURCHASE_ORDER",
              "SALES_ORDER",
              "ESTIMATE",
              "TAX_RATE",
              "TRACKING_CATEGORY",
              "CASH_SALE",
              "CASH_REFUND",
              "BALANCE",
              "DISPUTE",
              "ORDER",
              "PAYOUT",
              "SUBSCRIPTION",
              "TRANSACTION",
              "EVENT",
              "FULFILLMENT",
              "INVENTORY",
              "COMPANY",
              "LEAD",
              "OPPORTUNITY",
              "PIPELINE",
              "PIPELINE_STAGE",
              "NOTE",
              "TASK",
              "OWNER",
              "ENGAGEMENT",
              "ADDRESS",
              "EXTERNAL_LINK",
              "LINE_ITEM",
              "PHONE_NUMBER",
              "VARIANT"
            ],
            "example": "INVOICE"
          },
          "category": {
            "type": "string",
            "enum": [
              "ACCOUNTING",
              "PAYMENTS",
              "ECOMMERCE",
              "CRM",
              "HRIS"
            ],
            "example": "ACCOUNTING"
          },
          "scope_access": {
            "$ref": "#/components/schemas/ScopeAccessModel"
          },
          "enabled": {
            "type": "boolean",
            "example": true
          },
          "sync_from": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "example": "2024-01-01T00:00:00Z"
          }
        },
        "required": [
          "frequency",
          "data_model",
          "category",
          "scope_access",
          "enabled"
        ]
      }
    }
  },
  "security": [
    {
      "api_key": []
    }
  ]
}
