{"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","parameters":[{"name":"entity.id","in":"query","description":"Entity's Digits-assigned ID, obtained from entity discovery. Required unless\n external_id is supplied or the token already identifies the entity.","schema":{"type":"string"}},{"name":"entity.externalId","in":"query","description":"Entity's caller-assigned ID in the authorizing organization's namespace.\n Alternative to id for organization-level tokens; not a source or transaction ID.","schema":{"type":"string"}}],"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.\n\n Requires scope: `source:sync`.","operationId":"ConnectionSourceService_List","parameters":[{"name":"entity.id","in":"query","description":"Entity's Digits-assigned ID, obtained from entity discovery. Required unless\n external_id is supplied or the token already identifies the entity.","schema":{"type":"string"}},{"name":"entity.externalId","in":"query","description":"Entity's caller-assigned ID in the authorizing organization's namespace.\n Alternative to id for organization-level tokens; not a source or transaction ID.","schema":{"type":"string"}}],"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 archive 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.\n\n Each request must include the complete set of sources for this connection.\n When omitted from a subsequent sync, existing sources become archived and their data remains in the ledger.\n Archived sources are excluded from List Sources. Syncing the same external_id again reactivates the source.\n\n Requires scope: `source:sync`.","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/bills/query":{"post":{"tags":["LedgerBillService"],"summary":"Query Bills","description":"Query ledger-backed bills from the published view. Requires scope: `ledger:read`.","operationId":"LedgerBillService_Query","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryLedgerBillsRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryLedgerBillsResponse"}}}},"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.\n\n Requires scope: `ledger:read`.","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"}},{"name":"entity.id","in":"query","description":"Entity's Digits-assigned ID, obtained from entity discovery. Required unless\n external_id is supplied or the token already identifies the entity.","schema":{"type":"string"}},{"name":"entity.externalId","in":"query","description":"Entity's caller-assigned ID in the authorizing organization's namespace.\n Alternative to id for organization-level tokens; not a source or transaction ID.","schema":{"type":"string"}}],"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.\n\n Requires scope: `ledger:read`.","operationId":"LedgerCategoryService_Get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"entity.id","in":"query","description":"Entity's Digits-assigned ID, obtained from entity discovery. Required unless\n external_id is supplied or the token already identifies the entity.","schema":{"type":"string"}},{"name":"entity.externalId","in":"query","description":"Entity's caller-assigned ID in the authorizing organization's namespace.\n Alternative to id for organization-level tokens; not a source or transaction ID.","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.\n\n Requires scope: `ledger:read`.","operationId":"LedgerDepartmentService_Get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"entity.id","in":"query","description":"Entity's Digits-assigned ID, obtained from entity discovery. Required unless\n external_id is supplied or the token already identifies the entity.","schema":{"type":"string"}},{"name":"entity.externalId","in":"query","description":"Entity's caller-assigned ID in the authorizing organization's namespace.\n Alternative to id for organization-level tokens; not a source or transaction ID.","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.\n\n Requires scope: `ledger:read`.","operationId":"LedgerDepartmentService_List","parameters":[{"name":"active","in":"query","description":"Filter by activity. Omitted returns all departments.","schema":{"type":"boolean"}},{"name":"entity.id","in":"query","description":"Entity's Digits-assigned ID, obtained from entity discovery. Required unless\n external_id is supplied or the token already identifies the entity.","schema":{"type":"string"}},{"name":"entity.externalId","in":"query","description":"Entity's caller-assigned ID in the authorizing organization's namespace.\n Alternative to id for organization-level tokens; not a source or transaction ID.","schema":{"type":"string"}}],"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.\n\n Requires scope: `ledger:read`.","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"}},{"name":"entity.id","in":"query","description":"Entity's Digits-assigned ID, obtained from entity discovery. Required unless\n external_id is supplied or the token already identifies the entity.","schema":{"type":"string"}},{"name":"entity.externalId","in":"query","description":"Entity's caller-assigned ID in the authorizing organization's namespace.\n Alternative to id for organization-level tokens; not a source or transaction ID.","schema":{"type":"string"}}],"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.\n\n Requires scope: `ledger:read`.","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/invoices/query":{"post":{"tags":["LedgerInvoiceService"],"summary":"Query Invoices","description":"Query ledger-backed invoices from the published view. Requires scope: `ledger:read`.","operationId":"LedgerInvoiceService_Query","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryLedgerInvoicesRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryLedgerInvoicesResponse"}}}},"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.\n\n Requires scope: `ledger:read`.","operationId":"LedgerLocationService_Get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"entity.id","in":"query","description":"Entity's Digits-assigned ID, obtained from entity discovery. Required unless\n external_id is supplied or the token already identifies the entity.","schema":{"type":"string"}},{"name":"entity.externalId","in":"query","description":"Entity's caller-assigned ID in the authorizing organization's namespace.\n Alternative to id for organization-level tokens; not a source or transaction ID.","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.\n\n Requires scope: `ledger:read`.","operationId":"LedgerLocationService_List","parameters":[{"name":"entity.id","in":"query","description":"Entity's Digits-assigned ID, obtained from entity discovery. Required unless\n external_id is supplied or the token already identifies the entity.","schema":{"type":"string"}},{"name":"entity.externalId","in":"query","description":"Entity's caller-assigned ID in the authorizing organization's namespace.\n Alternative to id for organization-level tokens; not a source or transaction ID.","schema":{"type":"string"}}],"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.\n\n Requires scope: `ledger:read`.","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":"roles","in":"query","description":"Filter by accounting role. Parties must match at least one requested role and all other supplied filters.\n Omit to include parties regardless of role. UnknownRole and unrecognized values are not accepted.\n Vendors span multiple accounting roles; include all vendor-related roles to retrieve the full vendor list.","schema":{"type":"array","items":{"enum":["UnknownRole","EntityVendorRole","EntityCustomerRole","EntitySupplierRole","EntityUnspecifiedRole","InstitutionDebitRole","InstitutionCreditRole","PaymentProcessorRole","FacilitatorRole","OwnerRole","EntityShareholderRole","EntityLiabilitiesRole","EntityOwedVendorRole","EntityLenderRole","EntityAssetRole","EntityPrepaidVendorRole","EntityUnpaidCustomerRole","EntityAssetVendorRole","EntityOtherIncomeRole","EntityOtherExpensesRole","EntityAssetSupplierRole","EntityProcessorRole","EntityDebtorRole","EntityInvesteeRole","EntityBanksRole","EntityOtherLiabilitiesRole","EntityCreditCardsRole","EntityRevenuePartnerRole"],"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"}},{"name":"entity.id","in":"query","description":"Entity's Digits-assigned ID, obtained from entity discovery. Required unless\n external_id is supplied or the token already identifies the entity.","schema":{"type":"string"}},{"name":"entity.externalId","in":"query","description":"Entity's caller-assigned ID in the authorizing organization's namespace.\n Alternative to id for organization-level tokens; not a source or transaction ID.","schema":{"type":"string"}}],"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.\n\n Requires scope: `ledger:read`.","operationId":"LedgerPartyService_Get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"entity.id","in":"query","description":"Entity's Digits-assigned ID, obtained from entity discovery. Required unless\n external_id is supplied or the token already identifies the entity.","schema":{"type":"string"}},{"name":"entity.externalId","in":"query","description":"Entity's caller-assigned ID in the authorizing organization's namespace.\n Alternative to id for organization-level tokens; not a source or transaction ID.","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.\n\n Requires scope: `ledger:read`.","operationId":"LedgerProjectService_Get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"entity.id","in":"query","description":"Entity's Digits-assigned ID, obtained from entity discovery. Required unless\n external_id is supplied or the token already identifies the entity.","schema":{"type":"string"}},{"name":"entity.externalId","in":"query","description":"Entity's caller-assigned ID in the authorizing organization's namespace.\n Alternative to id for organization-level tokens; not a source or transaction ID.","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.\n\n Requires scope: `ledger:read`.","operationId":"LedgerProjectService_List","parameters":[{"name":"entity.id","in":"query","description":"Entity's Digits-assigned ID, obtained from entity discovery. Required unless\n external_id is supplied or the token already identifies the entity.","schema":{"type":"string"}},{"name":"entity.externalId","in":"query","description":"Entity's caller-assigned ID in the authorizing organization's namespace.\n Alternative to id for organization-level tokens; not a source or transaction ID.","schema":{"type":"string"}}],"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.\n\n Requires scope: `ledger:read`.","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"}},{"name":"entity.id","in":"query","description":"Entity's Digits-assigned ID, obtained from entity discovery. Required unless\n external_id is supplied or the token already identifies the entity.","schema":{"type":"string"}},{"name":"entity.externalId","in":"query","description":"Entity's caller-assigned ID in the authorizing organization's namespace.\n Alternative to id for organization-level tokens; not a source or transaction ID.","schema":{"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/aging/receivable":{"get":{"tags":["LedgerStatementsService"],"summary":"A/R Aging","description":"Generate an accounts receivable aging report.\n\n Requires scope: `ledger:read`.","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"}},{"name":"entity.id","in":"query","description":"Entity's Digits-assigned ID, obtained from entity discovery. Required unless\n external_id is supplied or the token already identifies the entity.","schema":{"type":"string"}},{"name":"entity.externalId","in":"query","description":"Entity's caller-assigned ID in the authorizing organization's namespace.\n Alternative to id for organization-level tokens; not a source or transaction ID.","schema":{"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/balance-sheet":{"get":{"tags":["LedgerStatementsService"],"summary":"Balance Sheet","description":"Generate a balance sheet statement.\n\n Requires scope: `ledger:read`.","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"}}},{"name":"entity.id","in":"query","description":"Entity's Digits-assigned ID, obtained from entity discovery. Required unless\n external_id is supplied or the token already identifies the entity.","schema":{"type":"string"}},{"name":"entity.externalId","in":"query","description":"Entity's caller-assigned ID in the authorizing organization's namespace.\n Alternative to id for organization-level tokens; not a source or transaction ID.","schema":{"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.\n\n Requires scope: `ledger:read`.","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"}}},{"name":"entity.id","in":"query","description":"Entity's Digits-assigned ID, obtained from entity discovery. Required unless\n external_id is supplied or the token already identifies the entity.","schema":{"type":"string"}},{"name":"entity.externalId","in":"query","description":"Entity's caller-assigned ID in the authorizing organization's namespace.\n Alternative to id for organization-level tokens; not a source or transaction ID.","schema":{"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.\n\n Requires scope: `ledger:read`.","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"}}},{"name":"entity.id","in":"query","description":"Entity's Digits-assigned ID, obtained from entity discovery. Required unless\n external_id is supplied or the token already identifies the entity.","schema":{"type":"string"}},{"name":"entity.externalId","in":"query","description":"Entity's caller-assigned ID in the authorizing organization's namespace.\n Alternative to id for organization-level tokens; not a source or transaction ID.","schema":{"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.\n\n Requires scope: `ledger:read`.","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"}},{"name":"entity.id","in":"query","description":"Entity's Digits-assigned ID, obtained from entity discovery. Required unless\n external_id is supplied or the token already identifies the entity.","schema":{"type":"string"}},{"name":"entity.externalId","in":"query","description":"Entity's caller-assigned ID in the authorizing organization's namespace.\n Alternative to id for organization-level tokens; not a source or transaction ID.","schema":{"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/summary":{"get":{"tags":["LedgerSummaryService"],"summary":"Get Summary","description":"Get a summary of ledger transactions.\n\n Requires scope: `ledger:read`.","operationId":"LedgerSummaryService_Summarize","parameters":[{"name":"comingSoon","in":"query","schema":{"type":"string"}},{"name":"entity.id","in":"query","description":"Entity's Digits-assigned ID, obtained from entity discovery. Required unless\n external_id is supplied or the token already identifies the entity.","schema":{"type":"string"}},{"name":"entity.externalId","in":"query","description":"Entity's caller-assigned ID in the authorizing organization's namespace.\n Alternative to id for organization-level tokens; not a source or transaction ID.","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.\n\n Requires scope: `ledger:read`.","operationId":"LedgerTransactionService_GetTransaction","parameters":[{"name":"id","in":"path","description":"The digits ledger transaction id","required":true,"schema":{"type":"string"}},{"name":"entity.id","in":"query","description":"Entity's Digits-assigned ID, obtained from entity discovery. Required unless\n external_id is supplied or the token already identifies the entity.","schema":{"type":"string"}},{"name":"entity.externalId","in":"query","description":"Entity's caller-assigned ID in the authorizing organization's namespace.\n Alternative to id for organization-level tokens; not a source or transaction ID.","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":"Obtain an access token using client_credentials for a service account, or exchange\n an authorization_code or refresh_token for an entity or organization app.\n App grants return a refresh token; client_credentials does not. Organization-level\n tokens require an entity selector on entity-specific requests, including source writes.","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.\n\n Requires scope: `organization:sync`.","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.\n\n Requires scope: `organization:sync`.","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.\n\n Requires scope: `organization:sync`.","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.\n\n Requires scope: `organization:sync`.","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.\n\n Requires scope: `organization:sync`.","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.\n\n Requires scope: `organization:sync`.","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.\n\n Requires scope: `organization:sync`.","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, reactivate, or additively update an employee binding. The user must\n already exist (either provisioned via SSO or as an existing Digits user). This\n operation is synchronous. If the employee binding already exists and is active,\n the supplied access is merged in: named bindings are added or their role updated,\n and access omitted from the request is never removed; the required\n organizationRole always overwrites the current organization role. Use Update\n Employee to fully replace access, or Delete Employee to remove it.\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.\n\n Requires scope: `organization:sync`.","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.\n\n Requires scope: `organization:sync`.","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.\n\n Requires scope: `organization:sync`.","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 active departments saved for this source. Updates are available here\n immediately after a successful sync, even if they have not yet appeared in the ledger.\n\n Requires scope: `source:sync`.","operationId":"SourceDepartmentService_List","parameters":[{"name":"entity.id","in":"query","description":"Entity's Digits-assigned ID, obtained from entity discovery. Required unless\n external_id is supplied or the token already identifies the entity.","schema":{"type":"string"}},{"name":"entity.externalId","in":"query","description":"Entity's caller-assigned ID in the authorizing organization's namespace.\n Alternative to id for organization-level tokens; not a source or transaction ID.","schema":{"type":"string"}}],"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":"Sync the complete list of departments for this source, matching by external ID.\n Omitted departments become inactive; an empty list deactivates all departments\n for this source. Parent departments must be included in the same request.\n A successful response confirms that the departments were saved. Changes may\n take time to appear in the ledger.\n\n Requires scope: `source:sync`.","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.\n\n Requires scope: `source:sync`.","operationId":"SourceLocationService_List","parameters":[{"name":"entity.id","in":"query","description":"Entity's Digits-assigned ID, obtained from entity discovery. Required unless\n external_id is supplied or the token already identifies the entity.","schema":{"type":"string"}},{"name":"entity.externalId","in":"query","description":"Entity's caller-assigned ID in the authorizing organization's namespace.\n Alternative to id for organization-level tokens; not a source or transaction ID.","schema":{"type":"string"}}],"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.\n\n Requires scope: `source:sync`.","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.\n\n Requires scope: `source:sync`.","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.\n\n Requires scope: `source:sync`.","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"}},{"name":"entity.id","in":"query","description":"Entity's Digits-assigned ID, obtained from entity discovery. Required unless\n external_id is supplied or the token already identifies the entity.","schema":{"type":"string"}},{"name":"entity.externalId","in":"query","description":"Entity's caller-assigned ID in the authorizing organization's namespace.\n Alternative to id for organization-level tokens; not a source or transaction ID.","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.\n\n Requires scope: `source:sync`.","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.\n\n Requires scope: `source:sync`.","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"}},{"name":"entity.id","in":"query","description":"Entity's Digits-assigned ID, obtained from entity discovery. Required unless\n external_id is supplied or the token already identifies the entity.","schema":{"type":"string"}},{"name":"entity.externalId","in":"query","description":"Entity's caller-assigned ID in the authorizing organization's namespace.\n Alternative to id for organization-level tokens; not a source or transaction ID.","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.\n\n Requires scope: `source:sync`.","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.\n\n Requires scope: `source:sync`.","operationId":"SourceProjectService_List","parameters":[{"name":"entity.id","in":"query","description":"Entity's Digits-assigned ID, obtained from entity discovery. Required unless\n external_id is supplied or the token already identifies the entity.","schema":{"type":"string"}},{"name":"entity.externalId","in":"query","description":"Entity's caller-assigned ID in the authorizing organization's namespace.\n Alternative to id for organization-level tokens; not a source or transaction ID.","schema":{"type":"string"}}],"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.\n\n Requires scope: `source:sync`.","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.\n\n Requires scope: `source:sync`.","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.\n\n Requires scope: `source:sync`.","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"}}},{"name":"entity.id","in":"query","description":"Entity's Digits-assigned ID, obtained from entity discovery. Required unless\n external_id is supplied or the token already identifies the entity.","schema":{"type":"string"}},{"name":"entity.externalId","in":"query","description":"Entity's caller-assigned ID in the authorizing organization's namespace.\n Alternative to id for organization-level tokens; not a source or transaction ID.","schema":{"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/source/transactions/void":{"post":{"tags":["SourceTransactionService"],"summary":"Void Transactions","description":"Void selected transactions linked to a bill or invoice, without cascading.\n\n Requires scope: `source:sync`.","operationId":"SourceTransactionService_Void","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionVoidRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionVoidResponse"}}}},"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.\n\n Requires scope: `user:sync`.","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.\n\n Requires scope: `user:sync`.","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.\n\n Requires scope: `user:sync`.","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.\n\n Requires scope: `user:sync`.","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/ingest":{"post":{"tags":["WorkflowBillService"],"summary":"Ingest Workflow Bill","description":"Ingest one vendor bill document for asynchronous processing. Repeating an\n equivalent request with the same external ID returns the existing bill and\n attempt identities; a different request with that external ID is rejected.\n\n Requires scope: `bills:manage`.","operationId":"WorkflowBillService_Ingest","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestWorkflowBillRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestWorkflowBillResponse"}}}},"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/sync":{"post":{"tags":["WorkflowBillService"],"summary":"Sync Workflow Bills","description":"Create or reconcile 1–100 complete workflow bills as full snapshots. An\n exact replay returns the same bill identities without an Accounting write;\n a material update follows the bill's current lifecycle and approver-access\n policy. Results preserve request order.\n\n Validation and payment-destination preflight finish before Accounting.\n Accounting commits the bill batch atomically, then Payments reconciles\n destinations atomically, then bill events publish. A failure in a later\n service does not roll back an earlier service's committed work.\n\n Webhook event identity uses the persisted whole-second bill mutation\n time. Two material updates to the same bill within one second can share a\n deduplication key and suppress the later webhook. An exact no-op replay\n cannot recover a missing event after the mutation has committed.\n\n Requires scope: `bills:manage`.","operationId":"WorkflowBillService_Sync","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncWorkflowBillsRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncWorkflowBillsResponse"}}}},"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"}}},"BillApprover":{"type":"object","properties":{"userId":{"type":"string","description":"Approver's Digits-assigned user ID."},"name":{"type":"string","description":"Approver's display name."},"userExternalId":{"type":"string","description":"Approver's caller-assigned external ID, when the caller's organization has\n registered one for this user via user sync."}},"description":"BillApprover identifies the user assigned to approve a workflow bill."},"BillExternalPayment":{"type":"object","properties":{"id":{"type":"string","description":"Payment record's Digits-assigned ID."},"amount":{"allOf":[{"$ref":"#/components/schemas/Currency"}],"description":"Amount recorded for the payment."},"paidAt":{"type":"string","description":"Date the bill was paid.","format":"date-time"},"referenceNumber":{"type":"string","description":"Caller-supplied payment reference number, when set."},"destinationPaymentInstrument":{"allOf":[{"$ref":"#/components/schemas/DestinationPaymentInstrument"}],"description":"Vendor destination payment instrument that received the payment."},"sourcePaymentInstrument":{"allOf":[{"$ref":"#/components/schemas/PaymentInstrument"}],"description":"Externally managed source payment instrument the payment was funded\n from, when known."}},"description":"BillExternalPayment summarizes the external payment recorded against a\n workflow bill. A bill carrying an external payment presents its instrument\n details here instead of the read-time selected_*_payment_instrument\n preselections."},"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."},"categoryName":{"type":"string","description":"Ledger category display name, when available."}},"description":"BillLineItem describes one accounting line item on a workflow bill."},"BillRef":{"required":["externalId"],"type":"object","properties":{"externalId":{"allOf":[{"$ref":"#/components/schemas/Identifier"}],"description":"The external_id the Bill was created with."}},"description":"BillRef references an existing Bill by its external identifier."},"BillSummary":{"type":"object","properties":{"bill":{"$ref":"#/components/schemas/Bill"},"externalId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"vendor":{"$ref":"#/components/schemas/Party"},"originalAmount":{"allOf":[{"$ref":"#/components/schemas/Currency"}],"description":"Original amount from originating ledger entries, excluding detected reversing entries. USD only."},"amountDue":{"allOf":[{"$ref":"#/components/schemas/Currency"}],"description":"Remaining balance: positive when outstanding, zero when cleared, negative for overpayment or credit. USD only."},"paidAt":{"type":"string","description":"When the positive original obligation became fully covered (including overpayment), using ledger posting timestamps.\n Later excess payments do not change this date. If the balance reopens, this is the subsequent settlement date.\n For prepayments, this is when the covered obligation was posted.\n Absent when not paid or when required activity timestamps are unknown; absence alone does not imply money is due.","format":"date-time"},"reversedAt":{"type":"string","description":"Latest known posting timestamp of a detected reversing entry, including a void or write-off.","format":"date-time"}},"description":"Accounting summary of a bill from the published accounting view. Unposted drafts are excluded."},"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","IngestionFailed"],"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"},"ids":{"type":"array","items":{"type":"string"},"description":"Digits-assigned user IDs of the employees whose bindings were deleted."},"externalIds":{"type":"array","items":{"type":"string"},"description":"The subset of the request's external_ids that resolved to a deleted\n employee. Employees targeted by Digits-assigned id are not represented here."}}},"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"},"ids":{"type":"array","items":{"type":"string"},"description":"Digits-assigned IDs of the entities that were deleted."},"externalIds":{"type":"array","items":{"type":"string"},"description":"Caller-assigned IDs of those deleted entities, where known."}}},"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"},"ids":{"type":"array","items":{"type":"string"},"description":"Digits-assigned IDs of the client organizations that were deleted."},"externalIds":{"type":"array","items":{"type":"string"},"description":"Caller-assigned IDs of those deleted client organizations, where known."}}},"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"},"ids":{"type":"array","items":{"type":"string"},"description":"Digits-assigned user IDs of the employees whose bindings were deleted."},"externalIds":{"type":"array","items":{"type":"string"},"description":"The subset of the request's external_ids that resolved to a deleted\n employee. Employees targeted by Digits-assigned id are not represented here."}}},"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"},"ids":{"type":"array","items":{"type":"string"},"description":"Digits-assigned IDs of the SSO users that were deleted."},"externalIds":{"type":"array","items":{"type":"string"},"description":"Caller-assigned IDs of the deleted SSO users, where known."}}},"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","subtype"],"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":{"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":"Subtype is required whenever a category search is used (that is, when the\n label is mapped by search rather than by category_id). It must be a valid\n subtype for the given Type, and is used to locate a matching category or to\n create one.","format":"enum"},"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."},"slug":{"type":"string","description":"The legal entity's current URL slug, without the @ prefix (for example, acme in https://my.digits.com/@acme/home).\n Slugs can change; use id as the durable identifier."}}},"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":"Optional chart of accounts template ID owned by the caller's organization.\n When set, this template takes precedence. When omitted, the organization's\n sole active template is used; if it has zero or multiple active templates,\n the Digits canonical template is used."},"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."},"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":"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, reactivate, or additively update an employee binding. The\n referenced user must already exist. If the employee binding already exists and\n is active, the supplied access is merged in: named bindings are added or their\n role updated, and access omitted from the request is never removed (use\n UpdateEmployeeRequest to fully replace access). `organizationRole` is required\n and always overwrites the employee's current organization role. 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":"Optional chart of accounts template ID owned by the caller's organization.\n When set, this template takes precedence. When omitted, the organization's\n sole active template is used; if it has zero or multiple active templates,\n the Digits canonical template is used."},"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¢.","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"},"active":{"type":"boolean","description":"Whether the department is active."}}},"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."},"beneficiaryName":{"type":"string","description":"Beneficiary name for wire transfers, when wire payments are supported."},"beneficiaryAddress":{"allOf":[{"$ref":"#/components/schemas/Address"}],"description":"Beneficiary address for wire transfers, when wire payments are supported."},"accountType":{"enum":["Unknown","Checking","Savings"],"type":"string","description":"The type of bank account used by the destination bank account, when known.","format":"enum"}},"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."},"deliverySpeed":{"enum":["DeliverySpeedUnspecified","Regular","Expedited","Overnight"],"type":"string","description":"Delivery speed for this destination, when set.","format":"enum"}},"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)."},"emailAddress":{"type":"string","description":"Digits-generated address for forwarding vendor bills and invoices to this\n entity. Documents emailed here are ingested as bills. Read-only."}},"description":"A legal entity within an organization. Entities represent individual\n businesses or accounting units that contain their own financial data."},"EntitySelector":{"type":"object","properties":{"id":{"type":"string","description":"Entity's Digits-assigned ID, obtained from entity discovery. Required unless\n external_id is supplied or the token already identifies the entity."},"externalId":{"type":"string","description":"Entity's caller-assigned ID in the authorizing organization's namespace.\n Alternative to id for organization-level tokens; not a source or transaction ID."}},"description":"Selects one entity for a financial request. Required for organization-level tokens\n from service accounts and organization apps. Entity-app tokens remain bound to\n their authorized entity. Use entity.id in GET query parameters or a top-level\n entity object in JSON requests. Supply only one identifier."},"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"},"transactionType":{"enum":["Unknown","JournalEntry","PayIn","PayOut","BankTransfer","Bill","Invoice"],"type":"string","description":"The overall transaction type","format":"enum"},"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."},"deliverySpeed":{"enum":["DeliverySpeedUnspecified","Regular","Expedited","Overnight"],"type":"string","description":"Optional override for the delivery speed snapshotted on this payment.\n Omit (DeliverySpeedUnspecified) to record the destination instrument's\n current delivery speed.","format":"enum"}},"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."},"IngestWorkflowBillRequest":{"required":["entity","externalId","document"],"type":"object","properties":{"entity":{"allOf":[{"$ref":"#/components/schemas/WorkflowEntitySelector"}],"description":"Client organization and entity that owns the bill."},"userId":{"type":"string","description":"User's Digits-assigned ID."},"userExternalId":{"type":"string","description":"User's caller-assigned ID, resolved on the backend."},"externalId":{"type":"string","description":"Caller-assigned bill ID. Together with the resolved application data\n source, this is the stable replay and conflict boundary."},"vendor":{"allOf":[{"$ref":"#/components/schemas/WorkflowBillIngestVendor"}],"description":"Existing vendor selector or vendor definition. A new external ID creates\n the vendor. For an existing external ID, stored profile fields remain\n authoritative while new payment destinations may still be added. Omit to\n use the vendor extracted from the document and best-effort data-source matching."},"document":{"allOf":[{"$ref":"#/components/schemas/WorkflowBillIngestDocument"}],"description":"The single document to ingest."},"invoiceNumber":{"type":"string","description":"Authoritative invoice number. Omit to use the extracted value."},"referenceNumber":{"type":"string","description":"Authoritative reference number. Omit when the bill has no caller-assigned reference."},"billDate":{"type":"string","description":"Authoritative bill date. Omit to use the extracted value.","format":"date-time"},"dueDate":{"type":"string","description":"Authoritative due date. Omit to use the extracted value.","format":"date-time"},"memo":{"type":"string","description":"Authoritative memo. Omit to use the extracted value."},"approverUserId":{"type":"string","description":"Authoritative Digits-assigned approver user ID. Omit to use workflow defaults."}},"description":"IngestWorkflowBillRequest accepts exactly one vendor bill document for\n asynchronous extraction and workflow creation."},"IngestWorkflowBillResponse":{"type":"object","properties":{"billId":{"type":"string","description":"Stable Digits-assigned bill ID, preserved across failed-attempt retries."},"ingestionAttemptId":{"type":"string","description":"Ingestion attempt ID. This is also the durable acceptance-operation ID and\n changes only when retrying an attempt that reached IngestionFailed."}},"description":"IngestWorkflowBillResponse returns the durable identities reserved for the\n accepted ingest. Processing continues asynchronously."},"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":"The external_id the Invoice was created with."}},"description":"InvoiceRef references an existing Invoice by its external identifier."},"InvoiceSummary":{"type":"object","properties":{"invoice":{"$ref":"#/components/schemas/Invoice"},"externalId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"customer":{"$ref":"#/components/schemas/Party"},"originalAmount":{"allOf":[{"$ref":"#/components/schemas/Currency"}],"description":"Original amount from originating ledger entries, excluding detected reversing entries. USD only."},"amountDue":{"allOf":[{"$ref":"#/components/schemas/Currency"}],"description":"Remaining balance: positive when outstanding, zero when cleared, negative for overpayment or credit. USD only."},"paidAt":{"type":"string","description":"When the positive original obligation became fully covered (including overpayment), using ledger posting timestamps.\n Later excess payments do not change this date. If the balance reopens, this is the subsequent settlement date.\n For prepayments, this is when the covered obligation was posted.\n Absent when not paid or when required activity timestamps are unknown; absence alone does not imply money is due.","format":"date-time"},"reversedAt":{"type":"string","description":"Latest known posting timestamp of a detected reversing entry, including a void or write-off.","format":"date-time"}},"description":"Accounting summary of an invoice from the published accounting view. Unposted drafts are excluded."},"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"},"entity":{"allOf":[{"$ref":"#/components/schemas/EntitySelector"}],"description":"entity to scope the request to. Optional unless using an organization-level token."}}},"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"},"transactionTypes":{"type":"array","items":{"enum":["Unknown","JournalEntry","PayIn","PayOut","BankTransfer","Bill","Invoice"],"type":"string","format":"enum"},"description":"Match any supplied type; empty means unrestricted. Combines with other filters using AND.\n Supports PayIn, PayOut, JournalEntry, BankTransfer, Bill, and Invoice; Unknown is invalid."},"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"}}},"LedgerObjectFilters":{"type":"object","properties":{"digitsObjectIds":{"type":"array","items":{"type":"string"},"description":"Digits-assigned bill IDs (summaries.bill.id) or invoice IDs (summaries.invoice.id), depending on the route."},"externalObjectIds":{"type":"array","items":{"type":"string"},"description":"Source-assigned bill or invoice IDs (summaries.external_id), without issuer.\n Collisions across sources return every matching object."},"digitsTransactionIds":{"type":"array","items":{"type":"string"},"description":"Digits-assigned ledger transaction IDs linked to the bill or invoice, including originating entries,\n payments and adjustments. Matched transaction aliases are accepted; source-assigned transaction IDs are not."},"paid":{"type":"boolean","description":"True selects positive original obligations with zero or negative remaining balance and no detected reversal.\n Includes overpayments; excludes originally zero-dollar documents, voids, and write-offs.\n False selects the complement, not just outstanding obligations."},"reversed":{"type":"boolean","description":"Whether a reversing entry has been detected."}},"description":"Values within each ID list use OR; different fields use AND.\n Balances include all activity in the published view."},"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"},"description":"Active departments saved for this source, including updates that may not yet\n appear in the ledger."}}},"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","IngestionFailed"],"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 date.","format":"date"},"dueDateTo":{"type":"string","description":"Filter to bills due on or before this date.","format":"date"},"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"}}},"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."},"entity":{"allOf":[{"$ref":"#/components/schemas/EntitySelector"}],"description":"Entity whose connection scopes the request. Optional unless using an organization-level token."}}},"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","subtype"],"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":{"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":"Subtype is required and must be a valid subtype for the given Type.","format":"enum"}}},"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"},"roles":{"type":"array","items":{"enum":["UnknownRole","EntityVendorRole","EntityCustomerRole","EntitySupplierRole","EntityUnspecifiedRole","InstitutionDebitRole","InstitutionCreditRole","PaymentProcessorRole","FacilitatorRole","OwnerRole","EntityShareholderRole","EntityLiabilitiesRole","EntityOwedVendorRole","EntityLenderRole","EntityAssetRole","EntityPrepaidVendorRole","EntityUnpaidCustomerRole","EntityAssetVendorRole","EntityOtherIncomeRole","EntityOtherExpensesRole","EntityAssetSupplierRole","EntityProcessorRole","EntityDebtorRole","EntityInvesteeRole","EntityBanksRole","EntityOtherLiabilitiesRole","EntityCreditCardsRole","EntityRevenuePartnerRole"],"type":"string","format":"enum"},"description":"Accounting roles derived from the party's ledger activity, sorted by numeric enum value.\n Includes all roles regardless of the requested filter, with duplicates and UnknownRole excluded.\n Empty when no roles can be determined from ledger activity.\n Changes to roles may take time to appear and do not update the party's timestamps.\n To keep lists filtered by role up to date, periodically retrieve the full list without timestamp filters."}}},"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."},"ProductDetails":{"required":["product","quantity","unitPrice"],"type":"object","properties":{"product":{"allOf":[{"$ref":"#/components/schemas/ProductRef"}],"description":"The product associated with this entry."},"quantity":{"type":"string","description":"The number of product units represented by this entry, as a decimal string, for example \"1.5\"."},"unitPrice":{"allOf":[{"$ref":"#/components/schemas/Currency"}],"description":"The price of one product unit."}},"description":"ProductDetails describes the product and pricing represented by a transaction entry."},"ProductRef":{"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":"ProductRef represents a reference to a product by its external identifier or Digits ID."},"Project":{"type":"object","properties":{"id":{"allOf":[{"$ref":"#/components/schemas/Identifier"}],"description":"The ledger id of the project"}}},"QuantityValue":{"type":"object","properties":{"quantity":{"type":"integer","format":"int64"},"quantityMultiplier":{"type":"integer","format":"int64"}}},"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)."},"QueryLedgerBillsRequest":{"type":"object","properties":{"filters":{"$ref":"#/components/schemas/LedgerObjectFilters"},"limit":{"type":"integer","description":"Default and maximum page size is 100.","format":"int32"},"cursor":{"type":"string","description":"Continuations retain the published view and require unchanged filters."},"entity":{"$ref":"#/components/schemas/EntitySelector"}}},"QueryLedgerBillsResponse":{"type":"object","properties":{"summaries":{"type":"array","items":{"$ref":"#/components/schemas/BillSummary"}},"next":{"$ref":"#/components/schemas/Page"}}},"QueryLedgerInvoicesRequest":{"type":"object","properties":{"filters":{"$ref":"#/components/schemas/LedgerObjectFilters"},"limit":{"type":"integer","description":"Default and maximum page size is 100.","format":"int32"},"cursor":{"type":"string","description":"Continuations retain the published view and require unchanged filters."},"entity":{"$ref":"#/components/schemas/EntitySelector"}}},"QueryLedgerInvoicesResponse":{"type":"object","properties":{"summaries":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceSummary"}},"next":{"$ref":"#/components/schemas/Page"}}},"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":{"deprecated":true,"type":"boolean","description":"Whether the product is taxable."},"sku":{"type":"string","description":"The SKU for the product."},"active":{"type":"boolean","description":"Whether the product is active."},"variants":{"type":"array","items":{"$ref":"#/components/schemas/SourceProductVariant"},"description":"Variants of this product."}},"description":"SourceProduct is the representation of a product as stored by Digits."},"SourceProductVariant":{"type":"object","properties":{"externalId":{"type":"string","description":"The external identifier for the variant."},"digitsId":{"type":"string","description":"The Digits identifier for the variant."},"name":{"type":"string","description":"The name of the variant."},"sku":{"type":"string","description":"The SKU for the variant."},"description":{"type":"string","description":"A description of the variant."},"prices":{"type":"array","items":{"$ref":"#/components/schemas/SourceProductVariantPrice"},"description":"Prices for this variant."}},"description":"SourceProductVariant is the representation of a product variant as stored by Digits."},"SourceProductVariantPrice":{"type":"object","properties":{"externalId":{"type":"string","description":"The external identifier for the price."},"digitsId":{"type":"string","description":"The Digits identifier for the price."},"type":{"enum":["UnknownType","Buy","Sell"],"type":"string","description":"Which side of a transaction the price applies to. Omitted when the price\n applies to both sides or the side is unknown.","format":"enum"},"unitPrice":{"allOf":[{"$ref":"#/components/schemas/Currency"}],"description":"The unit price."}},"description":"SourceProductVariantPrice is the representation of one product variant price 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. The transaction's ID in the source system; 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 by the Bill's external_id."},"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 by the Invoice's external_id."}},"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 bill's original ID in the source system. Use this ID for subsequent BillRefs to this 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"}},"description":"Bill represents inline information about a bill associated with this transaction.\n The external_id becomes the Bill's identifier; subsequent transactions should\n link to it using BillRef."},"SourceTransaction_Entry":{"required":["amount","type","category"],"type":"object","properties":{"externalId":{"allOf":[{"$ref":"#/components/schemas/Identifier"}],"description":"ExternalID references the entry's 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"},"productDetails":{"allOf":[{"$ref":"#/components/schemas/ProductDetails"}],"description":"Optional product and pricing details for this entry."},"billRef":{"allOf":[{"$ref":"#/components/schemas/BillRef"}],"description":"Associate an existing Bill with this entry by the Bill's external_id."},"invoiceRef":{"allOf":[{"$ref":"#/components/schemas/InvoiceRef"}],"description":"Associate an existing Invoice with this entry by the Invoice's external_id."}},"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 invoice's original ID in the source system. Use this ID for subsequent InvoiceRefs to this 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"}},"description":"Invoice represents inline information about an invoice associated with this transaction.\n The external_id becomes the Invoice's identifier; subsequent transactions should\n link to it using 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.\n When omitted from a subsequent sync, existing sources become archived and their data remains in the ledger.\n Archived sources are excluded from List Sources. Syncing the same external_id again reactivates the source.\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\"."},"entity":{"allOf":[{"$ref":"#/components/schemas/EntitySelector"}],"description":"Entity to scope the request to. Required for service-account and organization-app tokens.\n Sync sources for each entity before other source writes; each entity has its own connection."}}},"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 external ID of the parent department. The parent must be included in this request."}}},"SyncDepartmentsRequest":{"required":["departments"],"type":"object","properties":{"departments":{"type":"array","items":{"$ref":"#/components/schemas/SyncDepartment"},"description":"Complete list of departments for this source. Omitted departments become inactive;\n an empty list deactivates all departments for this source. Reference departments\n on transactions using their external IDs."},"entity":{"allOf":[{"$ref":"#/components/schemas/EntitySelector"}],"description":"Entity whose connection scopes the request. Optional unless using an organization-level token."}}},"SyncDepartmentsResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the departments were successfully saved for this source. Changes may\n take time to appear in the ledger."}}},"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"}},"entity":{"allOf":[{"$ref":"#/components/schemas/EntitySelector"}],"description":"Entity whose connection scopes the request. Optional unless using an organization-level token."}}},"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."},"entity":{"allOf":[{"$ref":"#/components/schemas/EntitySelector"}],"description":"Entity whose connection scopes the request. Optional unless using an organization-level token."}}},"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":{"deprecated":true,"allOf":[{"$ref":"#/components/schemas/Currency"}],"description":"The unit price of the product."},"description":{"type":"string","description":"A description of the product."},"taxable":{"deprecated":true,"type":"boolean","description":"Whether the product is taxable."},"sku":{"type":"string","description":"The SKU for the product in the source system."},"active":{"type":"boolean","description":"Whether the product is active in the source system."},"variants":{"type":"array","items":{"$ref":"#/components/schemas/SyncProductVariant"},"description":"Variants are purchasable or sellable variations of the product, each\n carrying its own prices. This is always the full set of variants for the\n product: previously synced variants absent from the list are removed, so\n syncing a product without variants removes all of its previously synced\n variants. Variants created in the Digits product UI are unaffected. A\n removed variant that later reappears keeps its Digits identifier."}},"description":"SyncProduct represents a product to be synced from an external source."},"SyncProductVariant":{"required":["externalId"],"type":"object","properties":{"externalId":{"type":"string","description":"The external identifier for the variant. Used for idempotency and deduplication within the product."},"name":{"type":"string","description":"The name of the variant."},"sku":{"type":"string","description":"The SKU for the variant in the source system."},"description":{"type":"string","description":"A description of the variant."},"prices":{"type":"array","items":{"$ref":"#/components/schemas/SyncProductVariantPrice"},"description":"Prices for this variant. This is always the full set of prices for the\n variant: previously synced prices absent from the list are removed, so\n syncing a variant without prices removes all of its previously synced\n prices. Prices created in the Digits product UI are unaffected. A removed\n price that later reappears keeps its Digits identifier."}},"description":"SyncProductVariant is a purchasable or sellable variation of a product,\n synced from an external source."},"SyncProductVariantPrice":{"required":["externalId","unitPrice"],"type":"object","properties":{"externalId":{"type":"string","description":"The external identifier for the price. Used for idempotency and deduplication within the variant."},"type":{"enum":["UnknownType","Buy","Sell"],"type":"string","description":"Which side of a transaction the price applies to. Omit when the source\n does not distinguish buy and sell prices.","format":"enum"},"unitPrice":{"allOf":[{"$ref":"#/components/schemas/Currency"}],"description":"The unit price."}},"description":"SyncProductVariantPrice is one price for a product variant."},"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."},"entity":{"allOf":[{"$ref":"#/components/schemas/EntitySelector"}],"description":"Entity whose connection scopes the request. Optional unless using an organization-level token."}}},"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"}},"entity":{"allOf":[{"$ref":"#/components/schemas/EntitySelector"}],"description":"Entity whose connection scopes the request. Optional unless using an organization-level token."}}},"SyncProjectsResponse":{"type":"object","properties":{"success":{"type":"boolean"}}},"SyncWorkflowBill":{"required":["externalId","vendor","lineItems"],"type":"object","properties":{"externalId":{"type":"string","description":"Caller-assigned bill ID. Replays and material updates retain the same\n Digits-assigned bill ID."},"vendor":{"allOf":[{"$ref":"#/components/schemas/WorkflowBillIngestVendor"}],"description":"Existing vendor selector or vendor definition. An unseen external vendor\n ID creates the vendor. When the vendor already exists, stored name, email,\n phone, and address remain authoritative and only destinations reconcile.\n Digits-managed Payments accepts ACH and Check destinations; externally\n managed Payments accepts Wire and Check destinations."},"invoiceNumber":{"type":"string","description":"Invoice number on the complete bill snapshot."},"billDate":{"type":"string","description":"Bill issue date on the complete bill snapshot.","format":"date-time"},"dueDate":{"type":"string","description":"Bill due date on the complete bill snapshot.","format":"date-time"},"memo":{"type":"string","description":"Free-form memo on the complete bill snapshot."},"approverUserId":{"type":"string","description":"Digits-assigned approver user ID. The user must be a Connect-visible\n member of the selected entity. Omit to clear or leave the snapshot without\n an approver."},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/SyncWorkflowBillLineItem"},"description":"Complete ordered line items. Omitting a prior line removes it from the\n material snapshot; duplicate external IDs are rejected."},"referenceNumber":{"type":"string","description":"Caller-assigned reference number. Omit to preserve the stored value, set a\n non-empty value to replace it, or set an empty value to clear it."}},"description":"SyncWorkflowBill is one complete caller-authored bill snapshot."},"SyncWorkflowBillLineItem":{"required":["amount"],"type":"object","properties":{"externalId":{"type":"string","description":"Caller-assigned line ID. Non-empty values must be unique within the bill."},"name":{"type":"string"},"description":{"type":"string"},"amount":{"allOf":[{"$ref":"#/components/schemas/Currency"}],"description":"Signed whole-cent USD line amount."},"quantityValue":{"allOf":[{"$ref":"#/components/schemas/QuantityValue"}],"description":"Exact quantity representation. Omit quantity_value and unit_price\n together when the line has no quantity/price breakdown."},"unitPrice":{"allOf":[{"$ref":"#/components/schemas/Currency"}],"description":"Signed USD unit price. When supplied with quantity_value, their product\n must equal amount."},"categoryId":{"type":"string","description":"Digits-assigned or data-source-visible accounting references."},"departmentId":{"type":"string"},"locationId":{"type":"string"},"productId":{"type":"string"}},"description":"SyncWorkflowBillLineItem is one complete ordered accounting line snapshot."},"SyncWorkflowBillResult":{"type":"object","properties":{"billId":{"type":"string","description":"Stable Digits-assigned bill ID."},"externalId":{"type":"string","description":"Caller-assigned bill ID from the corresponding input."},"created":{"type":"boolean","description":"True only when this request created the bill."},"mutatedAt":{"type":"string","description":"Persisted mutation time for a create or material update. Exact no-op\n replays omit this field.","format":"date-time"}},"description":"SyncWorkflowBillResult reports the stable identity and mutation outcome for\n one input bill."},"SyncWorkflowBillsRequest":{"required":["entity","bills"],"type":"object","properties":{"entity":{"allOf":[{"$ref":"#/components/schemas/WorkflowEntitySelector"}],"description":"Client organization and entity that owns every bill in this batch."},"userId":{"type":"string","description":"User's Digits-assigned ID."},"userExternalId":{"type":"string","description":"User's caller-assigned ID, resolved on the backend."},"bills":{"type":"array","items":{"$ref":"#/components/schemas/SyncWorkflowBill"},"description":"Complete bills in caller order. External bill IDs must be unique within\n the request and are scoped to the authenticated installed application."}},"description":"SyncWorkflowBillsRequest creates or reconciles a batch of complete workflow\n bill snapshots. The request must contain 1–100 bills. Omitting a mutable bill\n field or approver supplies that field's empty state unless its documentation\n explicitly defines presence-aware behavior; Sync is not otherwise a patch API."},"SyncWorkflowBillsResponse":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/SyncWorkflowBillResult"}}},"description":"SyncWorkflowBillsResponse returns exactly one result per input bill in the\n same order as the request."},"TokenRequest":{"required":["grant_type","client_id","client_secret"],"type":"object","properties":{"grant_type":{"enum":["authorization_code","refresh_token","client_credentials"],"type":"string","description":"The grant type: client_credentials for service accounts; authorization_code or\n refresh_token for entity and organization apps. Organization apps require user consent."},"client_id":{"type":"string","description":"The app or service account client ID. Use credentials from the same environment."},"client_secret":{"type":"string","description":"The app or service account client secret."},"code":{"type":"string","description":"Single-use authorization code. Required for authorization_code grants."},"redirect_uri":{"type":"string","description":"Required for authorization_code grants."},"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":"Returned for authorization_code and refresh_token app grants, not client_credentials.\n Use it to renew access for the same entity or organization installation.\n Service accounts renew by repeating client_credentials. App disconnection or uninstall revokes refresh access."},"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":"Space-separated scopes granted for this token. Service accounts use configured\n scopes; apps use the scopes granted for their installation. No scope request\n parameter is accepted at this endpoint."}}},"Transaction":{"type":"object","properties":{"transactionId":{"type":"string","description":"The digits ledger transaction id"},"transactionType":{"enum":["Unknown","JournalEntry","PayIn","PayOut","BankTransfer","Bill","Invoice"],"type":"string","description":"The transaction classification, including Unknown when unclassified.","format":"enum"},"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."},"entity":{"allOf":[{"$ref":"#/components/schemas/EntitySelector"}],"description":"Entity whose connection scopes the request. Optional unless using an organization-level token."}}},"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":"One result per distinct external ID that was upserted, in no guaranteed order"}}},"TransactionSyncResponse_TransactionIdentifier":{"type":"object","properties":{"digitsId":{"type":"string","description":"The unique ID assigned by Digits to this transaction. This ID remains the same\n when you sync the transaction again using the same external ID and source."},"externalId":{"type":"string","description":"The caller-provided transaction external ID."}}},"TransactionVoid":{"required":["externalId","voidDate"],"type":"object","properties":{"externalId":{"type":"string","description":"External ID of the transaction representing the bill or invoice."},"voidDate":{"type":"string","description":"When the void takes effect, including time of day.","format":"date-time"}},"description":"One transaction to void. It must link to a non-deleted bill or invoice.\n Digits books a reversing transaction with external ID\n <external_id>-void at void_date, linked to the original.\n Repeating the request returns the existing void and writes nothing.\n Other transactions linked to the same object are not voided."},"TransactionVoidRequest":{"required":["voids"],"type":"object","properties":{"voids":{"type":"array","items":{"$ref":"#/components/schemas/TransactionVoid"}},"entity":{"allOf":[{"$ref":"#/components/schemas/EntitySelector"}],"description":"Entity whose connection scopes the request. Optional unless using an organization-level token."}},"description":"Voids 1 to 100 transactions atomically. Each original may appear once."},"TransactionVoidResponse":{"type":"object","properties":{"externalIds":{"type":"array","items":{"type":"string"}}},"description":"External IDs of the original transactions now voided, in request order."},"TrialBalanceSummary":{"type":"object","properties":{"debits":{"allOf":[{"$ref":"#/components/schemas/Currency"}],"description":"The account's closing balance if the account holds a debit balance;\n zero otherwise."},"credits":{"allOf":[{"$ref":"#/components/schemas/Currency"}],"description":"The account's closing balance if the account holds a credit balance;\n zero otherwise."},"accountNumber":{"type":"string","description":"Optional account number"},"categoryId":{"type":"string","description":"Unique identifier for this category in the ledger"}},"description":"Represents the closing balance of an account as of the statement end date.\n The balance is placed entirely on the account's debit or credit side, so\n only one of debits or credits will be non-zero."},"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","IngestionFailed"],"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"},"dueDate":{"type":"string","description":"Date the vendor bill is due.","format":"date"},"scheduledPaymentDate":{"type":"string","description":"Date this bill is scheduled for payment.","format":"date-time"},"scheduledSendForApprovalDate":{"type":"string","description":"Date this bill is scheduled to be sent for approval. Present only when\n status is ScheduledToBeSentForApproval.","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."},"externalPayment":{"allOf":[{"$ref":"#/components/schemas/BillExternalPayment"}],"description":"External payment recorded against this bill, when an externally managed\n payment has been recorded."},"approvers":{"type":"array","items":{"$ref":"#/components/schemas/BillApprover"},"description":"Users assigned to approve this bill."}},"description":"WorkflowBill is the public workflow view of a payable bill."},"WorkflowBillIngestACHDestination":{"required":["accountNumber","routingNumber"],"type":"object","properties":{"accountNumber":{"type":"string"},"routingNumber":{"type":"string"},"institutionName":{"type":"string","description":"Optional caller-provided name. Payments falls back to a best-effort Plaid lookup."}}},"WorkflowBillIngestCheckDestination":{"required":["recipientName","address"],"type":"object","properties":{"recipientName":{"type":"string"},"address":{"$ref":"#/components/schemas/Address"},"deliverySpeed":{"enum":["DeliverySpeedUnspecified","Regular","Expedited","Overnight"],"type":"string","format":"enum"}}},"WorkflowBillIngestDocument":{"required":["fileName","contentType","contents"],"type":"object","properties":{"fileName":{"type":"string","description":"Original file name."},"contentType":{"type":"string","description":"MIME content type, for example application/pdf."},"contents":{"type":"string","description":"Raw document bytes. JSON clients encode this field as base64.","format":"bytes"}},"description":"WorkflowBillIngestDocument is the single document accepted by an ingest."},"WorkflowBillIngestExternalVendor":{"required":["externalId","name","email"],"type":"object","properties":{"externalId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"destinations":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowBillIngestVendorDestination"}},"phoneNumber":{"type":"string"},"address":{"$ref":"#/components/schemas/Address"}},"description":"WorkflowBillIngestExternalVendor contains authoritative vendor details."},"WorkflowBillIngestVendor":{"type":"object","properties":{"externalId":{"type":"string","description":"Select an existing vendor by its caller-assigned ID."},"externalVendor":{"allOf":[{"$ref":"#/components/schemas/WorkflowBillIngestExternalVendor"}],"description":"Create a vendor by external ID. If it already exists, name, email,\n phone number, and address are ignored while payment destinations may\n still be added."}},"description":"WorkflowBillIngestVendor selects an existing vendor by external ID or\n supplies the definition used to create a vendor with a new external ID."},"WorkflowBillIngestVendorDestination":{"type":"object","properties":{"isDefault":{"type":"boolean","description":"Exactly one supplied destination must be the default when destinations are present."},"ach":{"$ref":"#/components/schemas/WorkflowBillIngestACHDestination"},"wire":{"$ref":"#/components/schemas/WorkflowBillIngestWireDestination"},"check":{"$ref":"#/components/schemas/WorkflowBillIngestCheckDestination"}},"description":"WorkflowBillIngestVendorDestination contains one vendor payment destination."},"WorkflowBillIngestWireDestination":{"required":["accountNumber","routingNumber","institutionName","beneficiaryName","beneficiaryAddress","accountType"],"type":"object","properties":{"accountNumber":{"type":"string"},"routingNumber":{"type":"string"},"institutionName":{"type":"string"},"beneficiaryName":{"type":"string"},"beneficiaryAddress":{"$ref":"#/components/schemas/Address"},"accountType":{"enum":["Unknown","Checking","Savings"],"type":"string","format":"enum"}}},"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","IngestionFailed"],"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 organization-level\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":"LedgerBillService"},{"name":"LedgerCategoryService"},{"name":"LedgerDepartmentService"},{"name":"LedgerInvoiceService"},{"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"}]}