flexone
v0.1.6
Published
<div align="left"> <a href="https://www.speakeasy.com/?utm_source=flex&utm_campaign=typescript"><img src="https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge&logoColor=FBE331&logo=speakeasy&labelColor=545454
Downloads
5
Readme
flex
🏗 Welcome to your new SDK! 🏗
It has been generated successfully based on your OpenAPI spec. However, it is not yet ready for production use. Here are some next steps:
- [ ] 🛠 Make your SDK feel handcrafted by customizing it
- [ ] ♻️ Refine your SDK quickly by iterating locally with the Speakeasy CLI
- [ ] 🎁 Publish your SDK to package managers by configuring automatic publishing
- [ ] ✨ When ready to productionize, delete this section from the README
SDK Installation
NPM
npm add flex
PNPM
pnpm add flex
Bun
bun add flex
Yarn
yarn add flex zod
# Note that Yarn does not install peer dependencies automatically. You will need
# to install zod as shown above.
Requirements
For supported JavaScript runtimes, please consult RUNTIMES.md.
SDK Example Usage
Example
import { Flex } from "flex";
const flex = new Flex({
token: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await flex.expenses.expenseLink();
// Handle the result
console.log(result);
}
run();
Available Resources and Operations
expenses
- expenseLink - Create an expense link
- expenseWebhook - Expense webhook
- expenseLinks - Expense links
- expenseSynced - Expense synced items
- postExpenseSync - Create an expense item
- patchExpenseSynced - Modify an expense item
- deleteExpenseLink - Delete an expense link
- createExpenseReceipt - Create an expense receipt
- getExpenseMetrics - Get general expense integration information
- postExpensesCategoryToCard - Create category on card
- patchExpensesCategoryToCard - Modify category on card
- getExpensesCategoryToCard - Get categories on cards
- getExpensesCategoryToCardId - Get category on card
- postBackfillIntegration - Backfill an integration
- patchAccountingSettings - Patch integration settings
- getAccountingCoa - Get chart of accounts
- patchAccountingCoa - Patch chart of accounts
- patchIntegrationLink - Re-sync a rutter integration connection
- patchIntegrationPlatform - Fetch charts/vendors/classes for an integration
- postAccountingExpensesLinksProcess - Links process job
spendPlans
- createSpendPlan - Create spend plan
- getSpendPlans - Get spend plans
- getSpendPlansAdmin - Get spend plans admin
- getSpendPlanAdmin - Get spend plan admin
- getSpendPlansByCardId - Get spend plan by card id
- getSpendPlan - Get spend plan
- updateSpendPlan - Update spend plan
- deleteSpendPlan - delete spend plan
- getSpendPlanLimits - Get spend plan limits
- getSpendPlanCards - Get spend plan cards
- getSpendPlanTransactions - Get spend plan transactions
- getSpendPlanTransactionsAdmin - Get spend plan transactions as admin
- createTwispAccountEntities - Migrate account to create twisp entities
- createTwispAccountEntitiesForAllAccounts - Migrate create twisp entities for all accounts
- linkCardToSpendPlan - Link Card to Spend Plan
- unlinkCardFromSpendPlan - Unlink Card from Spend Plan
- linkMemberToSpendPlan - Link Member to Spend Plan
- unlinkMemberFromSpendPlan - Unlink Member from Spend Plan
- unlinkManagerFromSpendPlan - Unlink Manager from Spend Plan
- linkManagerToSpendPlan - Link Manager to Spend Plan
- patchAccountingSpendplansDefault - Set default spend plan for card
- postAccountingSpendplansRequestFunds - Spend plans request funds
- getAccountingSpendplansViewFunds - Spend plans get pending, approved, declined request funds
- decisionFundsRequest - Spend plans approve or deny funds
- linkInvoiceToSpendPlan - Link invoice to Spend Plan
- getSpendPlanLinkForInvoices - Get Spend Plan Linked to Invoices
- unlinkInvoiceFromSpendPlan - Unlink Invoice from spend plan
- getSpendPlansAlfred - Fetch spend plans admin via Alfred
- getSpendPlanAlfred - Fetch spend plan admin via Alfred
bankFeeds
- getAccountingBankfeedsOtp - Bank feeds OTP
- postAccountingAccountsAccountIdEventsEventIdBackfill - Bank feeds backfill
- postAccountingAccountsAccountIdFeedsConnection - Create a direct intuit connection
- postAccountingFeedsProcess - Process categories, accounts and transactions
- postAccountingFeedsCategoriesProcess - process bank feed categories
- postAccountingFeedsAccountsProcess - process bank feed accounts
- postAccountingFeedsTransactionsProcess - process bank feed transactions
- postAccountingFeedsConnection - Create Intuit bank feed connection
commerce
- getAccountingCommerceMetric - Fetch commerce metric
- postAccountingCommerceMetrics - Process metrics on active links
- getAccountingCommerceProducts - get commerce products
- getAccountingCommerceOrders - get commerce orders
- getAccountingBusinessesBusinessIdCommerceMetrics - Fetch all metrics for a business
- getAccountingCommerceLinks - Commerce links
accountsPayable
- getAccountingAccountsPayable - Accounts payable properties
- postAccountingApBillpay - Accounts Payable bill pay task queue
- postAccountingApBillpayProcess - Accounts Payable bill pay process queue
generic
- getFlexErrorCodes - get flex error codes
ads
- getAccountingBusinessesBusinessIdAdsDailies - Fetch campaign dailes
- getAccountingBusinessesBusinessIdAdsCampaigns - Fetch campaigns
- getAccountingAdsLinks - Advertising links
analytics
- getUsagePlaid - List Plaid API Usage
- getPendingTransactionsByCompany - Get Current Pending Transactions for Company
- listPendingTransactionsByCompany - List Current Pending Transactions for Company
- getBankingMetrics - Banking Metrics
- getSupportMetrics - Support Metrics
- listLithicSettlementDetails - List Lithic Settlement Details
- listPortfolioStatementsByBillDate - List Amount Due by Bill Date
- getUsageCrs - List Crs API Usage
- getUsagePersona - List Persona API Usage
- getUsageGcp - GCP Usage
- listNewCards - List Newly Issued Cards
- listMarketingEmails - List Emails
- getCreditOriginationsMetrics - Get Credit Origination
- getLoginMetrics - Get Login Metrics
- generateCreditStatementLoanTapeRecord - GET Credit Loan Tape Record for BusinessId
- generatePortfolioCreditStatementLoanTape - List Credit Loan Tape for Entire Portfolio
- getCreditCardActivity - Get Credit Card Activity
- listCreditCardActivity - List Credit Card Activity
- listCreditCardActivityCohorts - List Credit Card Activity
- listCreditCardRpac - List Credit Card RPAC
- listCreditTransactionBook - List Credit Transaction Book (Monthly)
- listCreditTransactionGtv - List Credit Transaction GTV
- listCreditTransactionGtvRollingAverage - List Rolling Averages for Credit Transactions - GTV
- listCreditTransactionGtvRetention - List Credit Transaction GTV Monthly Retention
- listCreditTransactionInterest - List Credit Interest Transaction
- listCreditTransactionChargeOffs - List Credit Transaction ChargeOffs
- listCreditTransactionFees - List Credit Transaction Fees
- listCreditTransactionRepayments - List Credit Transaction Repayments
- listRepaymentRatesByTransactionAge - List Repayment Rates by Transaction Age, by Cohort
- listMercoaInvoices - List Mercoa Invoices
- getMercoaInvoicesSummaryStats - Summary Statistics from Mercoa Invoices
- listMercoaInvoicesByBusiness - List Mercoa Invoices by Business Id (Api Company Id)
- getScrapeFlexApiPlaidTransferSweeps - GET scrape plaid transfer sweeps
- getScrapeFlexApiLithicTreasury - GET scrape lithic treasury
- getScrapeFlexApiServicingBookSummary - GET scrape servicing book summary
- getScrapeHubspotAccountUsers - GET scrape Hubspot account users
- getScrapeHubspotGoals - GET scrape Hubspot goals
- getScrapeHubspotCompanies - GET scrape Hubspot companies
- getScrapeHubspotContacts - GET scrape Hubspot contacts
- getScrapeHubspotDeals - GET scrape Hubspot deals
- getScrapeHubspotMonthlySpend - GET scrape Hubspot monthlySpend
- getScrapeHubspotEvents - GET scrape Hubspot events
- getScrapeHubspotOnboarding - GET scrape Hubspot onboarding
- getScrapeHubspotAccountManagement - GET scrape Hubspot accountManagement
- getScrapeBankingAccount - Scrape a specific Flex Bank Account
accounts
- searchAccounts - Account search
- createAccount - Create an account
- listAccounts - List Accounts
- accountsSearch - Account Search
- accountsMigrate - Migrate
- deleteAccount - Deactivate Account
- updateAccount - Update Account
- getAccount - Get Account
- listAccountsProducts - List Products
- listAccountReferrals - List Account Referrals
- listReferredAccounts - List Referred Accounts
- listAccountPromocodes - List Account PromoCodes
- inviteAccountsPerson - Invite Person
- listAccountsInvites - List Invitations
- resendAccountsInvite - Resend Invitation
- listTrustScoresByCompanyId - List trust scores for all persons associated with the given account
- getIdentityMe - My Details
- getIdentityMeAccounts - My Accounts
- listAccountsPhoneAllowlist - Get Phone Allow List
- addAccountsPhonesAllowlist - Add Phone Rule
applications
- transitionApplicationState - Transition application state
- createApplicationDecision - Create Application Decision
- listApplicationsForReview - List Applications awaiting a Review
- createApplicationRequestedDocument - Create Application Requested Document
- listApplicationRequestedDocumentForApplication - List Application Requested Documents
- updateApplicationRequestedDocument - Update Application Requested Document
- getApplicationRequestedDocument - Get Application Requested Document
- listApplicationDocumentsForReview - List Application Documents for review
- withdrawApplication - Withdraw Application
- listApplications - List Applications
- getApplication - Get Application
- createApplication - Create Application
- listApplicationRequestedDocuments - List Application Requested Documents
- uploadApplicationRequestedDocument - Upload an Application Requested Document
companies
- listApiCompanies - List api companies
- searchCompanies - Search companies
- postAlfredCompaniesTransactionsMigrate - Migrate credit transactions to platform
- getAccountIdByCompanyId - Get account id for API company id
- getCompanyAsOf - Get a companies attributes as of a specific point in-time
- listCompaniesAsOf - Get a list of companies attributes as of a specific point in-time
cards
- listCards - List Cards
- getAccountPrograms - Get Programs
- assignAccountCardProgram - Assign Card Program
- getAccountCardProgram - Get Account Card Program
- updateAccountCardProgram - Update Account Card Program
- listCardsPerson - List Person Cards
- issueCard - Issue Card
- getCard - Get Card
- updateCard - Update Card
- terminateCard - Terminate Card
- activateCard - Activate Card
webhooks
- cardsWebhookEvents - Card Events
- mercoaWebhookEvents - Mercoa Events
programs
- listCardsPrograms - List Card Programs
- createCardProgram - Create Card Program
- getCardProgram - Get Card Program
- updateCardProgram - Update Card Program
credit
- decisionCreditTransactionAuthorization - Decision Approval for Credit Transaction Authorization
legacy
- creditLegacySetLimit - Set Credit Limit
hubspot
- getCrmHubspotContactsPersonIdSync - Sync Person Data to Hubspot Contacts
- getCrmHubspotCompaniesBusinessIdSync - Sync Business Data to Hubspot Contacts
- getCrmHubspotUnderwritingBusinessIdSync - Sync Business Data to Hubspot Underwriting
- getCrmHubspotDealsBusinessIdSync - Sync Business Data to Hubspot Deals
- getCrmHubspotOnboardingBusinessIdSync - Sync Business Data to Hubspot Onboarding
- getCrmHubspotAccountManagementBusinessIdSync - Sync Business Data to Hubspot Account Management
- getCrmHubspotMonthlySpendBusinessIdSync - Sync Spend Data to Hubspot MonthlySpend
- getCrmHubspotContactsSyncAll - Sync All Persons Data to Hubspot Contacts
- getCrmHubspotCompaniesSyncAll - Sync All Businesses Data to Hubspot Companies
- getCrmHubspotUnderwritingSyncAll - Sync All Businesses Data to Hubspot Underwriting
- getCrmHubspotDealsSyncAll - Sync All Businesses Data to Hubspot Deals
- getCrmHubspotOnboardingSyncAll - Sync All Business Data to Hubspot Onboarding
- getCrmHubspotAccountManagementSyncAll - Sync All Businesses Data to Hubspot Account Management
- getCrmHubspotMonthlySpendSyncAll - Sync All Spend Data to Hubspot MonthlySpend
events
- mercoaWebhookEvents - Mercoa Events
- postPlaidOnExit - Create a Plaid On Exit Log
- listPlaidOnExitEventsByPerson - List Plaid On Exit Events Person
- identityEventsNotify - Handle event notification
terms
- getAccountTerms - Get Terms
invoices
- listAccountInvoices - List Invoices
- createAccountInvoices - Create Invoice
- getAccountInvoice - Get an Invoice
- getInvoicesAttachment - Retrieve Attachment
- uploadAccountInvoices - Upload Attachment
servicing
- listFactoringInvoices - List Invoices
- postFactoringAccountIdInvoicesInvoiceIdDecision - Create Invoice Decision
persons
- listAccountsPersons - List Persons
- registerAccountsPersons - Create Person
- getPerson - Get Person
- patchPerson - Update Person
- deletePerson - Deactivate Person
- prefillPersons - Request Prefill
- prefillPersonsAccess - Person can access prefill
- getPrefillPersonBusiness - Get prefill business data for person
- listPersonsPhones - List Person Phones
- postPersonsPhones - Create a Persons Phone
- getPersonPhone - Get a person's individual phone info
- deletePersonSinglePhone - Deactivate a persons phone
- patchPersonSinglePhone - Update a person's phone
- getPersonsAddresses - List a Person's Addresses
- postPersonsAddresses - Create a Persons Address
- getPersonsAddress - Get Person Address
- patchPersonsAddress - Update Person's Address
- deletePersonsAddress - Deactivate Person's Address
- getPersonsEmails - List a Person's Emails
- postPersonsEmails - Create a Persons Address
- listDocumentsForPerson - List Person Documents
- createPersonsDocument - Create Person Document
- getPersonsDocumentReference - Get Person Document
businesses
- listBusinesses - List Businesses
- registerBusinesses - Create Business
- getBusiness - Get Business
- patchBusiness - Update Business
- listBusinessesPhones - List Business Phones
- postBusinessesPhones - Create Business Phone
- postBusinessAddress - Create Business Address
- listBusinessesAddresses - List Business Addresses
- getBusinessAddress - Get Business Address
- deleteBusinessAddress - Deactivate Business Address
- updateBusinessesAddresses - Update Business Address
- listBusinessOwners - List Business Owners
- postBusinessesOwners - Create Business Owner
- patchBusinessOwner - Update Business Owner
- deleteBusinessOwner - Deactivate Business Owner
- listBusinessEmployees - List Employees
- createBusinessEmployee - Create Employee
- getBusinessEmployee - Get Employee
- updateBusinessEmployee - Update Employee
- deleteBusinessEmployee - Deactivate Employee
- listBusinessGroups - List Groups
- createBusinessGroup - Create Group
- getBusinessGroup - Get Group
- updateBusinessGroup - Update Group
- deleteBusinessGroup - Deactivate Group
- listBusinessesGroupsMembers - List Group Members
- addPersonBusinessGroup - Add Person to Business Group
- removePersonBusinessGroup - Remove Person from Business Group
- listBusinessDocuments - List Business Documents
- createBusinessDocument - Create Business Document
- getBusinessDocumentReference - Get Business Document
- deleteBusinessDocument - Delete Business Document
- updateBusinessDocument - Update Business Document
- listBusinessesFunctions - List Functions
- assignBusinessFunction - Assign Function
- updateBusinessFunction - Update Function
- listBusinessesFunctionsPerson - List Person's Functions
authorize
- authorizeToken - Request token
- authorizeTokenExchange - Exchange Token
- requestAnalyticsGuestToken - Request Analytics Guest Token
- startPasswordless - Start a Passwordless flow
- registerFactor - Register factor
- getAuthorizeFactor - Get Factors
- deleteAuthorizeFactor - Remove Factor
- requestFactorOptions - Request Factor Options
- issueAuthorizeChallenge - Issue Challenge
- initiatePasswordReset - Initiate Password Reset
- updatePasswordFromLink - Update Password
- magiclinkRedirect - MagicLink Redirect
- getAuthorizeSessions - Retrieve Sessions
- deleteAuthorizeSessions - Revoke Session
- clearAuthenticationRatelimit - Clear password rate limit
permission
- addAccountRoleToAuthentication - Add account role to authentication
- removeAccountRoleFromAuthentication - Remove account role from authentication
- addFlexRoleToAuthentication - Add flex role to authentication
- removeFlexRoleFromAuthentication - Remove flex role from authentication
- listAccountPermissionsOnAccount - List account permissions on account
promoCodes
- listPromocodes - List Promo Codes
- createPromocodes - Create a promocode
- getPromocodes - Get PromoCode
- updatePromocodes - Update PromoCode
- listAccountsWithPromocode - List Accounts with Promo Code
- deleteAccountPromocode - Unlink Promo Code
- linkAccountPromocode - Link Promo Code
- getPromocodeByValue - Get promo code by value
partnerships
- getPartnershipDashboard - Get Partnership Dashboard
bankingApplications
- getServicingBankingApplicationUnitApplicationId - Get Unit Banking Application
- getServicingBankingApplicationFlexCompanyId - Get Unit Banking Applications by Flex Company Id
- getServicingBankingApplicationsUnitCustomerId - Get Unit Banking Applications By Customer Id
statements
- generatePdfFromHtml - Generate a pdf from html
- generateMonthlyStatement - Get account monthly statement
- generateTransactionDownload - Get statement transactions
Standalone functions
All the methods listed above are available as standalone functions. These functions are ideal for use in applications running in the browser, serverless runtimes or other environments where application bundle size is a primary concern. When using a bundler to build your application, all unused functionality will be either excluded from the final bundle or tree-shaken away.
To read more about standalone functions, check FUNCTIONS.md.
- accountsAccountsMigrate
- accountsAccountsSearch
- accountsAddAccountsPhonesAllowlist
- accountsCreateAccount
- accountsDeleteAccount
- accountsGetAccount
- accountsGetIdentityMeAccounts
- accountsGetIdentityMe
- accountsInviteAccountsPerson
- accountsListAccountPromocodes
- accountsListAccountReferrals
- accountsListAccountsInvites
- accountsListAccountsPhoneAllowlist
- accountsListAccountsProducts
- accountsListAccounts
- accountsListReferredAccounts
- accountsListTrustScoresByCompanyId
- accountsPayableGetAccountingAccountsPayable
- accountsPayablePostAccountingApBillpayProcess
- accountsPayablePostAccountingApBillpay
- accountsResendAccountsInvite
- accountsSearchAccounts
- accountsUpdateAccount
- adsGetAccountingAdsLinks
- adsGetAccountingBusinessesBusinessIdAdsCampaigns
- adsGetAccountingBusinessesBusinessIdAdsDailies
- analyticsGenerateCreditStatementLoanTapeRecord
- analyticsGeneratePortfolioCreditStatementLoanTape
- analyticsGetBankingMetrics
- analyticsGetCreditCardActivity
- analyticsGetCreditOriginationsMetrics
- analyticsGetLoginMetrics
- analyticsGetMercoaInvoicesSummaryStats
- analyticsGetPendingTransactionsByCompany
- analyticsGetScrapeBankingAccount
- analyticsGetScrapeFlexApiLithicTreasury
- analyticsGetScrapeFlexApiPlaidTransferSweeps
- analyticsGetScrapeFlexApiServicingBookSummary
- analyticsGetScrapeHubspotAccountManagement
- analyticsGetScrapeHubspotAccountUsers
- analyticsGetScrapeHubspotCompanies
- analyticsGetScrapeHubspotContacts
- analyticsGetScrapeHubspotDeals
- analyticsGetScrapeHubspotEvents
- analyticsGetScrapeHubspotGoals
- analyticsGetScrapeHubspotMonthlySpend
- analyticsGetScrapeHubspotOnboarding
- analyticsGetSupportMetrics
- analyticsGetUsageCrs
- analyticsGetUsageGcp
- analyticsGetUsagePersona
- analyticsGetUsagePlaid
- analyticsListCreditCardActivityCohorts
- analyticsListCreditCardActivity
- analyticsListCreditCardRpac
- analyticsListCreditTransactionBook
- analyticsListCreditTransactionChargeOffs
- analyticsListCreditTransactionFees
- analyticsListCreditTransactionGtvRetention
- analyticsListCreditTransactionGtvRollingAverage
- analyticsListCreditTransactionGtv
- analyticsListCreditTransactionInterest
- analyticsListCreditTransactionRepayments
- analyticsListLithicSettlementDetails
- analyticsListMarketingEmails
- analyticsListMercoaInvoicesByBusiness
- analyticsListMercoaInvoices
- analyticsListNewCards
- analyticsListPendingTransactionsByCompany
- analyticsListPortfolioStatementsByBillDate
- analyticsListRepaymentRatesByTransactionAge
- applicationsCreateApplicationDecision
- applicationsCreateApplicationRequestedDocument
- applicationsCreateApplication
- applicationsGetApplicationRequestedDocument
- applicationsGetApplication
- applicationsListApplicationDocumentsForReview
- applicationsListApplicationRequestedDocumentForApplication
- applicationsListApplicationRequestedDocuments
- applicationsListApplicationsForReview
- applicationsListApplications
- applicationsTransitionApplicationState
- applicationsUpdateApplicationRequestedDocument
- applicationsUploadApplicationRequestedDocument
- applicationsWithdrawApplication
- authorizeAuthorizeTokenExchange
- authorizeAuthorizeToken
- authorizeClearAuthenticationRatelimit
- authorizeDeleteAuthorizeFactor
- authorizeDeleteAuthorizeSessions
- authorizeGetAuthorizeFactor
- authorizeGetAuthorizeSessions
- authorizeInitiatePasswordReset
- authorizeIssueAuthorizeChallenge
- authorizeMagiclinkRedirect
- authorizeRegisterFactor
- authorizeRequestAnalyticsGuestToken
- authorizeRequestFactorOptions
- authorizeStartPasswordless
- authorizeUpdatePasswordFromLink
- bankFeedsGetAccountingBankfeedsOtp
- bankFeedsPostAccountingAccountsAccountIdEventsEventIdBackfill
- bankFeedsPostAccountingAccountsAccountIdFeedsConnection
- bankFeedsPostAccountingFeedsAccountsProcess
- bankFeedsPostAccountingFeedsCategoriesProcess
- bankFeedsPostAccountingFeedsConnection
- bankFeedsPostAccountingFeedsProcess
- bankFeedsPostAccountingFeedsTransactionsProcess
- bankingApplicationsGetServicingBankingApplicationFlexCompanyId
- bankingApplicationsGetServicingBankingApplicationUnitApplicationId
- bankingApplicationsGetServicingBankingApplicationsUnitCustomerId
- businessesAddPersonBusinessGroup
- businessesAssignBusinessFunction
- businessesCreateBusinessDocument
- businessesCreateBusinessEmployee
- businessesCreateBusinessGroup
- businessesDeleteBusinessAddress
- businessesDeleteBusinessDocument
- businessesDeleteBusinessEmployee
- businessesDeleteBusinessGroup
- businessesDeleteBusinessOwner
- businessesGetBusinessAddress
- businessesGetBusinessDocumentReference
- businessesGetBusinessEmployee
- businessesGetBusinessGroup
- businessesGetBusiness
- businessesListBusinessDocuments
- businessesListBusinessEmployees
- businessesListBusinessGroups
- businessesListBusinessOwners
- businessesListBusinessesAddresses
- businessesListBusinessesFunctionsPerson
- businessesListBusinessesFunctions
- businessesListBusinessesGroupsMembers
- businessesListBusinessesPhones
- businessesListBusinesses
- businessesPatchBusinessOwner
- businessesPatchBusiness
- businessesPostBusinessAddress
- businessesPostBusinessesOwners
- businessesPostBusinessesPhones
- businessesRegisterBusinesses
- businessesRemovePersonBusinessGroup
- businessesUpdateBusinessDocument
- businessesUpdateBusinessEmployee
- businessesUpdateBusinessFunction
- businessesUpdateBusinessGroup
- businessesUpdateBusinessesAddresses
- cardsActivateCard
- cardsAssignAccountCardProgram
- cardsGetAccountCardProgram
- cardsGetAccountPrograms
- cardsGetCard
- cardsIssueCard
- cardsListCardsPerson
- cardsListCards
- cardsTerminateCard
- cardsUpdateAccountCardProgram
- cardsUpdateCard
- commerceGetAccountingBusinessesBusinessIdCommerceMetrics
- commerceGetAccountingCommerceLinks
- commerceGetAccountingCommerceMetric
- commerceGetAccountingCommerceOrders
- commerceGetAccountingCommerceProducts
- commercePostAccountingCommerceMetrics
- companiesGetAccountIdByCompanyId
- companiesGetCompanyAsOf
- companiesListApiCompanies
- companiesListCompaniesAsOf
- companiesPostAlfredCompaniesTransactionsMigrate
- companiesSearchCompanies
- creditDecisionCreditTransactionAuthorization
- eventsIdentityEventsNotify
- eventsListPlaidOnExitEventsByPerson
- eventsMercoaWebhookEvents
- eventsPostPlaidOnExit
- expensesCreateExpenseReceipt
- expensesDeleteExpenseLink
- expensesExpenseLink
- expensesExpenseLinks
- expensesExpenseSynced
- expensesExpenseWebhook
- expensesGetAccountingCoa
- expensesGetExpenseMetrics
- expensesGetExpensesCategoryToCardId
- expensesGetExpensesCategoryToCard
- expensesPatchAccountingCoa
- expensesPatchAccountingSettings
- expensesPatchExpenseSynced
- expensesPatchExpensesCategoryToCard
- expensesPatchIntegrationLink
- expensesPatchIntegrationPlatform
- expensesPostAccountingExpensesLinksProcess
- expensesPostBackfillIntegration
- expensesPostExpenseSync
- expensesPostExpensesCategoryToCard
- genericGetFlexErrorCodes
- hubspotGetCrmHubspotAccountManagementBusinessIdSync
- hubspotGetCrmHubspotAccountManagementSyncAll
- hubspotGetCrmHubspotCompaniesBusinessIdSync
- hubspotGetCrmHubspotCompaniesSyncAll
- hubspotGetCrmHubspotContactsPersonIdSync
- hubspotGetCrmHubspotContactsSyncAll
- hubspotGetCrmHubspotDealsBusinessIdSync
- hubspotGetCrmHubspotDealsSyncAll
- hubspotGetCrmHubspotMonthlySpendBusinessIdSync
- hubspotGetCrmHubspotMonthlySpendSyncAll
- hubspotGetCrmHubspotOnboardingBusinessIdSync
- hubspotGetCrmHubspotOnboardingSyncAll
- hubspotGetCrmHubspotUnderwritingBusinessIdSync
- hubspotGetCrmHubspotUnderwritingSyncAll
- invoicesCreateAccountInvoices
- invoicesGetAccountInvoice
- invoicesGetInvoicesAttachment
- invoicesListAccountInvoices
- invoicesUploadAccountInvoices
- legacyCreditLegacySetLimit
- partnershipsGetPartnershipDashboard
- permissionAddAccountRoleToAuthentication
- permissionAddFlexRoleToAuthentication
- permissionListAccountPermissionsOnAccount
- permissionRemoveAccountRoleFromAuthentication
- permissionRemoveFlexRoleFromAuthentication
- personsCreatePersonsDocument
- personsDeletePersonSinglePhone
- personsDeletePerson
- personsDeletePersonsAddress
- personsGetPersonPhone
- personsGetPerson
- personsGetPersonsAddress
- personsGetPersonsAddresses
- personsGetPersonsDocumentReference
- personsGetPersonsEmails
- personsGetPrefillPersonBusiness
- personsListAccountsPersons
- personsListDocumentsForPerson
- personsListPersonsPhones
- personsPatchPersonSinglePhone
- personsPatchPerson
- personsPatchPersonsAddress
- personsPostPersonsAddresses
- personsPostPersonsEmails
- personsPostPersonsPhones
- personsPrefillPersonsAccess
- personsPrefillPersons
- personsRegisterAccountsPersons
- programsCreateCardProgram
- programsGetCardProgram
- programsListCardsPrograms
- programsUpdateCardProgram
- promoCodesCreatePromocodes
- promoCodesDeleteAccountPromocode
- promoCodesGetPromocodeByValue
- promoCodesGetPromocodes
- promoCodesLinkAccountPromocode
- promoCodesListAccountsWithPromocode
- promoCodesListPromocodes
- promoCodesUpdatePromocodes
- servicingListFactoringInvoices
- servicingPostFactoringAccountIdInvoicesInvoiceIdDecision
- spendPlansCreateSpendPlan
- spendPlansCreateTwispAccountEntitiesForAllAccounts
- spendPlansCreateTwispAccountEntities
- spendPlansDecisionFundsRequest
- spendPlansDeleteSpendPlan
- spendPlansGetAccountingSpendplansViewFunds
- spendPlansGetSpendPlanAdmin
- spendPlansGetSpendPlanAlfred
- spendPlansGetSpendPlanCards
- spendPlansGetSpendPlanLimits
- spendPlansGetSpendPlanLinkForInvoices
- spendPlansGetSpendPlanTransactionsAdmin
- spendPlansGetSpendPlanTransactions
- spendPlansGetSpendPlan
- spendPlansGetSpendPlansAdmin
- spendPlansGetSpendPlansAlfred
- spendPlansGetSpendPlansByCardId
- spendPlansGetSpendPlans
- spendPlansLinkCardToSpendPlan
- spendPlansLinkInvoiceToSpendPlan
- spendPlansLinkManagerToSpendPlan
- spendPlansLinkMemberToSpendPlan
- spendPlansPatchAccountingSpendplansDefault
- spendPlansPostAccountingSpendplansRequestFunds
- spendPlansUnlinkCardFromSpendPlan
- spendPlansUnlinkInvoiceFromSpendPlan
- spendPlansUnlinkManagerFromSpendPlan
- spendPlansUnlinkMemberFromSpendPlan
- spendPlansUpdateSpendPlan
- statementsGenerateMonthlyStatement
- statementsGeneratePdfFromHtml
- statementsGenerateTransactionDownload
- termsGetAccountTerms
- webhooksCardsWebhookEvents
- webhooksMercoaWebhookEvents
File uploads
Certain SDK methods accept files as part of a multi-part request. It is possible and typically recommended to upload files as a stream rather than reading the entire contents into memory. This avoids excessive memory consumption and potentially crashing with out-of-memory errors when working with very large files. The following example demonstrates how to attach a file stream to a request.
[!TIP]
Depending on your JavaScript runtime, there are convenient utilities that return a handle to a file without reading the entire contents into memory:
- Node.js v20+: Since v20, Node.js comes with a native
openAsBlob
function innode:fs
.- Bun: The native
Bun.file
function produces a file handle that can be used for streaming file uploads.- Browsers: All supported browsers return an instance to a
File
when reading the value from an<input type="file">
element.- Node.js v18: A file stream can be created using the
fileFrom
helper fromfetch-blob/from.js
.
import { Flex } from "flex";
const flex = new Flex({
token: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
await flex.applications.uploadApplicationRequestedDocumen