{"openapi":"3.0.3","info":{"title":"Digits Connect API","version":"1.0"},"servers":[{"url":"https://connect.digits.com","description":"Production"}],"paths":{"/v1/company":{"get":{"tags":["CompanyService"],"summary":"Get Company Info","description":"Read endpoint to get company information, including fiscal year start month and earliest transaction date.","operationId":"CompanyService_Get","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Company"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/connection/sources":{"get":{"tags":["ConnectionSourceService"],"summary":"List Sources","description":"List all connection sources.","operationId":"ConnectionSourceService_List","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSourcesResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}},"post":{"tags":["ConnectionSourceService"],"summary":"Sync Sources","description":"Sync endpoint to create, update, and delete connection sources.\n Connection sources organize transactions (for example, by bank account; or to separate bills and invoices)\n Labels allow seamless reference to the chart of accounts within the Ledger.","operationId":"ConnectionSourceService_Sync","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourcesSyncRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourcesSyncResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/ledger/categories":{"get":{"tags":["LedgerCategoryService"],"summary":"List Categories","description":"Fetch the full Chart of Accounts from the Ledger.","operationId":"LedgerCategoryService_List","parameters":[{"name":"createdBefore","in":"query","description":"Filter to categories created before this timestamp","schema":{"type":"string","format":"date-time"}},{"name":"createdAfter","in":"query","description":"Filter to categories created after this timestamp","schema":{"type":"string","format":"date-time"}},{"name":"updatedBefore","in":"query","description":"Filter to categories updated before this timestamp","schema":{"type":"string","format":"date-time"}},{"name":"updatedAfter","in":"query","description":"Filter to categories updated after this timestamp","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCategoriesResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/ledger/category/{id}":{"get":{"tags":["LedgerCategoryService"],"summary":"Get Category","description":"Get a single category by its ID.","operationId":"LedgerCategoryService_Get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Category"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/ledger/department/{id}":{"get":{"tags":["LedgerDepartmentService"],"summary":"Get Department","description":"Get a single ledger department by its ID.","operationId":"LedgerDepartmentService_Get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLedgerDepartmentResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/ledger/departments":{"get":{"tags":["LedgerDepartmentService"],"summary":"List Departments","description":"List ledger departments.","operationId":"LedgerDepartmentService_List","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListLedgerDepartmentsResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/ledger/entries":{"get":{"tags":["LedgerTransactionService"],"summary":"List Entries","description":"List ledger entries.","operationId":"LedgerTransactionService_Entries","parameters":[{"name":"occurredBefore","in":"query","description":"OccurredBefore filters entries to those that occurred before this timestamp","schema":{"type":"string","format":"date-time"}},{"name":"occurredAfter","in":"query","description":"OccurredAfter filters entries to those that occurred after this timestamp","schema":{"type":"string","format":"date-time"}},{"name":"minimumAmount","in":"query","description":"Filters entries to those that exceed the specified minimum amount\n Double formatted for compatibility, only the integer component is used.","schema":{"type":"number","format":"double"}},{"name":"maximumAmount","in":"query","description":"Filters entries to those that are below the specified maximum amount\n Double formatted for compatibility, only the integer component is used.","schema":{"type":"number","format":"double"}},{"name":"currencyCode","in":"query","description":"Currency code. USD-only.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"The number of items to return per request. Default and max size is 100.","schema":{"type":"integer","format":"int32"}},{"name":"cursor","in":"query","description":"Cursor for pagination","schema":{"type":"string"}},{"name":"createdBefore","in":"query","description":"Filter to entries created before this timestamp","schema":{"type":"string","format":"date-time"}},{"name":"createdAfter","in":"query","description":"Filter to entries created after this timestamp","schema":{"type":"string","format":"date-time"}},{"name":"updatedBefore","in":"query","description":"Filter to entries updated before this timestamp","schema":{"type":"string","format":"date-time"}},{"name":"updatedAfter","in":"query","description":"Filter to entries updated after this timestamp","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerEntriesResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/ledger/entries/query":{"post":{"tags":["LedgerTransactionService"],"summary":"Query Entries","description":"Query ledger entries.","operationId":"LedgerTransactionService_QueryEntries","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerEntriesQueryRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerEntriesResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/ledger/location/{id}":{"get":{"tags":["LedgerLocationService"],"summary":"Get Location","description":"Get a single ledger location by its ID.","operationId":"LedgerLocationService_Get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLedgerLocationResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/ledger/locations":{"get":{"tags":["LedgerLocationService"],"summary":"List Locations","description":"List ledger locations.","operationId":"LedgerLocationService_List","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListLedgerLocationsResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/ledger/parties":{"get":{"tags":["LedgerPartyService"],"summary":"List Parties","description":"List ledger parties.","operationId":"LedgerPartyService_List","parameters":[{"name":"name","in":"query","description":"Optional, case-insensitive name filter","schema":{"type":"string"}},{"name":"kinds","in":"query","description":"Party kinds to include, empty returns all kinds","schema":{"type":"array","items":{"enum":["UnknownKind","Person","Business"],"type":"string","format":"enum"}}},{"name":"limit","in":"query","description":"The number of items to return per request. Default and max size is 100.","schema":{"type":"integer","format":"int32"}},{"name":"cursor","in":"query","description":"Cursor for pagination","schema":{"type":"string"}},{"name":"createdBefore","in":"query","description":"Filter to parties created before this timestamp","schema":{"type":"string","format":"date-time"}},{"name":"createdAfter","in":"query","description":"Filter to parties created after this timestamp","schema":{"type":"string","format":"date-time"}},{"name":"updatedBefore","in":"query","description":"Filter to parties updated before this timestamp","schema":{"type":"string","format":"date-time"}},{"name":"updatedAfter","in":"query","description":"Filter to parties updated after this timestamp","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListLedgerPartiesResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/ledger/party/{id}":{"get":{"tags":["LedgerPartyService"],"summary":"Get Party","description":"Get a single ledger party by its ID.","operationId":"LedgerPartyService_Get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLedgerPartyResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/ledger/project/{id}":{"get":{"tags":["LedgerProjectService"],"summary":"Get Project","description":"Get a single ledger project by its ID.","operationId":"LedgerProjectService_Get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLedgerProjectResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/ledger/projects":{"get":{"tags":["LedgerProjectService"],"summary":"List Projects","description":"List ledger projects.","operationId":"LedgerProjectService_List","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListLedgerProjectsResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/ledger/statement/aging/payable":{"get":{"tags":["LedgerStatementsService"],"summary":"A/P Aging","description":"Generate an accounts payable aging report.","operationId":"LedgerStatementsService_APAging","parameters":[{"name":"startDate","in":"query","description":"The start date of the statement period (inclusive)","schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","description":"The end date of the statement period (inclusive)","schema":{"type":"string","format":"date"}},{"name":"interval","in":"query","description":"The interval for the statement (e.g., Month, Quarter, Year)","schema":{"enum":["Month","Year","Quarter"],"type":"string","format":"enum"}},{"name":"fiscalYearStartMonth","in":"query","description":"Optional the fiscal year start month (1 = January, 12 = December)\n defaults to January if not provided","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateStatementResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/ledger/statement/aging/receivable":{"get":{"tags":["LedgerStatementsService"],"summary":"A/R Aging","description":"Generate an accounts receivable aging report.","operationId":"LedgerStatementsService_ARAging","parameters":[{"name":"startDate","in":"query","description":"The start date of the statement period (inclusive)","schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","description":"The end date of the statement period (inclusive)","schema":{"type":"string","format":"date"}},{"name":"interval","in":"query","description":"The interval for the statement (e.g., Month, Quarter, Year)","schema":{"enum":["Month","Year","Quarter"],"type":"string","format":"enum"}},{"name":"fiscalYearStartMonth","in":"query","description":"Optional the fiscal year start month (1 = January, 12 = December)\n defaults to January if not provided","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateStatementResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/ledger/statement/balance-sheet":{"get":{"tags":["LedgerStatementsService"],"summary":"Balance Sheet","description":"Generate a balance sheet statement.","operationId":"LedgerStatementsService_BalanceSheet","parameters":[{"name":"startDate","in":"query","description":"The start date of the statement period (inclusive)","schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","description":"The end date of the statement period (inclusive)","schema":{"type":"string","format":"date"}},{"name":"interval","in":"query","description":"The interval for the statement (e.g., Month, Quarter, Year)","schema":{"enum":["Month","Year","Quarter"],"type":"string","format":"enum"}},{"name":"fiscalYearStartMonth","in":"query","description":"Optional the fiscal year start month (1 = January, 12 = December)\n defaults to January if not provided","schema":{"type":"integer","format":"int32"}},{"name":"departmentIds","in":"query","description":"Optional department identifiers to filter statement totals.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateStatementResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/ledger/statement/cash-flow":{"get":{"tags":["LedgerStatementsService"],"summary":"Cash Flow","description":"Generate a cash flow statement.","operationId":"LedgerStatementsService_CashFlow","parameters":[{"name":"startDate","in":"query","description":"The start date of the statement period (inclusive)","schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","description":"The end date of the statement period (inclusive)","schema":{"type":"string","format":"date"}},{"name":"interval","in":"query","description":"The interval for the statement (e.g., Month, Quarter, Year)","schema":{"enum":["Month","Year","Quarter"],"type":"string","format":"enum"}},{"name":"fiscalYearStartMonth","in":"query","description":"Optional the fiscal year start month (1 = January, 12 = December)\n defaults to January if not provided","schema":{"type":"integer","format":"int32"}},{"name":"departmentIds","in":"query","description":"Optional department identifiers to filter statement totals.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateStatementResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/ledger/statement/profit-and-loss":{"get":{"tags":["LedgerStatementsService"],"summary":"Profit and Loss","description":"Generate a profit and loss statement.","operationId":"LedgerStatementsService_ProfitAndLoss","parameters":[{"name":"startDate","in":"query","description":"The start date of the statement period (inclusive)","schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","description":"The end date of the statement period (inclusive)","schema":{"type":"string","format":"date"}},{"name":"interval","in":"query","description":"The interval for the statement (e.g., Month, Quarter, Year)","schema":{"enum":["Month","Year","Quarter"],"type":"string","format":"enum"}},{"name":"fiscalYearStartMonth","in":"query","description":"Optional the fiscal year start month (1 = January, 12 = December)\n defaults to January if not provided","schema":{"type":"integer","format":"int32"}},{"name":"departmentIds","in":"query","description":"Optional department identifiers to filter statement totals.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateStatementResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/ledger/statement/trial-balance":{"get":{"tags":["LedgerStatementsService"],"summary":"Trial Balance","description":"Generate a trial balance statement.","operationId":"LedgerStatementsService_TrialBalance","parameters":[{"name":"startDate","in":"query","description":"The start date of the statement period (inclusive)","schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","description":"The end date of the statement period (inclusive)","schema":{"type":"string","format":"date"}},{"name":"interval","in":"query","description":"The interval for the statement (e.g., Month, Quarter, Year)","schema":{"enum":["Month","Year","Quarter"],"type":"string","format":"enum"}},{"name":"fiscalYearStartMonth","in":"query","description":"Optional the fiscal year start month (1 = January, 12 = December)\n defaults to January if not provided","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateStatementResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/ledger/summary":{"get":{"tags":["LedgerSummaryService"],"summary":"Get Summary","description":"Get a summary of ledger transactions.","operationId":"LedgerSummaryService_Summarize","parameters":[{"name":"comingSoon","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerSummaryResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/ledger/transaction/{id}":{"get":{"tags":["LedgerTransactionService"],"summary":"Get Transaction","description":"Get a ledger transaction by its ID.","operationId":"LedgerTransactionService_GetTransaction","parameters":[{"name":"id","in":"path","description":"The digits ledger transaction id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLedgerTransactionResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/oauth/token":{"post":{"tags":["AuthorizationService"],"summary":"Token Exchange","description":"Exchange an authorization code for a refresh token, or a refresh token for a new access token.","operationId":"AuthorizationService_Token","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}},"security":[{}]}},"/v1/organization":{"get":{"tags":["OrganizationService"],"summary":"Get Organization","description":"Returns the caller's organization, including its Digits-assigned ID and,\n when set, its caller-assigned ID.","operationId":"OrganizationService_Get","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/organization/client":{"post":{"tags":["OrganizationClientService"],"summary":"Create Client","description":"Provision a new client organization with one or more entities. The client\n and entity objects are created synchronously, but data provisioning for\n each entity completes asynchronously.\n\n Requires scope: `organization:sync`.","operationId":"OrganizationClientService_Create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateClientRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Business"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/organization/client/employee":{"put":{"tags":["ClientEmployeeService"],"summary":"Update Client Employee","description":"Replace a client employee's access within a client organization. The client\n employee binding must already exist and be active. If it does not exist or\n is not active, the request fails with NotFound; use Create Client Employee\n to create or reactivate access. This operation is synchronous and\n declarative: the client employee's organization role and entity-role\n bindings within this client organization are replaced by the request body.\n\n Requires scope: `organization:sync`.","operationId":"ClientEmployeeService_UpdateClientEmployee","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateClientEmployeeRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Employee"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/organization/client/{id}":{"get":{"tags":["OrganizationClientService"],"summary":"Get Client","description":"Get a single client organization by its Digits-assigned ID.","operationId":"OrganizationClientService_Get","parameters":[{"name":"id","in":"path","description":"Client organization's Digits-assigned ID.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Business"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}},"delete":{"tags":["OrganizationClientService"],"summary":"Delete Client","description":"Delete a client organization managed by the caller's organization. The\n client organization and its entities are removed. Employee bindings in the\n client organization and entity-role bindings on the client's entities are\n removed. Users are not deleted.\n\n Requires scope: `organization:sync`.","operationId":"OrganizationClientService_Delete","parameters":[{"name":"id","in":"path","description":"Client organization's Digits-assigned ID.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteClientResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/organization/client/{id}/employee":{"post":{"tags":["ClientEmployeeService"],"summary":"Create Client Employee","description":"Create or reactivate a client employee's access to a client organization. Both the\n user and client organization must already exist. This operation is synchronous.\n If the client employee binding already exists and is active, the request fails with\n AlreadyExists; use Update Client Employee to fully replace access for an\n active employee binding. When reactivating a client employee, supplied roles are\n applied and access omitted from the request is not removed.\n\n Requires scope: `organization:sync`.","operationId":"ClientEmployeeService_CreateClientEmployee","parameters":[{"name":"id","in":"path","description":"Client organization's Digits-assigned ID.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateClientEmployeeRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Employee"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/organization/client/{id}/employee/{userId}":{"get":{"tags":["ClientEmployeeService"],"summary":"Get Client Employee","description":"Get a single client employee within a client organization by their Digits-assigned user ID.","operationId":"ClientEmployeeService_GetClientEmployee","parameters":[{"name":"id","in":"path","description":"Client organization's Digits-assigned ID.","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","description":"User's Digits-assigned ID.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Employee"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}},"delete":{"tags":["ClientEmployeeService"],"summary":"Delete Client Employee","description":"Remove a client employee's access to a client organization. Removes the\n client employee binding in the client organization and entity-role bindings\n for that client's entities. The underlying user and affiliation/client roles\n are not deleted.\n\n Requires scope: `organization:sync`.","operationId":"ClientEmployeeService_DeleteClientEmployee","parameters":[{"name":"id","in":"path","description":"Client organization's Digits-assigned ID.","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","description":"User's Digits-assigned ID.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteClientEmployeeResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/organization/client/{id}/employees":{"get":{"tags":["ClientEmployeeService"],"summary":"List Client Employees","description":"List all client employees with access to a client organization.","operationId":"ClientEmployeeService_ListClientEmployees","parameters":[{"name":"id","in":"path","description":"Client organization's Digits-assigned ID.","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"The number of items to return per request. Default and max size is 100.","schema":{"type":"integer","format":"int32"}},{"name":"cursor","in":"query","description":"Cursor for pagination.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEmployeesResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/organization/client/{id}/entities":{"get":{"tags":["ClientEntityService"],"summary":"List Client Entities","description":"List all entities within a client organization.","operationId":"ClientEntityService_ListEntities","parameters":[{"name":"id","in":"path","description":"Client organization's Digits-assigned ID.","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"The number of items to return per request. Default and max size is 100.","schema":{"type":"integer","format":"int32"}},{"name":"cursor","in":"query","description":"Cursor for pagination.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEntitiesResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/organization/client/{id}/entity":{"post":{"tags":["ClientEntityService"],"summary":"Create Client Entity","description":"Create a new entity within a client organization. The entity object is created\n synchronously, but data provisioning completes asynchronously.\n\n Requires scope: `organization:sync`.","operationId":"ClientEntityService_CreateEntity","parameters":[{"name":"id","in":"path","description":"Client organization's Digits-assigned ID.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateClientEntityRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Entity"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/organization/client/{id}/entity/{entityId}":{"get":{"tags":["ClientEntityService"],"summary":"Get Client Entity","description":"Get a single entity within a client organization by its Digits-assigned ID.","operationId":"ClientEntityService_GetEntity","parameters":[{"name":"id","in":"path","description":"Client organization's Digits-assigned ID.","required":true,"schema":{"type":"string"}},{"name":"entityId","in":"path","description":"Entity's Digits-assigned ID.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Entity"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}},"delete":{"tags":["ClientEntityService"],"summary":"Delete Client Entity","description":"Delete an entity within a client organization. Removes all employee\n entity-role bindings for this entity.\n\n Requires scope: `organization:sync`.","operationId":"ClientEntityService_DeleteEntity","parameters":[{"name":"id","in":"path","description":"Client organization's Digits-assigned ID.","required":true,"schema":{"type":"string"}},{"name":"entityId","in":"path","description":"Entity's Digits-assigned ID.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteClientEntityResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/organization/clients":{"get":{"tags":["OrganizationClientService"],"summary":"List Clients","description":"List all client organizations affiliated with the organization.","operationId":"OrganizationClientService_List","parameters":[{"name":"limit","in":"query","description":"The number of items to return per request. Default and max size is 100.","schema":{"type":"integer","format":"int32"}},{"name":"cursor","in":"query","description":"Cursor for pagination.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListClientsResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}},"post":{"tags":["OrganizationClientService"],"summary":"Bulk Create Clients","description":"Provision multiple client organizations in a single request. Maximum 100\n entities total across all clients per request. Each client is created\n synchronously, but entity data provisioning completes asynchronously.\n\n Requires scope: `organization:sync`.","operationId":"OrganizationClientService_BulkCreate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateClientsRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateClientsResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/organization/clients/delete":{"post":{"tags":["OrganizationClientService"],"summary":"Bulk Delete Clients","description":"Delete multiple client organizations by Digits-assigned ID or caller-assigned ID.\n Maximum 100 per request. Client organizations and their entities are removed.\n Employee bindings in each client organization and entity-role bindings on\n each client's entities are removed. Users are not deleted.\n\n Requires scope: `organization:sync`.","operationId":"OrganizationClientService_BulkDelete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteClientsRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteClientsResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/organization/clients/employees":{"post":{"tags":["ClientEmployeeService"],"summary":"Bulk Create Client Employees","description":"Create or reactivate multiple client employees' access across multiple client organizations in a single request.\n Users and client organizations must already exist. This operation is synchronous. An\n entry for an already-active employee binding succeeds without changing\n access when the request matches existing access; otherwise, that entry\n fails with AlreadyExists. Use Update Client Employee to fully replace\n access for active employee bindings. When reactivating an employee,\n supplied roles are applied and access omitted from the entry is not\n removed.\n\n Requires scope: `organization:sync`.","operationId":"ClientEmployeeService_BulkCreateClientEmployees","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateClientEmployeesRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateClientEmployeesResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/organization/clients/employees/delete":{"post":{"tags":["ClientEmployeeService"],"summary":"Bulk Delete Client Employees","description":"Remove employee access across multiple client organizations by Digits-assigned\n user ID or caller-assigned user ID. Maximum 100 per request. Removes matching\n client employee bindings and entity-role bindings for those clients'\n entities. Underlying users and affiliation/client roles are not deleted.\n\n Requires scope: `organization:sync`.","operationId":"ClientEmployeeService_BulkDeleteClientEmployees","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteClientEmployeesRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteClientEmployeesResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/organization/clients/entities/delete":{"post":{"tags":["ClientEntityService"],"summary":"Bulk Delete Client Entities","description":"Delete multiple client entities by Digits-assigned ID or caller-assigned ID.\n Maximum 100 per request. Removes all employee entity-role bindings\n for the specified entities.\n\n Requires scope: `organization:sync`.","operationId":"ClientEntityService_BulkDeleteEntities","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteClientEntitiesRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteClientEntitiesResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/organization/clients/payment-instruments":{"post":{"tags":["ClientPaymentInstrumentService"],"summary":"Create Client Payment Instrument","description":"Create or update a payment instrument owned by a client entity.","operationId":"ClientPaymentInstrumentService_Create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateClientPaymentInstrumentRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentInstrument"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/organization/clients/payment-instruments/delete":{"post":{"tags":["ClientPaymentInstrumentService"],"summary":"Delete Client Payment Instruments","description":"Delete client payment instruments by Digits-assigned or caller-assigned IDs. Unknown IDs are skipped.\n A deleted payment instrument becomes unavailable for any future payments; any in-flight payments continue to use it.","operationId":"ClientPaymentInstrumentService_Delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteClientPaymentInstrumentsRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletePaymentInstrumentsResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/organization/clients/payment-instruments/query":{"post":{"tags":["ClientPaymentInstrumentService"],"summary":"Query Client Payment Instruments","description":"Find client payment instruments by Digits-assigned or caller-assigned IDs.","operationId":"ClientPaymentInstrumentService_Query","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryClientPaymentInstrumentsRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryPaymentInstrumentsResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/organization/employee":{"put":{"tags":["OrganizationEmployeeService"],"summary":"Update Employee","description":"Fully replace an employee binding. The user must already exist and have an\n active employee binding. The request must identify the employee by\n Digits-assigned ID or caller-assigned user ID,\n include the employee's organization role, and may include entity access\n (`entities` and/or `entityRole`), client access (`clients` and/or `clientRole`),\n or both.\n `entityRole` and `clientRole` are stored as employee-level defaults for future\n entities or client entities and are applied to current access unless\n explicit `entities` or `clients` entries override them.\n\n Access omitted from the request is removed.\n\n Requires scope: `organization:sync`.","operationId":"OrganizationEmployeeService_Update","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmployeeRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Employee"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}},"post":{"tags":["OrganizationEmployeeService"],"summary":"Create Employee","description":"Create or reactivate an employee binding. The user must already exist (either\n provisioned via SSO or as an existing Digits user). This operation is synchronous.\n If the employee binding already exists and is active, the request fails with\n AlreadyExists; use Update Employee to fully replace access for an active\n employee binding. When reactivating an employee, supplied roles are applied\n and access omitted from the request is not removed.\n\n Requires scope: `organization:sync`.","operationId":"OrganizationEmployeeService_Create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmployeeRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Employee"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/organization/employee/{id}":{"get":{"tags":["OrganizationEmployeeService"],"summary":"Get Employee","description":"Get a single employee by their Digits-assigned ID.","operationId":"OrganizationEmployeeService_Get","parameters":[{"name":"id","in":"path","description":"User's Digits-assigned ID.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Employee"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}},"delete":{"tags":["OrganizationEmployeeService"],"summary":"Delete Employee","description":"Delete an employee binding in the caller's organization. Removes all of the\n employee's entity-role and client-role bindings. The underlying user is not deleted.\n\n Requires scope: `organization:sync`.","operationId":"OrganizationEmployeeService_Delete","parameters":[{"name":"id","in":"path","description":"User's Digits-assigned ID.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteEmployeeResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/organization/employees":{"get":{"tags":["OrganizationEmployeeService"],"summary":"List Employees","description":"List all employees in the organization.","operationId":"OrganizationEmployeeService_List","parameters":[{"name":"limit","in":"query","description":"The number of items to return per request. Default and max size is 100.","schema":{"type":"integer","format":"int32"}},{"name":"cursor","in":"query","description":"Cursor for pagination.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEmployeesResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/organization/employees/delete":{"post":{"tags":["OrganizationEmployeeService"],"summary":"Bulk Delete Employees","description":"Delete multiple employee bindings by Digits-assigned user ID or caller-assigned\n user ID. Maximum 100 per request. Deletes matching employee bindings and removes\n their entity-role and client-role bindings. Underlying users are not deleted.\n\n Requires scope: `organization:sync`.","operationId":"OrganizationEmployeeService_BulkDelete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteEmployeesRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteEmployeesResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/organization/entities":{"get":{"tags":["OrganizationEntityService"],"summary":"List Entities","description":"List all entities in the organization.","operationId":"OrganizationEntityService_List","parameters":[{"name":"limit","in":"query","description":"The number of items to return per request. Default and max size is 100.","schema":{"type":"integer","format":"int32"}},{"name":"cursor","in":"query","description":"Cursor for pagination.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEntitiesResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/organization/entities/payment-instruments":{"post":{"tags":["EntityPaymentInstrumentService"],"summary":"Create Entity Payment Instrument","description":"Create or update a payment instrument owned by an organization entity. The entity's first instrument\n becomes its default funding instrument; an existing default is never overwritten.","operationId":"EntityPaymentInstrumentService_Create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEntityPaymentInstrumentRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentInstrument"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/organization/entities/payment-instruments/delete":{"post":{"tags":["EntityPaymentInstrumentService"],"summary":"Delete Entity Payment Instruments","description":"Delete entity payment instruments by Digits-assigned or caller-assigned IDs. Unknown IDs are skipped.\n A deleted payment instrument becomes unavailable for any future payments; any in-flight payments continue to use it.","operationId":"EntityPaymentInstrumentService_Delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteEntityPaymentInstrumentsRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletePaymentInstrumentsResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/organization/entities/payment-instruments/query":{"post":{"tags":["EntityPaymentInstrumentService"],"summary":"Query Entity Payment Instruments","description":"Find entity payment instruments by Digits-assigned or caller-assigned IDs.","operationId":"EntityPaymentInstrumentService_Query","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryEntityPaymentInstrumentsRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryPaymentInstrumentsResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/organization/entity":{"post":{"tags":["OrganizationEntityService"],"summary":"Create Entity","description":"Create a new entity within the organization. The entity object is created\n synchronously, but data provisioning (chart of accounts, etc.) completes\n asynchronously.\n\n Requires scope: `organization:sync`.","operationId":"OrganizationEntityService_Create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEntityRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Entity"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/organization/entity/{id}":{"get":{"tags":["OrganizationEntityService"],"summary":"Get Entity","description":"Get a single entity by its Digits-assigned ID.","operationId":"OrganizationEntityService_Get","parameters":[{"name":"id","in":"path","description":"Entity's Digits-assigned ID.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Entity"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}},"delete":{"tags":["OrganizationEntityService"],"summary":"Delete Entity","description":"Delete an entity. Deleting an entity also removes all employee access\n bindings for that entity.\n\n Requires scope: `organization:sync`.","operationId":"OrganizationEntityService_Delete","parameters":[{"name":"id","in":"path","description":"Entity's Digits-assigned ID.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteEntityResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/source/departments":{"get":{"tags":["SourceDepartmentService"],"summary":"List Departments","description":"List the departments provided by this source.","operationId":"SourceDepartmentService_List","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSourceDepartmentsResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}},"post":{"tags":["SourceDepartmentService"],"summary":"Sync Departments","description":"Batch sync endpoint to create, update, and delete departments.\n Idempotence and deduplication is handled via the external_id field on each department.","operationId":"SourceDepartmentService_Sync","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncDepartmentsRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncDepartmentsResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/source/locations":{"get":{"tags":["SourceLocationService"],"summary":"List Locations","description":"List the locations provided by this source.","operationId":"SourceLocationService_List","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSourceLocationsResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}},"post":{"tags":["SourceLocationService"],"summary":"Sync Locations","description":"Batch sync endpoint to create, update, and delete locations.\n Idempotence and deduplication is handled via the external_id field on each location.","operationId":"SourceLocationService_Sync","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncLocationsRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncLocationsResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/source/metrics":{"post":{"tags":["SourceMetricService"],"summary":"Store Samples","description":"Batch endpoint to store time series metric samples.","operationId":"SourceMetricService_Store","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricsBatchRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricsBatchResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/source/parties":{"get":{"tags":["SourcePartyService"],"summary":"List Parties","description":"List the parties provided by this source.","operationId":"SourcePartyService_List","parameters":[{"name":"externalIds","in":"query","description":"Optional filter by external IDs","schema":{"type":"array","items":{"type":"string"}}},{"name":"limit","in":"query","description":"The number of items to return per request","schema":{"type":"integer","format":"int32"}},{"name":"cursor","in":"query","description":"Cursor for pagination","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSourcePartiesResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}},"post":{"tags":["SourcePartyService"],"summary":"Sync Parties","description":"Batch sync endpoint to create, update, and delete parties.\n Idempotence and deduplication is handled via the external_id field on each party.","operationId":"SourcePartyService_Sync","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncPartiesRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncPartiesResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/source/products":{"get":{"tags":["SourceProductService"],"summary":"List Products","description":"List the products provided by this source.","operationId":"SourceProductService_List","parameters":[{"name":"externalIds","in":"query","description":"Optional filter by external IDs.","schema":{"type":"array","items":{"type":"string"}}},{"name":"limit","in":"query","description":"The number of items to return per request.","schema":{"type":"integer","format":"int32"}},{"name":"cursor","in":"query","description":"Cursor for pagination.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSourceProductsResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}},"post":{"tags":["SourceProductService"],"summary":"Sync Products","description":"Batch sync endpoint to create, update, and delete products.\n Idempotence and deduplication is handled via the external_id field on each product.","operationId":"SourceProductService_Sync","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncProductsRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncProductsResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/source/projects":{"get":{"tags":["SourceProjectService"],"summary":"List Projects","description":"List the projects provided by this source.","operationId":"SourceProjectService_List","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSourceProjectsResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}},"post":{"tags":["SourceProjectService"],"summary":"Sync Projects","description":"Batch sync endpoint to create, update, and delete projects.\n Idempotence and deduplication is handled via the external_id field on each project.","operationId":"SourceProjectService_Sync","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncProjectsRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncProjectsResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/source/transactions":{"post":{"tags":["SourceTransactionService"],"summary":"Sync Transactions","description":"Batch sync endpoint to create or update transactions.\n Idempotence and deduplication is handled via the external_id field on each transaction.","operationId":"SourceTransactionService_Sync","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionSyncRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionSyncResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}},"delete":{"tags":["SourceTransactionService"],"summary":"Delete Transactions","description":"Delete transactions by external ID.","operationId":"SourceTransactionService_Delete","parameters":[{"name":"sourceId","in":"query","description":"The connection account that the transactions belong to","schema":{"type":"string"}},{"name":"externalId","in":"query","description":"The transactions to be deleted by external ID","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionDeleteResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/sso":{"get":{"tags":["SSOConfigService"],"summary":"Get SSO Config","description":"Returns the SSO configuration for the organization. The organization must\n have SSO previously configured.","operationId":"SSOConfigService_Get","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SSOConfig"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/sso/audit":{"get":{"tags":["SSOAuditService"],"summary":"Audit SSO Users","description":"Audit all SSO users in the organization with their current client organization access.","operationId":"SSOAuditService_Audit","parameters":[{"name":"limit","in":"query","description":"The number of items to return per request. Default and max size is 100.","schema":{"type":"integer","format":"int32"}},{"name":"cursor","in":"query","description":"Cursor for pagination.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditSSOUsersResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/sso/user":{"post":{"tags":["SSOUserService"],"summary":"Create SSO User","description":"Create a new SSO user. The organization must have SSO configured. A deleted\n user is reactivated when recreated by the same identity provider, whether\n under the previous subject identifier or a new one. Recreation from a\n different identity provider is rejected. Returns the Digits-assigned ID and\n caller-assigned ID mapping. This operation is synchronous.\n\n Requires scope: `user:sync`.","operationId":"SSOUserService_Create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSSOUserRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SSOUserMapping"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/sso/user/{id}":{"get":{"tags":["SSOUserService"],"summary":"Get SSO User","description":"Get a single SSO user by their Digits-assigned ID. The organization must have SSO\n configured.","operationId":"SSOUserService_Get","parameters":[{"name":"id","in":"path","description":"User's Digits-assigned ID.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SSOUser"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}},"delete":{"tags":["SSOUserService"],"summary":"Delete SSO User","description":"Delete an SSO user. The organization must have SSO configured. Removes the\n user and their employee and entity access from the organization and its client\n organizations. This operation is synchronous.\n\n Requires scope: `user:sync`.","operationId":"SSOUserService_Delete","parameters":[{"name":"id","in":"path","description":"User's Digits-assigned ID.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSSOUserResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/sso/users":{"get":{"tags":["SSOUserService"],"summary":"List SSO Users","description":"List all SSO users in the organization. The organization must have SSO\n configured.","operationId":"SSOUserService_List","parameters":[{"name":"limit","in":"query","description":"The number of items to return per request. Default and max size is 100.","schema":{"type":"integer","format":"int32"}},{"name":"cursor","in":"query","description":"Cursor for pagination.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSSOUsersResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/sso/users/delete":{"post":{"tags":["SSOUserService"],"summary":"Bulk Delete SSO Users","description":"Delete multiple SSO users by Digits-assigned ID or caller-assigned ID. The\n organization must have SSO configured. Removes each user and their employee\n and entity access from the organization and its client organizations. This\n operation is synchronous.\n\n Requires scope: `user:sync`.","operationId":"SSOUserService_BulkDelete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteSSOUsersRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteSSOUsersResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/workflow/bills/approve":{"post":{"tags":["WorkflowBillService"],"summary":"Approve Workflow Bills","description":"Approve one or more bills awaiting approval.\n\n Requires scope: `bills:manage`.","operationId":"WorkflowBillService_Approve","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveWorkflowBillsRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveWorkflowBillsResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/workflow/bills/delete":{"post":{"tags":["WorkflowBillService"],"summary":"Delete Workflow Bills","description":"Delete one or more pre-approval bills.\n\n Requires scope: `bills:manage`.","operationId":"WorkflowBillService_Delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteWorkflowBillsRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteWorkflowBillsResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/workflow/bills/get":{"post":{"tags":["WorkflowBillService"],"summary":"Get Workflow Bill","description":"Get a workflow bill by its Digits-assigned ID.\n\n Requires scope: `bills:manage`.","operationId":"WorkflowBillService_Get","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWorkflowBillRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowBill"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/workflow/bills/pay":{"post":{"tags":["WorkflowBillService"],"summary":"Pay Workflow Bills","description":"Pay one or more approved bills, either through Digits-managed payment rails or by recording an external/manual payment.\n\n Requires scope: `bills:manage`.","operationId":"WorkflowBillService_Pay","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayWorkflowBillsRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayWorkflowBillsResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/workflow/bills/payment-status":{"post":{"tags":["WorkflowBillService"],"summary":"Update Workflow Bill Payment Status","description":"Report externally managed payment lifecycle updates for one or more bills.\n\n Requires scope: `bills:manage`.","operationId":"WorkflowBillService_UpdatePaymentStatus","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkflowBillPaymentStatusRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkflowBillPaymentStatusResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/workflow/bills/query":{"post":{"tags":["WorkflowBillService"],"summary":"Query Workflow Bills","description":"Query workflow bills visible to the caller.\n\n Requires scope: `bills:manage`.","operationId":"WorkflowBillService_Query","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListWorkflowBillsRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListWorkflowBillsResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/workflow/bills/reject":{"post":{"tags":["WorkflowBillService"],"summary":"Reject Workflow Bills","description":"Reject one or more bills awaiting approval.\n\n Requires scope: `bills:manage`.","operationId":"WorkflowBillService_Reject","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectWorkflowBillsRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectWorkflowBillsResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/workflow/bills/submit":{"post":{"tags":["WorkflowBillService"],"summary":"Submit Workflow Bills","description":"Submit one or more draft bills for approval.\n\n Requires scope: `bills:manage`.","operationId":"WorkflowBillService_Submit","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitWorkflowBillsRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitWorkflowBillsResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/v1/workflow/bills/void":{"post":{"tags":["WorkflowBillService"],"summary":"Void Workflow Bills","description":"Void one or more eligible bills.\n\n Requires scope: `bills:manage`.","operationId":"WorkflowBillService_Void","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoidWorkflowBillsRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoidWorkflowBillsResponse"}}}},"default":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}}},"components":{"schemas":{"Address":{"type":"object","properties":{"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code."}}},"AgingSummary":{"type":"object","properties":{"current":{"$ref":"#/components/schemas/Currency"},"oneToThirty":{"$ref":"#/components/schemas/Currency"},"thirtyOneToSixty":{"$ref":"#/components/schemas/Currency"},"sixtyOneToNinety":{"$ref":"#/components/schemas/Currency"},"older":{"$ref":"#/components/schemas/Currency"}}},"ApproveWorkflowBill":{"required":["billId"],"type":"object","properties":{"billId":{"type":"string","description":"Bill's Digits-assigned identifier."},"userId":{"type":"string"},"userExternalId":{"type":"string"}},"description":"ApproveWorkflowBill identifies one bill to approve and the user approving it."},"ApproveWorkflowBillsRequest":{"required":["entity","bills"],"type":"object","properties":{"entity":{"allOf":[{"$ref":"#/components/schemas/WorkflowEntitySelector"}],"description":"Client organization and entity that owns the bills."},"bills":{"type":"array","items":{"$ref":"#/components/schemas/ApproveWorkflowBill"},"description":"Bills to approve. If any bill cannot be approved, the request fails and no bills are approved."}},"description":"ApproveWorkflowBillsRequest approves a batch of bills awaiting approval."},"ApproveWorkflowBillsResponse":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/BillWorkflowActionResult"},"description":"One result per requested bill, in the same order as the request."}},"description":"ApproveWorkflowBillsResponse returns the approved bills and their updated workflow statuses."},"AuditSSOUsersResponse":{"type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/components/schemas/SSOAuditUser"}},"next":{"$ref":"#/components/schemas/Page"}}},"BankAccount":{"type":"object","properties":{"accountType":{"enum":["Unknown","Checking","Savings"],"type":"string","description":"The type of bank account used by the payment instrument.","format":"enum"},"accountHolderName":{"type":"string","description":"The account holder name for the payment instrument."},"institutionName":{"type":"string","description":"The bank institution name, when known."},"wire":{"allOf":[{"$ref":"#/components/schemas/BankAccount_Routing"}],"description":"Wire transfer routing details for the bank account, when wire payments are supported."},"ach":{"allOf":[{"$ref":"#/components/schemas/BankAccount_Routing"}],"description":"ACH routing details for the bank account, when ACH payments are supported."}},"description":"BankAccount describes masked bank account details for a payment instrument."},"BankAccountRequest":{"required":["accountType","accountHolderName"],"type":"object","properties":{"accountType":{"enum":["Unknown","Checking","Savings"],"type":"string","description":"The type of bank account used by the payment instrument.","format":"enum"},"accountHolderName":{"type":"string","description":"The account holder name for the payment instrument."},"institutionName":{"type":"string","description":"The bank institution name, when known."},"ach":{"allOf":[{"$ref":"#/components/schemas/BankAccountRequest_AchRouting"}],"description":"ACH routing details for the bank account."}},"description":"BankAccountRequest describes raw bank account details for a payment instrument.\n Provide routing details for exactly one payment rail; ach is the only rail\n currently supported."},"BankAccountRequest_AchRouting":{"required":["routingNumber","accountNumber"],"type":"object","properties":{"routingNumber":{"type":"string","description":"ABA routing number for the bank account. This value is write-only and is never returned."},"accountNumber":{"type":"string","description":"Bank account number for the payment instrument. This value is write-only and is never returned."}},"description":"AchRouting contains write-only ACH bank routing details."},"BankAccount_Routing":{"type":"object","properties":{"routingMask":{"type":"string","description":"ABA routing mask for the bank account."},"accountMask":{"type":"string","description":"Bank account mask for the payment instrument."}},"description":"BankAccountRoutingMask contains masked bank routing details for a payment rail."},"Bill":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the bill"},"invoiceNumber":{"type":"string","description":"The invoice number associated with this bill"},"billDate":{"type":"string","description":"The date the bill was issued","format":"date-time"},"dueDate":{"type":"string","description":"The due date for the bill","format":"date-time"}}},"BillLineItem":{"type":"object","properties":{"id":{"type":"string","description":"Line item's Digits-assigned ID."},"externalId":{"allOf":[{"$ref":"#/components/schemas/Identifier"}],"description":"Line item's caller- or source-assigned ID, when the bill came from an external source."},"position":{"type":"integer","description":"One-based display position for this line item within the bill.","format":"int32"},"name":{"type":"string","description":"Short line item name."},"description":{"type":"string","description":"Longer line item description."},"amount":{"allOf":[{"$ref":"#/components/schemas/Currency"}],"description":"Line item amount."},"quantity":{"type":"number","description":"Quantity for this line item.","format":"double"},"unitPrice":{"allOf":[{"$ref":"#/components/schemas/Currency"}],"description":"Unit price for this line item."},"categoryId":{"type":"string","description":"Ledger category ID applied to this line item."},"departmentId":{"type":"string","description":"Ledger department ID applied to this line item."},"locationId":{"type":"string","description":"Ledger location ID applied to this line item."},"productId":{"type":"string","description":"Product ID applied to this line item."}},"description":"BillLineItem describes one accounting line item on a workflow bill."},"BillRef":{"required":["externalId"],"type":"object","properties":{"externalId":{"allOf":[{"$ref":"#/components/schemas/Identifier"}],"description":"ExternalID references the original ID in the source system."}},"description":"BillRef represents a reference to a bill by its external identifier."},"BillVendor":{"type":"object","properties":{"partyId":{"type":"string","description":"Vendor's Digits-assigned party ID, when matched to a ledger party."},"externalId":{"allOf":[{"$ref":"#/components/schemas/Identifier"}],"description":"Vendor's caller- or source-assigned ID, when available."},"name":{"type":"string","description":"Vendor display name."},"email":{"type":"string","description":"Vendor email address used for bill payment workflows."},"address":{"allOf":[{"$ref":"#/components/schemas/Address"}],"description":"Vendor mailing address, when known."},"paymentInstruments":{"type":"array","items":{"$ref":"#/components/schemas/DestinationPaymentInstrument"},"description":"Destination payment instruments available for sending payments to this vendor."}},"description":"BillVendor describes the vendor or payee for a workflow bill."},"BillWorkflowActionResult":{"type":"object","properties":{"billId":{"type":"string","description":"Bill's Digits-assigned identifier."},"status":{"enum":["Unknown","Ingesting","Draft","AwaitingApproval","Approved","ProcessingPayment","Paid","Deleted","Rejected","Voided","Failed","Refunded","MarkAsPaid","ScheduledToBeSentForApproval"],"type":"string","description":"Bill's public workflow status after the requested action completed.","format":"enum"}},"description":"BillWorkflowActionResult describes the post-action state of a bill."},"BulkCreateClientEmployeesRequest":{"required":["employees"],"type":"object","properties":{"employees":{"type":"array","items":{"$ref":"#/components/schemas/ClientEmployeeInput"},"description":"Employee relationships to create or reactivate across clients."}},"description":"Request to create or reactivate employee bindings across clients."},"BulkCreateClientEmployeesResponse":{"type":"object","properties":{"employees":{"type":"array","items":{"$ref":"#/components/schemas/Employee"}}}},"BulkCreateClientsRequest":{"required":["clients"],"type":"object","properties":{"clients":{"type":"array","items":{"$ref":"#/components/schemas/CreateClientRequest"},"description":"Batch of clients to create."}},"description":"Request to create multiple client organizations. Maximum 100 entities total\n across all clients per request."},"BulkCreateClientsResponse":{"type":"object","properties":{"clients":{"type":"array","items":{"$ref":"#/components/schemas/Business"}}}},"BulkDeleteClientEmployeesRequest":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Users' Digits-assigned IDs."},"externalIds":{"type":"array","items":{"type":"string"},"description":"Users' caller-assigned IDs."}},"description":"Identify employee bindings to remove by Digits-assigned user ID or caller-assigned user ID.\n Provide `ids`, `externalIds`, or both."},"BulkDeleteClientEmployeesResponse":{"type":"object","properties":{"deletedCount":{"type":"integer","description":"Number of unique client organization employee bindings deleted.","format":"int32"}}},"BulkDeleteClientEntitiesRequest":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Client entities' Digits-assigned IDs."},"externalIds":{"type":"array","items":{"type":"string"},"description":"Client entities' caller-assigned IDs."}},"description":"Identify client entities to remove by Digits-assigned IDs or caller-assigned IDs.\n Provide `ids`, `externalIds`, or both."},"BulkDeleteClientEntitiesResponse":{"type":"object","properties":{"deletedCount":{"type":"integer","description":"Number of entities removed.","format":"int32"}}},"BulkDeleteClientsRequest":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Client organizations' Digits-assigned IDs."},"externalIds":{"type":"array","items":{"type":"string"},"description":"Client organizations' caller-assigned IDs."}},"description":"Identify client organizations to delete by Digits-assigned IDs or caller-assigned IDs.\n Provide `ids`, `externalIds`, or both."},"BulkDeleteClientsResponse":{"type":"object","properties":{"deletedCount":{"type":"integer","description":"Number of client organizations deleted.","format":"int32"}}},"BulkDeleteEmployeesRequest":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Users' Digits-assigned IDs."},"externalIds":{"type":"array","items":{"type":"string"},"description":"Users' caller-assigned IDs."}},"description":"Identify employees to delete by Digits-assigned user ID or caller-assigned user ID.\n Provide `ids`, `externalIds`, or both."},"BulkDeleteEmployeesResponse":{"type":"object","properties":{"deletedCount":{"type":"integer","description":"Number of employee bindings deleted.","format":"int32"}}},"BulkDeleteSSOUsersRequest":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"SSO users' Digits-assigned IDs."},"externalIds":{"type":"array","items":{"type":"string"},"description":"SSO users' caller-assigned IDs — their SSO identity provider IDs."}},"description":"Identify SSO users to delete by Digits-assigned ID or caller-assigned ID. Provide\n `ids`, `externalIds`, or both. Deleting an SSO user removes their employee and\n entity access from the organization and its client organizations."},"BulkDeleteSSOUsersResponse":{"type":"object","properties":{"deletedCount":{"type":"integer","description":"Number of SSO users removed.","format":"int32"}}},"Business":{"type":"object","properties":{"organization":{"allOf":[{"$ref":"#/components/schemas/Organization"}],"description":"The client organization."},"entities":{"type":"array","items":{"$ref":"#/components/schemas/Entity"},"description":"Legal entities within the client."}},"description":"A client organization and its entities."},"Category":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parentId":{"type":"string"},"displayNumber":{"type":"string"},"active":{"type":"boolean"},"type":{"enum":["UnknownType","Assets","Liabilities","Equity","Income","Expenses","CostOfGoodsSold","OtherIncome","OtherExpenses"],"type":"string","format":"enum"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"subtype":{"enum":["UnknownSubtype","Payroll","Pending","AccountsReceivable","AccruedRevenue","AssetClearing","BankAccounts","FixedAssets","Goodwill","IntangibleAssets","Inventory","Investments","OtherCurrentAssets","OtherLongTermAssets","PrepaidExpenses","ShareholderLoans","UncategorizedAssets","AccountsPayable","AccruedExpenses","ConvertibleNotes","CreditCards","DeferredRevenue","LiabilityClearing","LongTermDebt","OtherCurrentLiabilities","OtherLongTermLiabilities","ShortTermDebt","AdditionalPaidInCapital","CommonStock","OtherComprehensiveIncome","OwnersEquity","PreferredStock","RetainedEarnings","Safes","TreasuryStock","UncategorizedEquity","PartnerRevenue","RefundsAndDiscounts","SalesRevenue","SubscriptionRevenue","TransactionRevenue","UncategorizedIncome","BusinessApplicationsAndSoftware","Facilities","GeneralOperations","PayrollExpenses","ProfessionalFees","SalesAndMarketing","SuppliesAndMaterials","TravelAndEntertainment","UncategorizedExpense","CostOfGoods","CostOfLabor","HostingFees","OtherCostOfRevenue","PaymentProcessingFees","CreditCardRewards","InterestAndDividends","OtherMiscellaneousIncome","BadDebtExpense","DepreciationAndAmortization","InterestExpense","OtherMiscellaneousExpenses","Taxes","Other","None"],"type":"string","description":"Fine-grained classification within the coarse type (e.g. BankAccounts,\n AccountsReceivable, CreditCards). Consumers that map to external\n chart-of-accounts taxonomies rely on this to distinguish account kinds\n that share a top-level type.","format":"enum"}}},"CategoryRef":{"type":"object","properties":{"label":{"type":"string","description":"Label as created by SourcesSync"},"ledgerId":{"allOf":[{"$ref":"#/components/schemas/Identifier"}],"description":"Digits ID"}},"description":"CategoryRef represents a reference to a category by its label or Digits ID.\n (external ID category refs are not supported)"},"CategorySearch":{"required":["names","type"],"type":"object","properties":{"names":{"type":"array","items":{"type":"string"},"description":"Names is a priority-ordered list of Category names. If none are found, a new category named for the first will be created."},"type":{"enum":["UnknownType","Assets","Liabilities","Equity","Income","Expenses","CostOfGoodsSold","OtherIncome","OtherExpenses"],"type":"string","description":"Type is a search constraint to limit matching categories. If a label constraint is specified, this must match.","format":"enum"},"subtype":{"type":"string","description":"Subtype is a search constraint to limit matching categories."},"parent":{"allOf":[{"$ref":"#/components/schemas/ParentCategorySearch"}],"description":"If no match is found, a new category will be created under the parent\n provided. If not provided, or not found, categories will be created under\n the root level."}},"description":"CategorySearch is a set of search criteria to allow Digits to automatically create mappings for this label.\n Digits may automatically create missing categories when the CategorySearch matches nothing, and the label is unmapped."},"CategorySummary":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the category"},"accountNumber":{"type":"string","description":"Optional account number associated with the category"}},"description":"Category summary within a section (e.g., \"Current Assets\", \"Long-term Liabilities\")"},"ClientEmployeeInput":{"required":["organizationRole"],"type":"object","properties":{"userId":{"type":"string","description":"User's Digits-assigned ID (provide `userId` or `userExternalId`)."},"userExternalId":{"type":"string","description":"User's caller-assigned ID (provide `userId` or `userExternalId`)."},"clientOrganizationId":{"type":"string","description":"Target client organization's Digits-assigned ID (provide `clientOrganizationId` or `clientOrganizationExternalId`)."},"clientOrganizationExternalId":{"type":"string","description":"Target client organization's caller-assigned ID (provide `clientOrganizationId` or `clientOrganizationExternalId`)."},"organizationRole":{"type":"string","description":"The employee's role within the client organization."},"entities":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeEntityRoleInput"},"description":"Explicit role assignments within the client entities. When `entityRole` is set, these override that default for named entities."},"entityRole":{"type":"string","description":"Employee-level default role for the client entities. Stored for future entities and applied to existing entities unless `entities` provides overrides."}},"description":"Input for creating or reactivating an employee binding between a user and a\n client organization, used by the bulk client-employee endpoint. The referenced\n user must already exist, and each element targets one client organization. If\n the employee binding already exists and is active, use\n UpdateClientEmployeeRequest instead. Scoped to a single client org, so it\n assigns entity roles only."},"Company":{"type":"object","properties":{"id":{"type":"string","description":"The Digits identifier for the company."},"name":{"type":"string","description":"The name of the company."},"fiscalYearStartMonth":{"type":"string","description":"The month the company's fiscal year starts JAN-DEC."},"earliestTransaction":{"type":"string","description":"The date of the earliest transaction recorded for the company in their ledger.","format":"date-time"},"currency":{"type":"string","description":"The currency code used by the company, in ISO 4217 format."}}},"CreateClientEmployeeRequest":{"required":["organizationRole"],"type":"object","properties":{"id":{"type":"string","description":"Client organization's Digits-assigned ID."},"userId":{"type":"string","description":"User's Digits-assigned ID (provide `userId` or `userExternalId`)."},"userExternalId":{"type":"string","description":"User's caller-assigned ID (provide `userId` or `userExternalId`)."},"organizationRole":{"type":"string","description":"Role within the organization."},"entities":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeEntityRoleInput"},"description":"Explicit role assignments within this client's entities. When `entityRole` is set, these override that default for named entities."},"entityRole":{"type":"string","description":"Employee-level default role for this client's entities. Stored for future entities and applied to existing entities unless `entities` provides overrides."}},"description":"Request to create or reactivate an employee binding within a client organization.\n The referenced user and client organization must already exist. If the employee\n binding already exists and is active, use UpdateClientEmployeeRequest instead."},"CreateClientEntityRequest":{"required":["externalId","name"],"type":"object","properties":{"id":{"type":"string","description":"Client organization's Digits-assigned ID."},"externalId":{"type":"string","description":"Caller-assigned ID for idempotency."},"name":{"type":"string","description":"Entity name."},"coaTemplateId":{"type":"string","description":"Chart of accounts template ID."},"fiscalYearStartMonth":{"type":"string","description":"Fiscal year start month (JAN-DEC)."},"timezone":{"type":"string","description":"IANA timezone."},"address":{"allOf":[{"$ref":"#/components/schemas/Address"}],"description":"Mailing address."},"websiteUrl":{"type":"string","description":"Website URL."},"phoneNumber":{"type":"string","description":"Phone number."},"displayId":{"type":"string","description":"Optional caller-assigned display ID (e.g., account number)."}}},"CreateClientPaymentInstrumentRequest":{"required":["externalId","fundsFlow"],"type":"object","properties":{"clientOrganizationExternalId":{"type":"string","description":"Client organization's caller-assigned ID."},"clientOrganizationId":{"type":"string","description":"Client organization's Digits-assigned ID."},"clientEntityExternalId":{"type":"string","description":"Client entity's caller-assigned ID."},"clientEntityId":{"type":"string","description":"Client entity's Digits-assigned ID."},"externalId":{"type":"string","description":"Caller-assigned identifier for idempotent upsert of the payment instrument."},"currencyCode":{"type":"string","description":"The ISO 4217 currency code for the instrument."},"nickname":{"type":"string","description":"User-provided nickname for the instrument."},"fundsFlow":{"enum":["UnknownFundsFlow","DigitsManaged","ExternallyManaged"],"type":"string","description":"Whether payments using this instrument are Digits-managed or managed externally by the source.\n Only ExternallyManaged is currently supported.","format":"enum"},"bankAccount":{"allOf":[{"$ref":"#/components/schemas/BankAccountRequest"}],"description":"Bank account details for a funding instrument."}},"description":"CreateClientPaymentInstrumentRequest describes a client-scoped payment instrument to create or update."},"CreateClientRequest":{"required":["externalId","name","entities"],"type":"object","properties":{"externalId":{"type":"string","description":"Caller-assigned ID for idempotency."},"name":{"type":"string","description":"Client organization name."},"entities":{"type":"array","items":{"$ref":"#/components/schemas/CreateEntityRequest"},"description":"At least one entity is required. Maximum 100 entities per client."},"displayId":{"type":"string","description":"Optional caller-assigned display ID (e.g., account number)."}},"description":"Request to create a new client organization with one or more entities."},"CreateEmployeeRequest":{"required":["organizationRole"],"type":"object","properties":{"userId":{"type":"string","description":"User's Digits-assigned ID (provide `userId` or `userExternalId`)."},"userExternalId":{"type":"string","description":"User's caller-assigned ID (provide `userId` or `userExternalId`)."},"organizationRole":{"type":"string","description":"The employee's role within the organization."},"entities":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeEntityRoleInput"},"description":"Explicit role assignments on the organization's own entities. When `entityRole` is set, these override that default for named entities."},"clients":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeClientRoleInput"},"description":"Explicit role assignments on client entities. When `clientRole` is set, these override that default for named clients or entities."},"entityRole":{"type":"string","description":"Employee-level default role for the organization's own entities. Stored for future entities and applied to existing entities unless `entities` provides overrides."},"clientRole":{"type":"string","description":"Employee-level default role for client entities. Stored for future client entities and applied to current client access unless `clients` provides overrides."}},"description":"Request to create or reactivate an employee binding. The referenced user must\n already exist. If the employee binding already exists and is active, use\n UpdateEmployeeRequest instead. `organizationRole` is required. Optionally\n provide entity access (`entityRole`, `entities`, or both), client access\n (`clientRole`, `clients`, or both), or both. `entityRole` and `clientRole` are\n employee-level defaults: they are stored on the employee row for future\n entities or client entities, and applied to current access unless explicit\n `entities` or `clients` entries override them."},"CreateEntityPaymentInstrumentRequest":{"required":["externalId","fundsFlow"],"type":"object","properties":{"entityExternalId":{"type":"string","description":"Legal entity's caller-assigned ID."},"entityId":{"type":"string","description":"Legal entity's Digits-assigned ID."},"externalId":{"type":"string","description":"Caller-assigned identifier for idempotent upsert of the payment instrument."},"currencyCode":{"type":"string","description":"The ISO 4217 currency code for the instrument."},"nickname":{"type":"string","description":"User-provided nickname for the instrument."},"userId":{"type":"string","description":"User's Digits-assigned ID."},"userExternalId":{"type":"string","description":"User's caller-assigned ID, resolved on the backend."},"fundsFlow":{"enum":["UnknownFundsFlow","DigitsManaged","ExternallyManaged"],"type":"string","description":"Whether payments using this instrument are Digits-managed or managed externally by the source.\n Only ExternallyManaged is currently supported.","format":"enum"},"bankAccount":{"allOf":[{"$ref":"#/components/schemas/BankAccountRequest"}],"description":"Bank account details for a funding instrument."}},"description":"CreateEntityPaymentInstrumentRequest describes a payment instrument to create or update."},"CreateEntityRequest":{"required":["externalId","name"],"type":"object","properties":{"externalId":{"type":"string","description":"Caller-assigned ID for idempotency."},"name":{"type":"string","description":"Entity name."},"coaTemplateId":{"type":"string","description":"Chart of accounts template ID."},"fiscalYearStartMonth":{"type":"string","description":"Fiscal year start month (JAN-DEC)."},"timezone":{"type":"string","description":"IANA timezone."},"address":{"allOf":[{"$ref":"#/components/schemas/Address"}],"description":"Mailing address."},"websiteUrl":{"type":"string","description":"Website URL."},"phoneNumber":{"type":"string","description":"Phone number."},"displayId":{"type":"string","description":"Optional caller-assigned display ID (e.g., account number)."}},"description":"Request to create a new entity. The entity object is created synchronously,\n but data provisioning (chart of accounts, ledger setup) completes asynchronously."},"CreateSSOUserRequest":{"required":["givenName","familyName","emailAddress","externalId"],"type":"object","properties":{"givenName":{"type":"string","description":"Given name."},"familyName":{"type":"string","description":"Family name."},"emailAddress":{"type":"string","description":"Email address."},"externalId":{"type":"string","description":"User's caller-assigned ID — their SSO identity provider ID."}}},"Currency":{"required":["amount","code"],"type":"object","properties":{"amount":{"type":"number","description":"Amount is expressed in minor units - $5.00 is 500¢.\n Double formatted for compatibility, only the integer component is used.","format":"double"},"code":{"type":"string","description":"Code is the ISO 4217 currency code, for example \"USD\", \"EUR\", \"JPY\""}},"description":"Currency is a minor-unit representation of an amount in the specified currency."},"DeleteClientEmployeeResponse":{"type":"object","properties":{}},"DeleteClientEntityResponse":{"type":"object","properties":{}},"DeleteClientPaymentInstrumentsRequest":{"type":"object","properties":{"clientOrganizationExternalId":{"type":"string","description":"Client organization's caller-assigned ID."},"clientOrganizationId":{"type":"string","description":"Client organization's Digits-assigned ID."},"clientEntityExternalId":{"type":"string","description":"Client entity's caller-assigned ID."},"clientEntityId":{"type":"string","description":"Client entity's Digits-assigned ID."},"ids":{"type":"array","items":{"type":"string"},"description":"Payment instruments' Digits-assigned IDs to delete. Provide EITHER ids or external_ids, not both."},"externalIds":{"type":"array","items":{"type":"string"},"description":"Payment instruments' caller-assigned IDs to delete. Provide EITHER ids or external_ids, not both."}},"description":"DeleteClientPaymentInstrumentsRequest deletes client-scoped payment instruments by Digits-assigned or caller-assigned IDs.\n A deleted payment instrument becomes unavailable for any future payments; any in-flight payments continue to use it."},"DeleteClientResponse":{"type":"object","properties":{}},"DeleteEmployeeResponse":{"type":"object","properties":{}},"DeleteEntityPaymentInstrumentsRequest":{"type":"object","properties":{"entityExternalId":{"type":"string","description":"Legal entity's caller-assigned ID."},"entityId":{"type":"string","description":"Legal entity's Digits-assigned ID."},"ids":{"type":"array","items":{"type":"string"},"description":"Payment instruments' Digits-assigned IDs to delete. Provide EITHER ids or external_ids, not both."},"externalIds":{"type":"array","items":{"type":"string"},"description":"Payment instruments' caller-assigned IDs to delete. Provide EITHER ids or external_ids, not both."}},"description":"DeleteEntityPaymentInstrumentsRequest deletes entity-scoped payment instruments created via this API,\n by Digits-assigned or caller-assigned IDs. Unknown IDs are skipped.\n A deleted payment instrument becomes unavailable for any future payments; any in-flight payments continue to use it."},"DeleteEntityResponse":{"type":"object","properties":{}},"DeletePaymentInstrumentsResponse":{"type":"object","properties":{"deletedCount":{"type":"integer","description":"Number of payment instruments removed. Unknown IDs are skipped.","format":"int32"}},"description":"DeletePaymentInstrumentsResponse returns the result of a payment instrument delete."},"DeleteSSOUserResponse":{"type":"object","properties":{}},"DeleteWorkflowBill":{"required":["billId"],"type":"object","properties":{"billId":{"type":"string"}},"description":"DeleteWorkflowBill identifies one bill to delete."},"DeleteWorkflowBillsRequest":{"required":["entity","bills"],"type":"object","properties":{"entity":{"allOf":[{"$ref":"#/components/schemas/WorkflowEntitySelector"}],"description":"Client organization and entity that owns the bills."},"bills":{"type":"array","items":{"$ref":"#/components/schemas/DeleteWorkflowBill"},"description":"Bills to delete."},"userId":{"type":"string"},"userExternalId":{"type":"string"}},"description":"DeleteWorkflowBillsRequest deletes a batch of pre-approval bills. If any bill\n cannot be deleted, the request fails and no bills are deleted."},"DeleteWorkflowBillsResponse":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/BillWorkflowActionResult"}}},"description":"DeleteWorkflowBillsResponse returns the deleted bills and their updated status."},"Department":{"type":"object","properties":{"id":{"allOf":[{"$ref":"#/components/schemas/Identifier"}],"description":"The digits id of the department"},"parentId":{"type":"string","description":"The digits id of the parent of the department"},"name":{"type":"string","description":"The name of the department. Must be unique within the same level of the\n hierarchy."},"description":{"type":"string","description":"The description of the department"}}},"DepartmentRef":{"type":"object","properties":{"externalId":{"allOf":[{"$ref":"#/components/schemas/Identifier"}],"description":"ExternalID references the original ID in the source system."},"ledgerId":{"allOf":[{"$ref":"#/components/schemas/Identifier"}],"description":"Digits ID"}},"description":"DepartmentRef represents a reference to a department by its external identifier or Digits ID."},"DestinationBankAccount":{"type":"object","properties":{"institutionName":{"type":"string","description":"The bank institution name, when known."},"ach":{"allOf":[{"$ref":"#/components/schemas/DestinationBankAccount_Routing"}],"description":"ACH routing details for the destination bank account, when ACH payments are supported."},"wire":{"allOf":[{"$ref":"#/components/schemas/DestinationBankAccount_Routing"}],"description":"Wire transfer routing details for the destination bank account, when wire payments are supported."}},"description":"DestinationBankAccount describes bank account details for delivering a bill\n payment to a vendor."},"DestinationBankAccount_Routing":{"type":"object","properties":{"routingNumber":{"type":"string","description":"ABA routing number for the destination bank account."},"accountNumber":{"type":"string","description":"Bank account number for the destination bank account."}},"description":"Routing contains full bank routing details for a destination payment rail."},"DestinationCheck":{"type":"object","properties":{"address":{"allOf":[{"$ref":"#/components/schemas/Address"}],"description":"Mailing address for the check."},"recipientName":{"type":"string","description":"Recipient name to print on the check."}},"description":"DestinationCheck describes mailing details for delivering a bill payment to a\n vendor by check."},"DestinationPaymentInstrument":{"type":"object","properties":{"id":{"type":"string","description":"The Digits-assigned identifier."},"currencyCode":{"type":"string","description":"The ISO 4217 currency code for the instrument."},"nickname":{"type":"string","description":"User-provided nickname for the instrument."},"createdAt":{"type":"string","description":"Creation timestamp.","format":"date-time"},"isDefault":{"type":"boolean","description":"Whether this is the default destination for the vendor."},"bankAccount":{"allOf":[{"$ref":"#/components/schemas/DestinationBankAccount"}],"description":"Bank account details for ACH payment delivery."},"check":{"allOf":[{"$ref":"#/components/schemas/DestinationCheck"}],"description":"Mailing details for check payment delivery."}},"description":"DestinationPaymentInstrument describes a vendor destination for bill payment\n workflows."},"Employee":{"type":"object","properties":{"userId":{"type":"string","description":"User's Digits-assigned ID."},"userExternalId":{"type":"string","description":"User's caller-assigned ID."},"organizationId":{"type":"string","description":"Parent organization's Digits-assigned ID."},"organizationExternalId":{"type":"string","description":"Parent organization's caller-assigned ID."},"organizationRole":{"type":"string","description":"The employee's role within the organization."},"entities":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeEntityRole"},"description":"The user's per-entity roles on the organization's own entities.\n Populated only for organizations that directly own their entities."},"clients":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeClientRole"},"description":"The user's per-client roles on client entities.\n Populated only for organizations that manage clients."},"entityRole":{"type":"string","description":"A single entity role applied across all of the organization's own entities."},"clientRole":{"type":"string","description":"A single client role applied across all client entities."}},"description":"An employee binding between a user and an organization. Every employee has\n an organization role, and may have entity roles on the organization's own\n entities, client roles on its clients' entities, or both. Deleting an employee\n removes these bindings but does not delete the underlying user."},"EmployeeClientEntityRole":{"type":"object","properties":{"clientEntityId":{"type":"string","description":"Entity's Digits-assigned ID."},"clientEntityExternalId":{"type":"string","description":"Entity's caller-assigned ID."},"clientRole":{"type":"string","description":"The user's client role on this entity."}},"description":"A client role the user holds on a specific entity within a client organization."},"EmployeeClientEntityRoleInput":{"type":"object","properties":{"clientEntityId":{"type":"string","description":"Entity's Digits-assigned ID."},"clientEntityExternalId":{"type":"string","description":"Entity's caller-assigned ID."},"clientRole":{"type":"string","description":"Client role to assign for this entity."}},"description":"Request input for assigning a role to a specific entity within a client organization."},"EmployeeClientRole":{"type":"object","properties":{"clientOrganizationId":{"type":"string","description":"Client organization's Digits-assigned ID."},"clientOrganizationExternalId":{"type":"string","description":"Client organization's caller-assigned ID."},"entities":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeClientEntityRole"},"description":"The user's client roles on specific entities within this client organization."}},"description":"The user's client roles within one client organization."},"EmployeeClientRoleInput":{"type":"object","properties":{"clientOrganizationId":{"type":"string","description":"Client organization's Digits-assigned ID."},"clientOrganizationExternalId":{"type":"string","description":"Client organization's caller-assigned ID."},"clientRole":{"type":"string","description":"Request-only role to apply to this client's existing entities when an entity-specific override is not provided."},"entities":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeClientEntityRoleInput"},"description":"Entity-specific role assignments within this client organization. These take precedence over `clientRole` for named entities."}},"description":"Request input for assigning a user's client roles within one client organization."},"EmployeeEntityRole":{"type":"object","properties":{"entityId":{"type":"string","description":"Entity's Digits-assigned ID."},"entityExternalId":{"type":"string","description":"Entity's caller-assigned ID."},"entityRole":{"type":"string","description":"The user's role on this entity."}},"description":"A role the user holds on a specific entity the organization owns."},"EmployeeEntityRoleInput":{"type":"object","properties":{"entityId":{"type":"string","description":"Entity's Digits-assigned ID (provide `entityId` or `entityExternalId`)."},"entityExternalId":{"type":"string","description":"Entity's caller-assigned ID (provide `entityId` or `entityExternalId`)."},"entityRole":{"type":"string","description":"Role to assign for this entity."}},"description":"Assigns a role for a specific entity the organization owns."},"Entity":{"type":"object","properties":{"id":{"type":"string","description":"Entity's Digits-assigned ID."},"externalId":{"type":"string","description":"Entity's caller-assigned ID."},"name":{"type":"string","description":"Entity name."},"organizationId":{"type":"string","description":"Parent organization's Digits-assigned ID."},"organizationExternalId":{"type":"string","description":"Parent organization's caller-assigned ID."},"fiscalYearStartMonth":{"type":"string","description":"Fiscal year start month (JAN-DEC)."},"timezone":{"type":"string","description":"IANA timezone."},"address":{"allOf":[{"$ref":"#/components/schemas/Address"}],"description":"Mailing address."},"websiteUrl":{"type":"string","description":"Website URL."},"phoneNumber":{"type":"string","description":"Phone number."},"displayId":{"type":"string","description":"Optional caller-assigned display ID (e.g., account number)."}},"description":"A legal entity within an organization. Entities represent individual\n businesses or accounting units that contain their own financial data."},"Entry":{"type":"object","properties":{"id":{"type":"string","description":"The digits transaction entry id"},"amount":{"allOf":[{"$ref":"#/components/schemas/Currency"}],"description":"The amount of this entry"},"type":{"enum":["Unknown","Credit","Debit"],"type":"string","description":"The type of this entry (e.g. Credit or Debit)","format":"enum"},"description":{"type":"string","description":"The description of this entry"},"category":{"allOf":[{"$ref":"#/components/schemas/Category"}],"description":"The category for this entry"},"counterparty":{"allOf":[{"$ref":"#/components/schemas/Party"}],"description":"The counterparty for this entry"},"department":{"allOf":[{"$ref":"#/components/schemas/Department"}],"description":"The department for this entry"},"location":{"allOf":[{"$ref":"#/components/schemas/Location"}],"description":"The location for this entry"}},"description":"A single entry in a transaction"},"EntryDetail":{"type":"object","properties":{"transactionId":{"type":"string","description":"ledger transaction id"},"date":{"type":"string","description":"The date which the transaction occurred at","format":"date-time"},"entry":{"allOf":[{"$ref":"#/components/schemas/Entry"}],"description":"The entry data for this transaction"},"createdAt":{"type":"string","description":"When the transaction first appeared in Digits","format":"date-time"},"updatedAt":{"type":"string","description":"The latest time any relevant data changed","format":"date-time"},"bill":{"$ref":"#/components/schemas/Bill"},"invoice":{"$ref":"#/components/schemas/Invoice"}},"description":"The details of a single entry from a transaction"},"ExternalPayment":{"required":["idempotencyKey"],"type":"object","properties":{"amount":{"allOf":[{"$ref":"#/components/schemas/Currency"}],"description":"Amount paid. Defaults to the bill's amount due when omitted."},"paidAt":{"type":"string","description":"Date the external payment was made.","format":"date-time"},"referenceNumber":{"type":"string","description":"Payment reference number to record on the bill."},"destinationPaymentInstrumentId":{"type":"string","description":"Vendor destination payment instrument to receive the payment. Digits-assigned ID.\n If specified will change the existing destination instrument. Must be one of the existing destinations\n owned by the bill's current vendor."},"idempotencyKey":{"type":"string","description":"Caller-supplied key identifying this payment record, at most 255 bytes.\n Reuse a key only to retry a failed or timed-out request; two requests\n with distinct keys can never affect each other's payment records."}},"description":"ExternalPayment records a payment made outside of Digits-managed rails."},"GenerateStatementResponse":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/StatementRow"},"description":"The rows that make up the statement"}},"description":"Response message for generating financial statements"},"GetLedgerDepartmentResponse":{"type":"object","properties":{"department":{"$ref":"#/components/schemas/Department"}}},"GetLedgerLocationResponse":{"type":"object","properties":{"location":{"$ref":"#/components/schemas/Location"}}},"GetLedgerPartyResponse":{"type":"object","properties":{"party":{"$ref":"#/components/schemas/Party"}}},"GetLedgerProjectResponse":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}}},"GetLedgerTransactionResponse":{"type":"object","properties":{"transaction":{"allOf":[{"$ref":"#/components/schemas/Transaction"}],"description":"The full transaction for this ID, with all lines"}}},"GetWorkflowBillRequest":{"required":["entity","id"],"type":"object","properties":{"entity":{"allOf":[{"$ref":"#/components/schemas/WorkflowEntitySelector"}],"description":"Client organization and entity that owns the bill."},"id":{"type":"string","description":"Bill's Digits-assigned identifier."}}},"GoogleProtobufAny":{"type":"object","properties":{"@type":{"type":"string","description":"The type of the serialized message."}},"additionalProperties":true,"description":"Contains an arbitrary serialized message along with a @type that describes the type of the serialized message."},"Identifier":{"required":["issuer","id"],"type":"object","properties":{"issuer":{"type":"string","description":"The issuer of this identifier, for example \"digits.com\", \"plaid.com\""},"id":{"type":"string","description":"The raw ID string from the issuer"}},"description":"Identifier represents an ID within the context of an issuer."},"Institution":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"Invoice":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the invoice"},"invoiceNumber":{"type":"string","description":"The invoice number associated with this invoice"},"invoiceDate":{"type":"string","description":"The date the invoice was issued","format":"date-time"},"dueDate":{"type":"string","description":"The due date for the invoice","format":"date-time"}}},"InvoiceAgingSummary":{"type":"object","properties":{"invoiceDate":{"type":"string","format":"date-time"},"dueDate":{"type":"string","format":"date-time"},"invoiceNumber":{"type":"string"},"summary":{"$ref":"#/components/schemas/AgingSummary"}}},"InvoiceRef":{"required":["externalId"],"type":"object","properties":{"externalId":{"allOf":[{"$ref":"#/components/schemas/Identifier"}],"description":"ExternalID references the original ID in the source system."}},"description":"InvoiceRef represents a reference to an invoice by its external identifier."},"Label":{"required":["label","name","constraint"],"type":"object","properties":{"label":{"type":"string","description":"Label is the free-form identifier for use in App code. Limited to 32 chars."},"name":{"type":"string","description":"Name is the descriptive name for this label shown in the Digits UI. Limited to 64 chars."},"constraint":{"type":"array","items":{"enum":["UnknownType","Assets","Liabilities","Equity","Income","Expenses","CostOfGoodsSold","OtherIncome","OtherExpenses"],"type":"string","format":"enum"},"description":"Constraint limits valid categories for this label by category type.\n This limit is applied to CategorySearch as well as in-product UI label mapping.\n\n Specified constraints should align with the intended use of the label within App code,\n ensuring transaction-level debits and credits are applied correctly."},"preferAi":{"type":"boolean","description":"PreferAI encourages Digits to prefer AI categorizations over direct mappings for entries with this label. Best used with detailed transaction descriptions. The category configured for this label will be used as a bookkeeping hint to the AI."},"search":{"allOf":[{"$ref":"#/components/schemas/CategorySearch"}],"description":"Mapping allows for search-based category identification."},"categoryId":{"type":"string","description":"CategoryID allows this label to be mapped to a Digits Category ID directly. Once the label is mapped, future updates to this ID are ignored."}},"description":"Label is a generic identifier which maps to a single category in the Chart of Accounts"},"LedgerEntriesQueryRequest":{"type":"object","properties":{"filters":{"allOf":[{"$ref":"#/components/schemas/LedgerEntriesQueryRequest_Filters"}],"description":"Filters to apply to the query. Each filter field is `AND` by default."},"limit":{"type":"integer","description":"The number of items to return per request. Default and max size is 100.","format":"int32"},"cursor":{"type":"string","description":"Cursor for pagination"}}},"LedgerEntriesQueryRequest_Filters":{"type":"object","properties":{"occurredBefore":{"type":"string","description":"OccurredBefore filters entries to those that occurred before this timestamp","format":"date-time"},"occurredAfter":{"type":"string","description":"OccurredAfter filters entries to those that occurred after this timestamp","format":"date-time"},"minimumAmount":{"type":"number","description":"Filters entries to those that exceed the specified minimum amount\n Double formatted for compatibility, only the integer component is used.","format":"double"},"maximumAmount":{"type":"number","description":"Filters entries to those that are below the specified maximum amount\n Double formatted for compatibility, only the integer component is used.","format":"double"},"currencyCode":{"type":"string","description":"Currency code. USD-only."},"filterTerm":{"type":"string","description":"FilterTerm searches for transactions with this string across multiple fields"},"fieldSearchTerm":{"allOf":[{"$ref":"#/components/schemas/TransactionFieldSearchTerm"}],"description":"FieldSearchTerm searches for transactions with specific field/term pairs"},"userIds":{"type":"array","items":{"type":"string"},"description":"UserIDs to filter entries by"},"locationIds":{"type":"array","items":{"type":"string"},"description":"LocationIDs to filter entries by"},"departmentIds":{"type":"array","items":{"type":"string"},"description":"DepartmentIDs to filter entries by"},"categoryIds":{"type":"array","items":{"type":"string"},"description":"CategoryIDs to filter entries by"},"partyIds":{"type":"array","items":{"type":"string"},"description":"PartyIDs to filter entries by"},"institutionIds":{"type":"array","items":{"type":"string"},"description":"InstitutionIDs to filter entries by"},"categoryTypes":{"type":"array","items":{"enum":["UnknownType","Assets","Liabilities","Equity","Income","Expenses","CostOfGoodsSold","OtherIncome","OtherExpenses"],"type":"string","format":"enum"},"description":"CategoryTypes to filter entries by"},"type":{"enum":["Unknown","Credit","Debit"],"type":"string","description":"The type to filter by (e.g. Credit or Debit)","format":"enum"},"linkedObjectType":{"enum":["Unknown","Bill","Invoice"],"type":"string","description":"LinkedObjectType to filter entries by","format":"enum"},"createdBefore":{"type":"string","description":"Filter to entries created before this timestamp","format":"date-time"},"createdAfter":{"type":"string","description":"Filter to entries created after this timestamp","format":"date-time"},"updatedBefore":{"type":"string","description":"Filter to entries updated before this timestamp","format":"date-time"},"updatedAfter":{"type":"string","description":"Filter to entries updated after this timestamp","format":"date-time"}}},"LedgerEntriesResponse":{"type":"object","properties":{"entryDetails":{"type":"array","items":{"$ref":"#/components/schemas/EntryDetail"},"description":"EntryDetails is a list of entries which match the request.\n An entry is a single line item within a transaction; EntryDetail wraps with transaction info."},"next":{"$ref":"#/components/schemas/Page"}}},"LedgerSummaryResponse":{"type":"object","properties":{"comingSoon":{"type":"string"}},"description":"TODO"},"ListCategoriesResponse":{"type":"object","properties":{"categories":{"type":"array","items":{"$ref":"#/components/schemas/Category"}}}},"ListClientsResponse":{"type":"object","properties":{"clients":{"type":"array","items":{"$ref":"#/components/schemas/Business"}},"next":{"$ref":"#/components/schemas/Page"}}},"ListEmployeesResponse":{"type":"object","properties":{"employees":{"type":"array","items":{"$ref":"#/components/schemas/Employee"}},"next":{"$ref":"#/components/schemas/Page"}}},"ListEntitiesResponse":{"type":"object","properties":{"entities":{"type":"array","items":{"$ref":"#/components/schemas/Entity"}},"next":{"$ref":"#/components/schemas/Page"}}},"ListLedgerDepartmentsResponse":{"type":"object","properties":{"departments":{"type":"array","items":{"$ref":"#/components/schemas/Department"}}}},"ListLedgerLocationsResponse":{"type":"object","properties":{"locations":{"type":"array","items":{"$ref":"#/components/schemas/Location"}}}},"ListLedgerPartiesResponse":{"type":"object","properties":{"parties":{"type":"array","items":{"$ref":"#/components/schemas/Party"}},"next":{"$ref":"#/components/schemas/Page"}}},"ListLedgerProjectsResponse":{"type":"object","properties":{"projects":{"type":"array","items":{"$ref":"#/components/schemas/Project"}}}},"ListSSOUsersResponse":{"type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/components/schemas/SSOUser"}},"next":{"$ref":"#/components/schemas/Page"}}},"ListSourceDepartmentsResponse":{"type":"object","properties":{"departments":{"type":"array","items":{"$ref":"#/components/schemas/SourceDepartment"}}}},"ListSourceLocationsResponse":{"type":"object","properties":{"locations":{"type":"array","items":{"$ref":"#/components/schemas/SourceLocation"}}}},"ListSourcePartiesResponse":{"type":"object","properties":{"parties":{"type":"array","items":{"$ref":"#/components/schemas/SourceParty"}},"next":{"$ref":"#/components/schemas/Page"}}},"ListSourceProductsResponse":{"type":"object","properties":{"products":{"type":"array","items":{"$ref":"#/components/schemas/SourceProduct"}},"next":{"$ref":"#/components/schemas/Page"}}},"ListSourceProjectsResponse":{"type":"object","properties":{"projects":{"type":"array","items":{"$ref":"#/components/schemas/SourceProject"}}}},"ListSourcesResponse":{"type":"object","properties":{"sources":{"type":"array","items":{"$ref":"#/components/schemas/Source"},"description":"List of sources for this connection"}}},"ListWorkflowBillsRequest":{"required":["entity"],"type":"object","properties":{"entity":{"allOf":[{"$ref":"#/components/schemas/WorkflowEntitySelector"}],"description":"Client organization and entity to scope the list to."},"status":{"type":"array","items":{"enum":["Unknown","Ingesting","Draft","AwaitingApproval","Approved","ProcessingPayment","Paid","Deleted","Rejected","Voided","Failed","Refunded","MarkAsPaid","ScheduledToBeSentForApproval"],"type":"string","format":"enum"},"description":"Status values to include. Empty returns bills in any status."},"source":{"type":"array","items":{"type":"string"},"description":"Public source labels to include, for example API, UI, or EMAIL. Empty\n returns bills from any source."},"vendorName":{"type":"string","description":"Vendor name prefix to match."},"dueDateFrom":{"type":"string","description":"Filter to bills due on or after this timestamp.","format":"date-time"},"dueDateTo":{"type":"string","description":"Filter to bills due on or before this timestamp.","format":"date-time"},"scheduledPaymentDateFrom":{"type":"string","description":"Filter to bills scheduled for payment on or after this timestamp.","format":"date-time"},"scheduledPaymentDateTo":{"type":"string","description":"Filter to bills scheduled for payment on or before this timestamp.","format":"date-time"},"createdAfter":{"type":"string","description":"Filter to bills created after this timestamp.","format":"date-time"},"createdBefore":{"type":"string","description":"Filter to bills created before this timestamp.","format":"date-time"},"updatedAfter":{"type":"string","description":"Filter to bills updated after this timestamp.","format":"date-time"},"updatedBefore":{"type":"string","description":"Filter to bills updated before this timestamp.","format":"date-time"},"limit":{"type":"integer","description":"The number of items to return per request. Default and max size is 100.","format":"int32"},"cursor":{"type":"string","description":"Cursor for pagination."},"sort":{"enum":["UnknownSort","CreatedAt","DueDate","Amount"],"type":"string","description":"Field to sort by. Defaults to CreatedAt.","format":"enum"},"order":{"enum":["UnknownOrder","Desc","Asc"],"type":"string","description":"Sort order. Defaults to Desc.","format":"enum"}},"description":"ListWorkflowBillsRequest requests workflow bills visible to the caller."},"ListWorkflowBillsResponse":{"type":"object","properties":{"bills":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowBill"},"description":"Workflow bills visible to the caller."},"next":{"allOf":[{"$ref":"#/components/schemas/Page"}],"description":"Pagination information for the next page of results."}},"description":"ListWorkflowBillsResponse returns workflow bills visible to the caller."},"Location":{"type":"object","properties":{"id":{"allOf":[{"$ref":"#/components/schemas/Identifier"}],"description":"The ledger id of the location"},"parentId":{"type":"string","description":"The parent id of the parent of the location"},"name":{"type":"string","description":"The name of the location"}}},"LocationRef":{"type":"object","properties":{"externalId":{"allOf":[{"$ref":"#/components/schemas/Identifier"}],"description":"ExternalID references the original ID in the source system."},"ledgerId":{"allOf":[{"$ref":"#/components/schemas/Identifier"}],"description":"Digits ID"}},"description":"LocationRef represents a reference to a location by its external identifier or Digits ID."},"MetricSample":{"required":["sourceId","key","value","time"],"type":"object","properties":{"sourceId":{"allOf":[{"$ref":"#/components/schemas/Identifier"}],"description":"The source ID this metric sample is associated with. Must be created by the Source Sync endpoint prior to sending metrics."},"key":{"enum":["UnknownKey","AccountLimit","AvailableBalance","CurrentBalance","Headcount"],"type":"string","description":"The key identifying the type of metric being recorded.","format":"enum"},"value":{"type":"number","description":"The value of the metric sample.\n Double formatted for compatibility, only the integer component is used.","format":"double"},"time":{"type":"string","description":"The timestamp when the metric sample was recorded.","format":"date-time"}}},"MetricsBatchRequest":{"required":["metrics"],"type":"object","properties":{"metrics":{"type":"array","items":{"$ref":"#/components/schemas/MetricSample"},"description":"Metrics is a batch of metric samples to record. Metric samples are point in time values for sampleable values, such as a bank account balance or headcount."}}},"MetricsBatchResponse":{"type":"object","properties":{"success":{"type":"boolean"}}},"Organization":{"type":"object","properties":{"id":{"type":"string","description":"Organization's Digits-assigned ID."},"externalId":{"type":"string","description":"Organization's caller-assigned ID."},"name":{"type":"string","description":"Display name."},"displayId":{"type":"string","description":"Optional caller-assigned display ID (e.g., account number)."}},"description":"An organization in Digits. Organizations manage their own entities or manage client\n entities. Users are employed by an organization and can be granted access to\n organization-owned entities or client entities."},"Page":{"type":"object","properties":{"cursor":{"type":"string","description":"A marker to track pagination progress"},"more":{"type":"boolean","description":"True if there is more data to fetch"}}},"ParentCategorySearch":{"required":["names","type"],"type":"object","properties":{"names":{"type":"array","items":{"type":"string"},"description":"Names is a priority-ordered list of category names. If none are found, a\n new category named for the first will be created."},"type":{"enum":["UnknownType","Assets","Liabilities","Equity","Income","Expenses","CostOfGoodsSold","OtherIncome","OtherExpenses"],"type":"string","description":"Type is a search constraint to limit matching categories.","format":"enum"},"subtype":{"type":"string","description":"Subtype is a search constraint to limit matching categories."}}},"Party":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Identifier"},"name":{"type":"string"},"email":{"type":"string"},"kind":{"enum":["UnknownKind","Person","Business"],"type":"string","format":"enum"},"description":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"PartyAgingSummary":{"type":"object","properties":{"partyId":{"type":"string"},"partyName":{"type":"string"},"summary":{"$ref":"#/components/schemas/AgingSummary"}}},"PartyRef":{"type":"object","properties":{"externalId":{"allOf":[{"$ref":"#/components/schemas/Identifier"}],"description":"ExternalID references the original ID in the source system."},"isSource":{"type":"boolean","description":"Indicates the party to the entry is the same as the source of the\n transaction"}},"description":"PartyRef represents a reference to a party by its external identifier."},"PayWorkflowBill":{"required":["billId"],"type":"object","properties":{"billId":{"type":"string","description":"Bill's Digits-assigned identifier."},"external":{"allOf":[{"$ref":"#/components/schemas/ExternalPayment"}],"description":"Record a payment made outside of Digits. Provide exactly one of `digitsManaged` or `external`."}},"description":"PayWorkflowBill identifies one bill to pay and how it should be funded."},"PayWorkflowBillsRequest":{"required":["entity","bills"],"type":"object","properties":{"entity":{"allOf":[{"$ref":"#/components/schemas/WorkflowEntitySelector"}],"description":"Client organization and entity that owns the bills."},"bills":{"type":"array","items":{"$ref":"#/components/schemas/PayWorkflowBill"},"description":"Bills to pay; each must be in Approved status. Bills that are already paid are skipped as no-ops, so\n repeating a request is safe. The request is validated as a whole; if any bill is in any other status,\n no payments are initiated. At most 1000 bills per call; larger batches are rejected with InvalidArgument."},"userId":{"type":"string","description":"User's Digits-assigned ID."},"userExternalId":{"type":"string","description":"User's caller-assigned ID, resolved on the backend."}},"description":"PayWorkflowBillsRequest pays a batch of approved bills through Digits-managed rails or by recording an external payment."},"PayWorkflowBillsResponse":{"type":"object","properties":{"bills":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowBill"},"description":"The full workflow bill for each paid or scheduled bill, in the same order as the request. Includes\n server-selected details such as the payment record, scheduled payment date, and destination instrument."}},"description":"PayWorkflowBillsResponse returns the paid or scheduled bills."},"PaymentInstrument":{"type":"object","properties":{"id":{"type":"string","description":"The Digits-assigned identifier."},"externalId":{"allOf":[{"$ref":"#/components/schemas/Identifier"}],"description":"The caller-assigned identifier."},"currencyCode":{"type":"string","description":"The ISO 4217 currency code for the instrument."},"nickname":{"type":"string","description":"User-provided nickname for the instrument."},"createdAt":{"type":"string","description":"Creation timestamp.","format":"date-time"},"fundsFlow":{"enum":["UnknownFundsFlow","DigitsManaged","ExternallyManaged"],"type":"string","description":"Whether payments using this instrument are Digits-managed or managed externally by the source.","format":"enum"},"bankAccount":{"allOf":[{"$ref":"#/components/schemas/BankAccount"}],"description":"Bank account details for a funding instrument."}},"description":"PaymentInstrument describes a payment instrument returned by Digits."},"Project":{"type":"object","properties":{"id":{"allOf":[{"$ref":"#/components/schemas/Identifier"}],"description":"The ledger id of the project"}}},"QueryClientPaymentInstrumentsRequest":{"type":"object","properties":{"clientOrganizationExternalId":{"type":"string","description":"Client organization's caller-assigned ID."},"clientOrganizationId":{"type":"string","description":"Client organization's Digits-assigned ID."},"clientEntityExternalId":{"type":"string","description":"Client entity's caller-assigned ID."},"clientEntityId":{"type":"string","description":"Client entity's Digits-assigned ID."},"ids":{"type":"array","items":{"type":"string"},"description":"Payment instruments' Digits-assigned IDs to match. Provide EITHER ids or external_ids, not both."},"externalIds":{"type":"array","items":{"type":"string"},"description":"Payment instruments' caller-assigned IDs to match. Provide EITHER ids or external_ids, not both."},"limit":{"type":"integer","description":"The number of items to return per request. Default and max size is 100.","format":"int32"},"cursor":{"type":"string","description":"Cursor for pagination."}},"description":"QueryClientPaymentInstrumentsRequest finds client-scoped payment instruments by Digits-assigned or caller-assigned IDs.\n\n Filters combine to narrow the result set: the client organization returns all payment instruments in that\n organization, the client entity narrows to instruments owned by that entity, and ids/external_ids narrow to\n specific instruments. Within ids or external_ids, multiple values are a union (match any)."},"QueryEntityPaymentInstrumentsRequest":{"type":"object","properties":{"entityExternalId":{"type":"string","description":"Legal entity's caller-assigned ID."},"entityId":{"type":"string","description":"Legal entity's Digits-assigned ID."},"ids":{"type":"array","items":{"type":"string"},"description":"Payment instruments' Digits-assigned IDs to match. Provide EITHER ids or external_ids, not both."},"externalIds":{"type":"array","items":{"type":"string"},"description":"Payment instruments' caller-assigned IDs to match. Provide EITHER ids or external_ids, not both."},"limit":{"type":"integer","description":"The number of items to return per request. Default and max size is 100.","format":"int32"},"cursor":{"type":"string","description":"Cursor for pagination."}},"description":"QueryEntityPaymentInstrumentsRequest finds entity-scoped payment instruments created via this API,\n by Digits-assigned or caller-assigned IDs.\n\n Filters combine to narrow the result set: the legal entity returns all payment instruments created\n for it via this API, and ids/external_ids narrow to specific instruments. Within ids or external_ids,\n multiple values are a union (match any)."},"QueryPaymentInstrumentsResponse":{"type":"object","properties":{"paymentInstruments":{"type":"array","items":{"$ref":"#/components/schemas/PaymentInstrument"},"description":"Payment instruments matching the query."},"next":{"allOf":[{"$ref":"#/components/schemas/Page"}],"description":"Pagination information for the next page of results."}},"description":"QueryPaymentInstrumentsResponse returns payment instruments matching a query."},"RejectWorkflowBill":{"required":["billId","comment"],"type":"object","properties":{"billId":{"type":"string","description":"Bill's Digits-assigned identifier."},"comment":{"type":"string","description":"Rejection comment to record on the bill."}},"description":"RejectWorkflowBill identifies one bill to reject."},"RejectWorkflowBillsRequest":{"required":["entity","bills"],"type":"object","properties":{"entity":{"allOf":[{"$ref":"#/components/schemas/WorkflowEntitySelector"}],"description":"Client organization and entity that owns the bills."},"bills":{"type":"array","items":{"$ref":"#/components/schemas/RejectWorkflowBill"},"description":"Bills to reject. If any bill cannot be rejected, the request fails and no bills are rejected."},"userId":{"type":"string","description":"User's Digits-assigned ID."},"userExternalId":{"type":"string","description":"User's caller-assigned ID, resolved on the backend."}},"description":"RejectWorkflowBillsRequest rejects a batch of bills awaiting approval,\n returning them to the preparer to edit and resubmit."},"RejectWorkflowBillsResponse":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/BillWorkflowActionResult"},"description":"One result per requested bill, in the same order as the request."}},"description":"RejectWorkflowBillsResponse returns the rejected bills and their updated workflow statuses."},"SSOAuditClientOrganization":{"type":"object","properties":{"organizationId":{"type":"string","description":"Client organization's Digits-assigned ID."},"organizationExternalId":{"type":"string","description":"Client organization's caller-assigned ID."},"organizationRole":{"type":"string","description":"The user's role in this client organization, when the user is an employee\n of the client organization."},"entityRole":{"type":"string","description":"A single entity role applied across all entities in this client\n organization, when the user is an employee of the client organization."},"entities":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeEntityRole"},"description":"Per-entity role bindings within this client organization, when the user is\n an employee of the client organization."},"clientRole":{"type":"string","description":"A single client role applied across all entities in this client\n organization, when the user is an employee of the caller organization."},"clientEntities":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeClientEntityRole"},"description":"Per-entity client role bindings within this client organization, when the\n user is an employee of the caller organization."}},"description":"A client organization and the user's access within it."},"SSOAuditUser":{"type":"object","properties":{"id":{"type":"string","description":"User's Digits-assigned ID."},"givenName":{"type":"string","description":"Given name."},"familyName":{"type":"string","description":"Family name."},"emailAddress":{"type":"string","description":"Email address."},"externalId":{"type":"string","description":"User's caller-assigned ID — their SSO identity provider ID."},"clientOrganizations":{"type":"array","items":{"$ref":"#/components/schemas/SSOAuditClientOrganization"},"description":"Client organizations where this user has access."}},"description":"An SSO-provisioned user with access grouped by client organization."},"SSOConfig":{"type":"object","properties":{"iss":{"type":"string","description":"OIDC issuer URL."},"requireSso":{"type":"boolean","description":"Whether SSO is mandatory."},"loginLifetimeSeconds":{"type":"integer","description":"Session lifetime in seconds (OpenID Connect convention).","format":"int32"}},"description":"SSO configuration for the organization. The organization must have SSO\n configured before SSO user management endpoints can be used."},"SSOUser":{"type":"object","properties":{"id":{"type":"string","description":"User's Digits-assigned ID."},"givenName":{"type":"string","description":"Given name."},"familyName":{"type":"string","description":"Family name."},"emailAddress":{"type":"string","description":"Email address."},"externalId":{"type":"string","description":"User's caller-assigned ID — their SSO identity provider ID."}},"description":"An SSO-provisioned user. SSO users are managed externally through your\n identity provider and do not receive standard provisioning notifications."},"SSOUserMapping":{"type":"object","properties":{"digitsId":{"type":"string","description":"User's Digits-assigned ID."},"externalId":{"type":"string","description":"User's caller-assigned ID — their SSO identity provider ID."}},"description":"Mapping between a user's Digits-assigned ID and that same user's ID in the\n caller's SSO identity provider. Returned after SSO user creation."},"SectionSummary":{"type":"object","properties":{"kind":{"enum":["UnknownStatementRowKind","Income","CostOfGoodsSold","GrossProfit","OperatingExpenses","NetOperatingIncome","OtherIncome","OtherExpenses","NetOtherIncome","NetIncome","Assets","Equity","Liabilities","TotalLiabilitiesAndEquity","OperatingActivities","CashFlowNetIncome","AdjustmentsToReconcileNetIncome","InvestingActivities","FinancingActivities","CashAtBeginning","CashAtEnd","NetCashIncrease"],"type":"string","description":"Unique identifier for the section","format":"enum"}},"description":"Section summary (e.g., \"Assets\", \"Liabilities and Equity\")"},"Source":{"required":["externalId","name","type"],"type":"object","properties":{"externalId":{"allOf":[{"$ref":"#/components/schemas/Identifier"}],"description":"ExternalID is the ID for this account in the source system. Required, must be unique per Connection. Referenced when writing Transactions."},"name":{"type":"string","description":"Name is the name for this account in the source system"},"type":{"type":"string","description":"Type is the broad classifier of the type of an account"},"subtype":{"type":"string","description":"Subtype describes specifics of the account type"},"description":{"type":"string","description":"Description is a free-form account description. Limited to 64 chars."},"mask":{"type":"string","description":"Mask is a numerical account ID, typically the last 4 digits. Preferred over Description."},"labels":{"type":"array","items":{"$ref":"#/components/schemas/Label"},"description":"Labels are generic identifiers used to simplify the accounting entries in App code.\n Each label must have a category configuration (search or category_id).\n\n Label mappings cannot be overridden; once a label is mapped to a category, new category\n values for that label are ignored. All other fields (name, constraint, prefer_ai, etc)\n may be updated later."}},"description":"Source represents a single source account for this Connection"},"SourceDepartment":{"type":"object","properties":{"externalId":{"type":"string","description":"The external identifier for the department"},"digitsId":{"type":"string","description":"The digits identifier for the department"},"name":{"type":"string","description":"The name of the department"},"description":{"type":"string","description":"The description of the department"},"parentId":{"type":"string","description":"Optional, the parent department's external id to represent the hierarchy of departments."}}},"SourceLocation":{"type":"object","properties":{"externalId":{"type":"string","description":"The external identifier for the location"},"digitsId":{"type":"string","description":"The digits identifier for the location"},"parentId":{"type":"string","description":"The parent id of the parent of the location"},"name":{"type":"string","description":"The name of the location"}}},"SourceParty":{"type":"object","properties":{"externalId":{"type":"string","description":"The external identifier for the party"},"digitsId":{"type":"string","description":"The digits identifier for the party"},"name":{"type":"string","description":"The name of the party"},"email":{"type":"string","description":"The email address associated with the party"},"description":{"type":"string","description":"A description providing additional details about the party"},"kind":{"enum":["UnknownKind","Person","Business"],"type":"string","description":"The kind or type of party (e.g., individual, organization)","format":"enum"}}},"SourceProduct":{"type":"object","properties":{"externalId":{"type":"string","description":"The external identifier for the product."},"digitsId":{"type":"string","description":"The Digits identifier for the product."},"name":{"type":"string","description":"The name of the product."},"unitPrice":{"allOf":[{"$ref":"#/components/schemas/Currency"}],"description":"The unit price of the product."},"description":{"type":"string","description":"A description of the product."},"taxable":{"type":"boolean","description":"Whether the product is taxable."},"category":{"allOf":[{"$ref":"#/components/schemas/CategoryRef"}],"description":"The category for this product."},"department":{"allOf":[{"$ref":"#/components/schemas/DepartmentRef"}],"description":"The department for this product."},"location":{"allOf":[{"$ref":"#/components/schemas/LocationRef"}],"description":"The location for this product."}},"description":"SourceProduct is the representation of a product as stored by Digits."},"SourceProject":{"type":"object","properties":{"externalId":{"type":"string","description":"The external identifier for the project"},"digitsId":{"type":"string","description":"The digits identifier for the project"}}},"SourceTransaction":{"required":["externalId","sourceId","date","entries"],"type":"object","properties":{"externalId":{"allOf":[{"$ref":"#/components/schemas/Identifier"}],"description":"Required. Used for idempotence."},"sourceId":{"allOf":[{"$ref":"#/components/schemas/Identifier"}],"description":"Required. The connection source that the transaction belongs to"},"displayId":{"allOf":[{"$ref":"#/components/schemas/Identifier"}],"description":"Optional display id for the transaction."},"referenceNumber":{"allOf":[{"$ref":"#/components/schemas/Identifier"}],"description":"Optional reference number for the transaction."},"date":{"type":"string","description":"Date the transaction should be posted in the ledger","format":"date-time"},"created":{"type":"string","description":"Optional date the transaction was created in the source system","format":"date-time"},"pending":{"type":"boolean","description":"If the transaction is marked pending, all entries\n are considered pending."},"memo":{"type":"string","description":"The top level memo"},"counterparty":{"allOf":[{"$ref":"#/components/schemas/PartyRef"}],"description":"Top level party. Applies to all entries. Entry-level parties take precedence."},"entries":{"type":"array","items":{"$ref":"#/components/schemas/SourceTransaction_Entry"},"description":"Individual entries / lines that comprise the transaction.\n The sums of debits and credits must balance: SUM(debits) == SUM(credits)."},"bill":{"allOf":[{"$ref":"#/components/schemas/SourceTransaction_Bill"}],"description":"Additional properties specific to a bill to be associated with this transaction (creates a new Bill object)"},"billRef":{"allOf":[{"$ref":"#/components/schemas/BillRef"}],"description":"Associate an existing Bill with this transaction (Bill object must exist)"},"invoice":{"allOf":[{"$ref":"#/components/schemas/SourceTransaction_Invoice"}],"description":"Additional properties specific to an invoice to be associated with this transaction (creates a new Invoice object)"},"invoiceRef":{"allOf":[{"$ref":"#/components/schemas/InvoiceRef"}],"description":"Associate an existing Invoice with this transaction (Invoice object must exist)"}},"description":"SourceTransaction represents a transaction as provided by an external source system\n to be ingested into the digits ledger. The shape of this object is the \"input\" format for\n creating or updating transactions in the ledger."},"SourceTransaction_Bill":{"required":["externalId","billDate","dueDate"],"type":"object","properties":{"externalId":{"allOf":[{"$ref":"#/components/schemas/Identifier"}],"description":"ExternalID references the original ID in the source system."},"invoiceNumber":{"type":"string","description":"The invoice number associated with this bill"},"billDate":{"type":"string","description":"The date the bill was issued","format":"date-time"},"dueDate":{"type":"string","description":"The due date for the bill","format":"date-time"}},"description":"Bill represents inline information about a bill associated with this transaction\n Subsequent transactions should prefer BillRef."},"SourceTransaction_Entry":{"required":["amount","type","category"],"type":"object","properties":{"externalId":{"allOf":[{"$ref":"#/components/schemas/Identifier"}],"description":"ExternalID references the original ID in the source system."},"amount":{"allOf":[{"$ref":"#/components/schemas/Currency"}],"description":"The amount of this entry. Always absolute value; use type to indicate credit/debit."},"type":{"enum":["Unknown","Credit","Debit"],"type":"string","description":"The type of this entry (e.g. Credit or Debit)","format":"enum"},"description":{"type":"string","description":"The description of this entry. Raw descriptions from the source system are preferred."},"category":{"allOf":[{"$ref":"#/components/schemas/CategoryRef"}],"description":"The category for this entry"},"counterparty":{"allOf":[{"$ref":"#/components/schemas/PartyRef"}],"description":"The counterparty for this entry"},"department":{"allOf":[{"$ref":"#/components/schemas/DepartmentRef"}],"description":"Department for this entry"},"billRef":{"allOf":[{"$ref":"#/components/schemas/BillRef"}],"description":"Associate an existing Bill with this entry."},"invoiceRef":{"allOf":[{"$ref":"#/components/schemas/InvoiceRef"}],"description":"Associate an existing Invoice with this entry."}},"description":"Entry is a single line for a SourceTransaction"},"SourceTransaction_Invoice":{"required":["externalId","invoiceDate","dueDate"],"type":"object","properties":{"externalId":{"allOf":[{"$ref":"#/components/schemas/Identifier"}],"description":"ExternalID references the original ID in the source system."},"invoiceNumber":{"type":"string","description":"The invoice number associated with this invoice"},"invoiceDate":{"type":"string","description":"The date the invoice was issued","format":"date-time"},"dueDate":{"type":"string","description":"The due date for the invoice","format":"date-time"}},"description":"Invoice represents inline information about an invoice associated with this transaction\n Subsequent transactions should prefer InvoiceRef."},"SourcesSyncRequest":{"required":["sources"],"type":"object","properties":{"sources":{"type":"array","items":{"$ref":"#/components/schemas/Source"},"description":"The complete set of Sources for this connection. Connections which write data must have at least one source. Sources removed in subsequent syncs will be deleted from the Connection.\n A source represents a single account in the source system, such as a bank account or credit card. Each source may have different Labels.\n Implementers may treat sources as logical groupings of transactions with similar configurations, such as \"Bills\" or \"Invoices\"."}}},"SourcesSyncResponse":{"type":"object","properties":{"success":{"type":"boolean"}}},"StatementRow":{"type":"object","properties":{"label":{"type":"string"},"total":{"$ref":"#/components/schemas/Currency"},"summary":{"$ref":"#/components/schemas/SectionSummary"},"category":{"$ref":"#/components/schemas/CategorySummary"},"agingSummary":{"$ref":"#/components/schemas/AgingSummary"},"partyAgingSummary":{"$ref":"#/components/schemas/PartyAgingSummary"},"invoiceAgingSummary":{"$ref":"#/components/schemas/InvoiceAgingSummary"},"trialBalanceSummary":{"$ref":"#/components/schemas/TrialBalanceSummary"},"children":{"type":"array","items":{"$ref":"#/components/schemas/StatementRowRef"},"description":"Statements are hierarchical"}},"description":"Represents a single row in a financial statement"},"Status":{"type":"object","properties":{"code":{"type":"integer","description":"The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].","format":"int32"},"message":{"type":"string","description":"A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client."},"details":{"type":"array","items":{"$ref":"#/components/schemas/GoogleProtobufAny"},"description":"A list of messages that carry the error details.  There is a common set of message types for APIs to use."}},"description":"The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors)."},"SubmitWorkflowBill":{"required":["billId"],"type":"object","properties":{"billId":{"type":"string","description":"Bill's Digits-assigned identifier."}},"description":"SubmitWorkflowBill identifies one bill to submit for approval."},"SubmitWorkflowBillsRequest":{"required":["entity","bills"],"type":"object","properties":{"entity":{"allOf":[{"$ref":"#/components/schemas/WorkflowEntitySelector"}],"description":"Client organization and entity that owns the bills."},"bills":{"type":"array","items":{"$ref":"#/components/schemas/SubmitWorkflowBill"},"description":"Bills to submit. If any bill cannot be submitted, the request fails and no bills are submitted."},"userId":{"type":"string","description":"User's Digits-assigned ID."},"userExternalId":{"type":"string","description":"User's caller-assigned ID, resolved on the backend."}},"description":"SubmitWorkflowBillsRequest submits a batch of draft bills for approval."},"SubmitWorkflowBillsResponse":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/BillWorkflowActionResult"},"description":"One result per requested bill, in the same order as the request."}},"description":"SubmitWorkflowBillsResponse returns the submitted bills and their updated workflow statuses."},"SyncDepartment":{"required":["externalId","name"],"type":"object","properties":{"externalId":{"type":"string"},"name":{"type":"string","description":"The name of the department. Must be unique within the same level of the hierarchy."},"description":{"type":"string","description":"The description of the department."},"parentId":{"type":"string","description":"Optional, the parent department's external id to represent the hierarchy of departments."}}},"SyncDepartmentsRequest":{"required":["departments"],"type":"object","properties":{"departments":{"type":"array","items":{"$ref":"#/components/schemas/SyncDepartment"},"description":"Departments is a batch of departments to sync into the ledger. Departments are stored for this particular source and can be associated with Transactions via their external IDs using DepartmentRefs."}}},"SyncDepartmentsResponse":{"type":"object","properties":{"success":{"type":"boolean"}}},"SyncLocation":{"required":["externalId","name"],"type":"object","properties":{"externalId":{"type":"string","description":"The external id of the location"},"parentId":{"type":"string","description":"The parent id of the parent of the location"},"name":{"type":"string","description":"The name of the location"}}},"SyncLocationsRequest":{"required":["locations"],"type":"object","properties":{"locations":{"type":"array","items":{"$ref":"#/components/schemas/SyncLocation"}}}},"SyncLocationsResponse":{"type":"object","properties":{"success":{"type":"boolean"}}},"SyncPartiesRequest":{"required":["parties"],"type":"object","properties":{"parties":{"type":"array","items":{"$ref":"#/components/schemas/SyncParty"},"description":"Parties is a batch of parties to sync into the ledger. Parties are stored for this particular source and can be associated with Transactions via their external IDs using PartyRefs.\n Within the Ledger, parties may be merged across sources when Digits identifies that they match."}}},"SyncPartiesResponse":{"type":"object","properties":{"parties":{"type":"array","items":{"$ref":"#/components/schemas/SourceParty"}}}},"SyncParty":{"required":["externalId","name"],"type":"object","properties":{"externalId":{"type":"string","description":"The external identifier for the party from the external system."},"name":{"type":"string","description":"The name of the party."},"email":{"type":"string","description":"The email address associated with the party."},"description":{"type":"string","description":"A description providing additional details about the party."},"kind":{"enum":["UnknownKind","Person","Business"],"type":"string","description":"The kind or type of party (e.g., individual, organization).","format":"enum"}},"description":"Represents a party entity to be synchronized to Digits."},"SyncProduct":{"required":["externalId","name"],"type":"object","properties":{"externalId":{"type":"string","description":"The external identifier for the product. Used for idempotency and deduplication."},"name":{"type":"string","description":"The name of the product."},"unitPrice":{"allOf":[{"$ref":"#/components/schemas/Currency"}],"description":"The unit price of the product."},"description":{"type":"string","description":"A description of the product."},"taxable":{"type":"boolean","description":"Whether the product is taxable."},"categoryLedgerId":{"allOf":[{"$ref":"#/components/schemas/Identifier"}],"description":"Reference to the category ledger account for this product."},"department":{"allOf":[{"$ref":"#/components/schemas/DepartmentRef"}],"description":"Reference to the department for this product."},"location":{"allOf":[{"$ref":"#/components/schemas/LocationRef"}],"description":"Reference to the location for this product."}},"description":"SyncProduct represents a product to be synced from an external source."},"SyncProductsRequest":{"required":["products"],"type":"object","properties":{"products":{"type":"array","items":{"$ref":"#/components/schemas/SyncProduct"},"description":"Products is a batch of products to sync. Products are stored for this particular source and can be referenced by their external IDs."}}},"SyncProductsResponse":{"type":"object","properties":{"products":{"type":"array","items":{"$ref":"#/components/schemas/SourceProduct"}}}},"SyncProject":{"required":["externalId"],"type":"object","properties":{"externalId":{"type":"string","description":"The external id of the project"}}},"SyncProjectsRequest":{"required":["projects"],"type":"object","properties":{"projects":{"type":"array","items":{"$ref":"#/components/schemas/SyncProject"}}}},"SyncProjectsResponse":{"type":"object","properties":{"success":{"type":"boolean"}}},"TokenRequest":{"required":["grant_type","client_id","client_secret"],"type":"object","properties":{"grant_type":{"enum":["authorization_code","refresh_token","client_credentials"],"type":"string","description":"The type of grant being requested, as defined in RFC 6749."},"client_id":{"type":"string","description":"The client application's unique identifier."},"client_secret":{"type":"string","description":"The client application's secret."},"code":{"type":"string","description":"grant_type: authorization_code"},"redirect_uri":{"type":"string"},"refresh_token":{"type":"string","description":"grant_type: refresh_token\n The refresh token issued to the client.\n Required when the grant_type is \"refresh_token\"."}}},"TokenResponse":{"type":"object","properties":{"access_token":{"type":"string","description":"The access token issued by the server to be used to authenticate requests."},"refresh_token":{"type":"string","description":"The refresh token, which can be used to obtain new access tokens."},"expires_in":{"type":"integer","description":"The lifetime in seconds of the access token.","format":"int32"},"token_type":{"type":"string","description":"The type of the token issued. Typically \"Bearer\" as defined in RFC 6750."},"scope":{"type":"string","description":"The scope of the access token granted by the server. This may be a\n subset of the scope originally requested by the client."}}},"Transaction":{"type":"object","properties":{"transactionId":{"type":"string","description":"The digits ledger transaction id"},"memo":{"type":"string","description":"The memo for the transaction"},"referenceNumber":{"type":"string","description":"The reference number associated with the transaction"},"amount":{"allOf":[{"$ref":"#/components/schemas/Currency"}],"description":"The amount of the transaction"},"date":{"type":"string","description":"The date the transaction was occurred at","format":"date-time"},"sources":{"type":"array","items":{"$ref":"#/components/schemas/TransactionSource"},"description":"The sources that this transaction was created from"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/Entry"},"description":"Individual entries / lines that comprise the transaction."},"bill":{"allOf":[{"$ref":"#/components/schemas/Bill"}],"description":"Additional properties specific to a bill associated with this transaction"},"invoice":{"allOf":[{"$ref":"#/components/schemas/Invoice"}],"description":"Additional properties specific to an invoice associated with this transaction"}},"description":"The details of a transaction along with the entries that comprise it"},"TransactionDeleteResponse":{"type":"object","properties":{}},"TransactionFieldSearchTerm":{"type":"object","properties":{"field":{"enum":["Unknown","Name","Description","ProductName","PartyName","InstitutionName","CategoryName","AmountTerm"],"type":"string","description":"The field to search within","format":"enum"},"term":{"type":"string","description":"The search term to apply to the field"}}},"TransactionSource":{"type":"object","properties":{"institution":{"$ref":"#/components/schemas/Institution"},"user":{"$ref":"#/components/schemas/User"}}},"TransactionSyncRequest":{"required":["transactions"],"type":"object","properties":{"transactions":{"type":"array","items":{"$ref":"#/components/schemas/SourceTransaction"},"description":"Transactions allows a batch (limit 100) to be upserted for a source.\n Upserted transactions will create or update existing transactions based on the external_id.\n Transactions added to this source's data will be merged into the Ledger with other sources."}}},"TransactionSyncResponse":{"type":"object","properties":{"message":{"type":"string","description":"A message indicating the result of the sync operation"},"upserted":{"type":"array","items":{"$ref":"#/components/schemas/TransactionSyncResponse_TransactionIdentifier"},"description":"The set of transactions that were upserted"}}},"TransactionSyncResponse_TransactionIdentifier":{"type":"object","properties":{"digitsId":{"type":"string"},"externalId":{"type":"string"}}},"TrialBalanceSummary":{"type":"object","properties":{"debits":{"$ref":"#/components/schemas/Currency"},"credits":{"$ref":"#/components/schemas/Currency"},"accountNumber":{"type":"string","description":"Optional account number"},"categoryId":{"type":"string","description":"Unique identifier for this category in the ledger"}}},"UpdateClientEmployeeRequest":{"required":["organizationRole"],"type":"object","properties":{"clientOrganizationId":{"type":"string","description":"Target client organization's Digits-assigned ID (provide `clientOrganizationId` or `clientOrganizationExternalId`)."},"clientOrganizationExternalId":{"type":"string","description":"Target client organization's caller-assigned ID (provide `clientOrganizationId` or `clientOrganizationExternalId`)."},"userId":{"type":"string","description":"User's Digits-assigned ID (provide `userId` or `userExternalId`)."},"userExternalId":{"type":"string","description":"User's caller-assigned ID (provide `userId` or `userExternalId`)."},"organizationRole":{"type":"string","description":"The user's role within the client organization."},"entities":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeEntityRoleInput"},"description":"Explicit role assignments within this client organization's entities. When `entityRole` is set, these override that default for named entities."},"entityRole":{"type":"string","description":"Employee-level default role for this client organization's entities. Stored for future entities and applied to existing entities unless `entities` provides overrides."}},"description":"Request to replace an employee's access within a client organization. The referenced user\n and client organization must already exist. `organizationRole` is required. Entity access is\n replaced by the provided default entity role (`entityRole`) and explicit per-entity role\n assignments (`entities`). When `entityRole` is set, `entities` override that default for named\n entities. When both are omitted, the employee has no entity access within this client organization."},"UpdateEmployeeRequest":{"required":["organizationRole"],"type":"object","properties":{"userId":{"type":"string","description":"User's Digits-assigned ID (provide `userId` or `userExternalId`)."},"userExternalId":{"type":"string","description":"User's caller-assigned ID (provide `userId` or `userExternalId`)."},"organizationRole":{"type":"string","description":"The employee's role within the organization."},"entities":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeEntityRoleInput"},"description":"Explicit role assignments on the organization's own entities. When `entityRole` is set, these override that default for named entities."},"clients":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeClientRoleInput"},"description":"Explicit role assignments on client entities. When `clientRole` is set, these override that default for named clients or entities."},"entityRole":{"type":"string","description":"Employee-level default role for the organization's own entities. Stored for future entities and applied to existing entities unless `entities` provides overrides."},"clientRole":{"type":"string","description":"Employee-level default role for client entities. Stored for future client entities and applied to current client access unless `clients` provides overrides."}},"description":"Request to fully replace an employee binding. Identify the employee by\n Digits-assigned ID or caller-assigned user ID. `organizationRole` is required.\n Optionally provide entity access (`entityRole`, `entities`, or both), client\n access (`clientRole`, `clients`, or both), or both. `entityRole` and\n `clientRole` are employee-level defaults: they are stored on the employee row\n for future entities or client entities, and applied to current access unless\n explicit `entities` or `clients` entries override them. Access omitted from\n the request is removed."},"UpdateWorkflowBillPaymentStatusRequest":{"required":["entity","updates"],"type":"object","properties":{"entity":{"allOf":[{"$ref":"#/components/schemas/WorkflowEntitySelector"}],"description":"Client organization and entity that owns the bills."},"updates":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowBillPaymentStatusUpdate"},"description":"Payment status updates to apply. If any update cannot be applied, the request fails and no updates are applied."},"userId":{"type":"string","description":"User's Digits-assigned ID."},"userExternalId":{"type":"string","description":"User's caller-assigned ID, resolved on the backend."}},"description":"UpdateWorkflowBillPaymentStatusRequest reports externally managed payment lifecycle updates for a batch of bills."},"UpdateWorkflowBillPaymentStatusResponse":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/BillWorkflowActionResult"},"description":"One result per requested update, in the same order as the request."}},"description":"UpdateWorkflowBillPaymentStatusResponse returns bills after externally managed payment status updates."},"User":{"type":"object","properties":{"id":{"type":"string"}}},"VoidWorkflowBill":{"required":["billId"],"type":"object","properties":{"billId":{"type":"string","description":"Bill's Digits-assigned identifier."},"reason":{"type":"string","description":"Optional reason to record for voiding the bill."}},"description":"VoidWorkflowBill identifies one bill to void."},"VoidWorkflowBillsRequest":{"required":["entity","bills"],"type":"object","properties":{"entity":{"allOf":[{"$ref":"#/components/schemas/WorkflowEntitySelector"}],"description":"Client organization and entity that owns the bills."},"bills":{"type":"array","items":{"$ref":"#/components/schemas/VoidWorkflowBill"},"description":"Bills to void. If any bill cannot be voided, the request fails and no bills are voided."},"userId":{"type":"string","description":"User's Digits-assigned ID."},"userExternalId":{"type":"string","description":"User's caller-assigned ID, resolved on the backend."}},"description":"VoidWorkflowBillsRequest voids a batch of eligible bills."},"VoidWorkflowBillsResponse":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/BillWorkflowActionResult"},"description":"One result per requested bill, in the same order as the request."}},"description":"VoidWorkflowBillsResponse returns the voided bills and their updated workflow statuses."},"WorkflowBill":{"type":"object","properties":{"id":{"type":"string","description":"Bill's Digits-assigned ID."},"externalId":{"allOf":[{"$ref":"#/components/schemas/Identifier"}],"description":"Bill's caller- or source-assigned ID, when the bill came from an external source."},"entityId":{"type":"string","description":"Digits-assigned ID of the legal entity that owns this bill."},"entityExternalId":{"type":"string","description":"Caller-assigned ID of the legal entity that owns this bill, when set."},"status":{"enum":["Unknown","Ingesting","Draft","AwaitingApproval","Approved","ProcessingPayment","Paid","Deleted","Rejected","Voided","Failed","Refunded","MarkAsPaid","ScheduledToBeSentForApproval"],"type":"string","description":"Public workflow status for this bill.","format":"enum"},"source":{"type":"string","description":"Public source label for where this bill originated, for example API, UI, or EMAIL."},"documentHash":{"type":"string","description":"Computed content hash of the bill document, when available."},"documentUrl":{"type":"string","description":"URL for accessing the bill document, when available."},"thumbnailUrl":{"type":"string","description":"URL for accessing a thumbnail image of the bill document, when available."},"invoiceNumber":{"type":"string","description":"Invoice number shown on the vendor bill."},"billDate":{"type":"string","description":"Date the vendor bill was issued.","format":"date-time"},"dueDate":{"type":"string","description":"Date the vendor bill is due.","format":"date-time"},"scheduledPaymentDate":{"type":"string","description":"Date this bill is scheduled for payment.","format":"date-time"},"amount":{"allOf":[{"$ref":"#/components/schemas/Currency"}],"description":"Current total amount due on the bill, before Digits payment fees."},"vendor":{"allOf":[{"$ref":"#/components/schemas/BillVendor"}],"description":"Vendor or payee associated with the bill."},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/BillLineItem"},"description":"Accounting line items for the bill."},"memo":{"type":"string","description":"Free-form memo associated with the bill."},"referenceNumber":{"type":"string","description":"Payment reference number for externally managed or manually recorded payments."},"billPaymentId":{"type":"string","description":"Current payment record for this bill, when one has been created."},"statusAt":{"type":"string","description":"Time this bill entered its current status.","format":"date-time"},"createdAt":{"type":"string","description":"Time this bill was created in Digits.","format":"date-time"},"updatedAt":{"type":"string","description":"Time this bill was last updated in Digits.","format":"date-time"},"selectedDestinationPaymentInstrument":{"allOf":[{"$ref":"#/components/schemas/DestinationPaymentInstrument"}],"description":"Selected vendor destination payment instrument for this bill, when one has\n been selected."},"selectedSourcePaymentInstrument":{"allOf":[{"$ref":"#/components/schemas/PaymentInstrument"}],"description":"Selected source payment instrument used to fund this bill payment, when one\n has been selected."}},"description":"WorkflowBill is the public workflow view of a payable bill."},"WorkflowBillPaymentStatusUpdate":{"required":["billId","status"],"type":"object","properties":{"billId":{"type":"string","description":"Bill's Digits-assigned identifier."},"status":{"enum":["Unknown","Ingesting","Draft","AwaitingApproval","Approved","ProcessingPayment","Paid","Deleted","Rejected","Voided","Failed","Refunded","MarkAsPaid","ScheduledToBeSentForApproval"],"type":"string","description":"New workflow status for the bill after the externally managed payment update.","format":"enum"},"referenceNumber":{"type":"string","description":"Payment reference number for the external payment, when available."},"effectiveAt":{"type":"string","description":"Time the status change took effect.","format":"date-time"},"note":{"type":"string","description":"Free-form note to record with the status change."}},"description":"WorkflowBillPaymentStatusUpdate reports one externally managed payment lifecycle update."},"WorkflowEntitySelector":{"type":"object","properties":{"clientOrganizationExternalId":{"type":"string","description":"Client organization's caller-assigned ID."},"clientOrganizationId":{"type":"string","description":"Client organization's Digits-assigned ID."},"clientEntityExternalId":{"type":"string","description":"Client entity's caller-assigned ID."},"clientEntityId":{"type":"string","description":"Client entity's Digits-assigned ID."}},"description":"WorkflowEntitySelector identifies the client organization and entity a\n workflow bill request operates on, by Digits-assigned or caller-assigned ID.\n Required on all workflow bill requests so a single client_credentials\n credential can address any entity it has access to."},"StatementRowRef":{"type":"object","properties":{"label":{"type":"string"},"total":{"$ref":"#/components/schemas/Currency"},"summary":{"$ref":"#/components/schemas/SectionSummary"},"category":{"$ref":"#/components/schemas/CategorySummary"},"agingSummary":{"$ref":"#/components/schemas/AgingSummary"},"partyAgingSummary":{"$ref":"#/components/schemas/PartyAgingSummary"},"invoiceAgingSummary":{"$ref":"#/components/schemas/InvoiceAgingSummary"},"trialBalanceSummary":{"$ref":"#/components/schemas/TrialBalanceSummary"},"children":{"type":"array","items":{"type":"object"},"description":"Statements are hierarchical"}}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"security":[{"bearerAuth":[]}],"tags":[{"name":"AuthorizationService"},{"name":"ClientEmployeeService","description":"Manage client employee access to client organizations and their entities."},{"name":"ClientEntityService","description":"Manage entities within a client organization."},{"name":"ClientPaymentInstrumentService","description":"Manage payment instruments owned by client entities."},{"name":"CompanyService"},{"name":"ConnectionSourceService"},{"name":"EntityPaymentInstrumentService","description":"Manage payment instruments owned by organization entities."},{"name":"LedgerCategoryService"},{"name":"LedgerDepartmentService"},{"name":"LedgerLocationService"},{"name":"LedgerPartyService"},{"name":"LedgerProjectService"},{"name":"LedgerStatementsService"},{"name":"LedgerSummaryService"},{"name":"LedgerTransactionService"},{"name":"OrganizationClientService","description":"Manage client organizations affiliated with the organization. These endpoints\n apply to organizations that manage client organizations. For direct entity\n management, use OrganizationEntityService."},{"name":"OrganizationEmployeeService","description":"Manage employees of the caller's organization. An employee is a binding\n between a user and the organization. Every employee must have an organization\n role. Employees may be granted access to either the organization's own entities\n via entity roles or clients' entities via client roles depending on the\n organization's type."},{"name":"OrganizationEntityService","description":"Manage entities owned directly by the organization. These endpoints apply\n to organizations that directly own their entities, not organizations that\n manage client entities."},{"name":"OrganizationService","description":"The caller's own organization."},{"name":"SSOAuditService","description":"Audit SSO-provisioned users and their client organization access.\n SSO users with no client organization access are included with an empty\n `clientOrganizations` list."},{"name":"SSOConfigService"},{"name":"SSOUserService","description":"Manage SSO-provisioned users. The organization must have SSO configured\n before using these endpoints. SSO users are managed externally and do not\n receive standard provisioning notifications."},{"name":"SourceDepartmentService"},{"name":"SourceLocationService"},{"name":"SourceMetricService"},{"name":"SourcePartyService"},{"name":"SourceProductService"},{"name":"SourceProjectService"},{"name":"SourceTransactionService"},{"name":"WorkflowBillService"}]}