{"items":[{"type":"link","label":"Transactions API","link":"/openapi/transactions_api","routeSlug":"/openapi/transactions_api","content":{"contentType":"overview","meta":{"name":"Transactions API"},"children":[{"nodeType":"container","panels":[{"title":"Download OpenAPI description","titleTranslationKey":"download.description.title","children":[{"kind":"download","label":"transactions_api.json","url":"/_bundle/openapi/transactions_api.json?download"},{"kind":"download","label":"transactions_api.yaml","url":"/_bundle/openapi/transactions_api.yaml?download"}]},{"title":"Overview","titleTranslationKey":"info.title","children":[{"kind":"externallink","title":"URL","titleTranslationKey":"info.contact.url","label":"https://brex.com","url":"https://brex.com"},{"kind":"email","title":"Admin","email":"developer-support@brex.com","label":"developer-support@brex.com","withCopyButton":true,"copyContent":"developer-support@brex.com"}]},{"title":"Languages","titleTranslationKey":"languages.title","children":[{"kind":"languages","options":[{"key":"curl","title":"curl","lang":"curl"},{"key":"javascript","title":"JavaScript","lang":"JavaScript"},{"key":"node","title":"Node.js","lang":"Node.js"},{"key":"python","title":"Python","lang":"Python"},{"key":"ruby","title":"Ruby","lang":"Ruby"},{"key":"java","title":"Java","lang":"Java"}]}]},{"title":"Servers","titleTranslationKey":"servers.title","children":[{"kind":"servers","servers":[{"url":"https://api.brex.com","description":"Production"},{"url":"https://api-staging.brex.com","description":"Staging (Note: This is not a sandbox. It will not work with customer tokens.)"}],"mode":"default"}]}],"children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"header","level":1,"label":"Transactions API (1.0)","showPageActions":true},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":"The transactions API lets you view your transactions, accounts, and statements."}],"sectionId":"/"}],"sectionId":"/"}]}]}},{"type":"group","label":"Transactions","link":"/openapi/transactions_api/transactions","routeSlug":"/openapi/transactions_api/transactions","items":[{"label":"\nList transactions for all card accounts.\n","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/transactions_api/transactions/listprimarycardtransactions","routeSlug":"/openapi/transactions_api/transactions/listprimarycardtransactions","metadata":{"seo":{"title":"\nList transactions for all card accounts.\n","description":"This endpoint lists all settled transactions for all card accounts.Regular users may only fetch their own \"PURCHASE\",\"REFUND\" and \"CHARGEBACK\" settled transactions."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"listPrimaryCardTransactions","name":"\nList transactions for all card accounts.\n","isWebhook":false,"pointer":"/paths/~1v2~1transactions~1card~1primary/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"\nList transactions for all card accounts.\n","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"This endpoint lists all settled transactions for all card accounts."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Regular users may only fetch their own \"PURCHASE\",\"REFUND\" and \"CHARGEBACK\" settled transactions."},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Note: there may be a small lag when fetching transactions with cursor and time ranges. It is important"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"to have at least a 1+ day lookback when syncing transactions to ensure the delayed transactions are"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"properly handled."},"children":[],"type":"text"}],"type":"paragraph"}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"OAuth2","scopes":["transactions.card.readonly"],"type":"oauth2","description":"OAuth2 security scheme","flows":{"authorizationCode":{"authorizationUrl":"https://accounts-api.brex.com/oauth2/default/v1/authorize","tokenUrl":"https://accounts-api.brex.com/oauth2/default/v1/token","scopes":{"openid":"openid","offline_access":"offline access","transactions.card.readonly":"View card transaction data","statements.card.readonly":"View card statement data","accounts.card.readonly":"View card account data","accounts.cash.readonly":"View business accounts data"}}}}]}]},{"nodeType":"item-content","variant":"query","label":"Query","labelTranslationKey":"query","parameters":[{"name":"cursor","in":"query","schemaId":"schema_0"},{"name":"limit","in":"query","schemaId":"schema_1"},{"name":"user_ids","in":"query","schemaId":"schema_2"},{"name":"posted_at_start","in":"query","schemaId":"schema_3","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Shows only transactions with a "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"posted_at_date"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" on or after this date-time. This parameter is the date-time notation as defined by "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"href":"https://tools.ietf.org/html/rfc3339#section-5.6"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"RFC 3339, section 5.6"},"children":[],"type":"text"}],"type":"link"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"When polling for new transactions, we recommend using a lookback window that overlaps with your previous request rather than advancing "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"posted_at_start"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" to the exact time of your last poll. Set "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"posted_at_start"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" earlier than the end of your previous query window (we recommend overlapping by a few days) so that transactions are not missed if a prior request or response failed, or if a transaction was posted with a slight delay. De-duplicate the overlapping results by transaction "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"."},"children":[],"type":"text"}],"type":"paragraph"}],"example":"\n2022-12-12T23:59:59.999\n"},{"name":"expand[]","in":"query","schemaId":"schema_4"}],"pointer":"/paths/~1v2~1transactions~1card~1primary/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/v2/transactions/card/primary","servers":[{"url":"https://api.brex.com","description":"Production"},{"url":"https://api-staging.brex.com","description":"Staging (Note: This is not a sandbox. It will not work with customer tokens.)"}],"parameters":{"path":[],"query":[{"name":"cursor","in":"query","schemaId":"schema_0"},{"name":"limit","in":"query","schemaId":"schema_1"},{"name":"user_ids","in":"query","schemaId":"schema_2"},{"name":"posted_at_start","in":"query","example":"\n2022-12-12T23:59:59.999\n","schemaId":"schema_3"},{"name":"expand[]","in":"query","schemaId":"schema_4"}],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"OAuth2","type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://accounts-api.brex.com/oauth2/default/v1/authorize","tokenUrl":"https://accounts-api.brex.com/oauth2/default/v1/token","scopes":{"openid":"openid","offline_access":"offline access","transactions.card.readonly":"View card transaction data","statements.card.readonly":"View card statement data","accounts.card.readonly":"View card account data","accounts.cash.readonly":"View business accounts data"}}}}],"scopes":["transactions.card.readonly"]}],"responseCodes":["200","400","401","403"],"pointer":"/v2/transactions/card/primary","href":"transactions/listprimarycardtransactions","openApiOperationId":"listPrimaryCardTransactions","summary":"\nList transactions for all card accounts.\n"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://api.brex.com","description":"Production"},{"url":"https://api-staging.brex.com","description":"Staging (Note: This is not a sandbox. It will not work with customer tokens.)"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Returns a list of card transactions.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Page_CardTransaction_"}},"schemaId":"components/schemas/Page_CardTransaction_"},{"code":"400","description":"Bad request"},{"code":"401","description":"Unauthorized"},{"code":"403","description":"Forbidden"}],"pointer":"/paths/~1v2~1transactions~1card~1primary/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/Page_CardTransaction_","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Page_CardTransaction_"}}},{"code":"400"},{"code":"401"},{"code":"403"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/transactions/listprimarycardtransactions"}],"panels":[]}]},"httpPath":"/v2/transactions/card/primary"},{"label":"\nList transactions for the selected cash account.\n","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/transactions_api/transactions/listcashtransactions","routeSlug":"/openapi/transactions_api/transactions/listcashtransactions","metadata":{"seo":{"title":"\nList transactions for the selected cash account.\n","description":"This endpoint lists all transactions for the cash account with the selected ID."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"listCashTransactions","name":"\nList transactions for the selected cash account.\n","isWebhook":false,"pointer":"/paths/~1v2~1transactions~1cash~1{id}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"\nList transactions for the selected cash account.\n","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"\nThis endpoint lists all transactions for the cash account with the selected ID.\n"},{"nodeType":"security","requirements":[{"schemes":[{"name":"OAuth2","scopes":["transactions.cash.readonly"],"type":"oauth2","description":"OAuth2 security scheme","flows":{"authorizationCode":{"authorizationUrl":"https://accounts-api.brex.com/oauth2/default/v1/authorize","tokenUrl":"https://accounts-api.brex.com/oauth2/default/v1/token","scopes":{"openid":"openid","offline_access":"offline access","transactions.card.readonly":"View card transaction data","statements.card.readonly":"View card statement data","accounts.card.readonly":"View card account data","accounts.cash.readonly":"View business accounts data"}}}}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"id","in":"path","schemaId":"schema_5","required":true}],"pointer":"/paths/~1v2~1transactions~1cash~1{id}/get/parameters"},{"nodeType":"item-content","variant":"query","label":"Query","labelTranslationKey":"query","parameters":[{"name":"cursor","in":"query","schemaId":"schema_0"},{"name":"limit","in":"query","schemaId":"schema_1"},{"name":"posted_at_start","in":"query","schemaId":"schema_3","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Shows only transactions with a "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"posted_at_date"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" on or after this date-time. This parameter is the date-time notation as defined by "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"href":"https://tools.ietf.org/html/rfc3339#section-5.6"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"RFC 3339, section 5.6"},"children":[],"type":"text"}],"type":"link"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"When polling for new transactions, we recommend using a lookback window that overlaps with your previous request rather than advancing "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"posted_at_start"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" to the exact time of your last poll. Set "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"posted_at_start"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" earlier than the end of your previous query window (for example, overlapping by a few days) so that transactions are not missed if a prior request or response failed, or if a transaction was posted with a slight delay. De-duplicate the overlapping results by transaction "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"."},"children":[],"type":"text"}],"type":"paragraph"}],"example":"\n2022-12-12T23:59:59.999\n"}],"pointer":"/paths/~1v2~1transactions~1cash~1{id}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/v2/transactions/cash/{id}","servers":[{"url":"https://api.brex.com","description":"Production"},{"url":"https://api-staging.brex.com","description":"Staging (Note: This is not a sandbox. It will not work with customer tokens.)"}],"parameters":{"path":[{"name":"id","in":"path","required":true,"schemaId":"schema_5"}],"query":[{"name":"cursor","in":"query","schemaId":"schema_0"},{"name":"limit","in":"query","schemaId":"schema_1"},{"name":"posted_at_start","in":"query","example":"\n2022-12-12T23:59:59.999\n","schemaId":"schema_3"}],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"OAuth2","type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://accounts-api.brex.com/oauth2/default/v1/authorize","tokenUrl":"https://accounts-api.brex.com/oauth2/default/v1/token","scopes":{"openid":"openid","offline_access":"offline access","transactions.card.readonly":"View card transaction data","statements.card.readonly":"View card statement data","accounts.card.readonly":"View card account data","accounts.cash.readonly":"View business accounts data"}}}}],"scopes":["transactions.cash.readonly"]}],"responseCodes":["200","400","401","403"],"pointer":"/v2/transactions/cash/{id}","href":"transactions/listcashtransactions","openApiOperationId":"listCashTransactions","summary":"\nList transactions for the selected cash account.\n"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://api.brex.com","description":"Production"},{"url":"https://api-staging.brex.com","description":"Staging (Note: This is not a sandbox. It will not work with customer tokens.)"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Returns a list of cash transactions.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Page_CashTransaction_"}},"schemaId":"components/schemas/Page_CashTransaction_"},{"code":"400","description":"Bad request"},{"code":"401","description":"Unauthorized"},{"code":"403","description":"Forbidden"}],"pointer":"/paths/~1v2~1transactions~1cash~1{id}/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/Page_CashTransaction_","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Page_CashTransaction_"}}},{"code":"400"},{"code":"401"},{"code":"403"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/transactions/listcashtransactions"}],"panels":[]}]},"httpPath":"/v2/transactions/cash/{id}"}],"content":{"contentType":"group","meta":{"name":"Transactions"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Transactions","showPageActions":true},{"nodeType":"markdoc","content":"Endpoints for transaction data."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/v2/transactions/card/primary","summary":"\nList transactions for all card accounts.\n","prefix":{"name":"get","color":"get"},"badges":[],"link":"/transactions/listprimarycardtransactions","deprecated":false},{"title":"/v2/transactions/cash/{id}","summary":"\nList transactions for the selected cash account.\n","prefix":{"name":"get","color":"get"},"badges":[],"link":"/transactions/listcashtransactions","deprecated":false}]}]}]}]}},{"type":"group","label":"Accounts","link":"/openapi/transactions_api/accounts","routeSlug":"/openapi/transactions_api/accounts","items":[{"label":"\nList card accounts\n","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/transactions_api/accounts/listcardaccounts","routeSlug":"/openapi/transactions_api/accounts/listcardaccounts","metadata":{"seo":{"title":"\nList card accounts\n","description":"This endpoint lists all accounts of card type."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"listCardAccounts","name":"\nList card accounts\n","isWebhook":false,"pointer":"/paths/~1v2~1accounts~1card/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"\nList card accounts\n","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"\nThis endpoint lists all accounts of card type.\n"},{"nodeType":"security","requirements":[{"schemes":[{"name":"OAuth2","scopes":["accounts.card.readonly"],"type":"oauth2","description":"OAuth2 security scheme","flows":{"authorizationCode":{"authorizationUrl":"https://accounts-api.brex.com/oauth2/default/v1/authorize","tokenUrl":"https://accounts-api.brex.com/oauth2/default/v1/token","scopes":{"openid":"openid","offline_access":"offline access","transactions.card.readonly":"View card transaction data","statements.card.readonly":"View card statement data","accounts.card.readonly":"View card account data","accounts.cash.readonly":"View business accounts data"}}}}]}]}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/v2/accounts/card","servers":[{"url":"https://api.brex.com","description":"Production"},{"url":"https://api-staging.brex.com","description":"Staging (Note: This is not a sandbox. It will not work with customer tokens.)"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"OAuth2","type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://accounts-api.brex.com/oauth2/default/v1/authorize","tokenUrl":"https://accounts-api.brex.com/oauth2/default/v1/token","scopes":{"openid":"openid","offline_access":"offline access","transactions.card.readonly":"View card transaction data","statements.card.readonly":"View card statement data","accounts.card.readonly":"View card account data","accounts.cash.readonly":"View business accounts data"}}}}],"scopes":["accounts.card.readonly"]}],"responseCodes":["200","400","401","403"],"pointer":"/v2/accounts/card","href":"accounts/listcardaccounts","openApiOperationId":"listCardAccounts","summary":"\nList card accounts\n"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://api.brex.com","description":"Production"},{"url":"https://api-staging.brex.com","description":"Staging (Note: This is not a sandbox. It will not work with customer tokens.)"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Returns a list of card accounts.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_6"}},"schemaId":"schema_6"},{"code":"400","description":"Bad request"},{"code":"401","description":"Unauthorized"},{"code":"403","description":"Forbidden"}],"pointer":"/paths/~1v2~1accounts~1card/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"schema_6","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_6"}}},{"code":"400"},{"code":"401"},{"code":"403"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/accounts/listcardaccounts"}],"panels":[]}]},"httpPath":"/v2/accounts/card"},{"label":"\nList primary card account statements. \n","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/transactions_api/accounts/listprimarycardstatements","routeSlug":"/openapi/transactions_api/accounts/listprimarycardstatements","metadata":{"seo":{"title":"\nList primary card account statements. \n","description":"This endpoint lists all finalized statements for the primary card account."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"listPrimaryCardStatements","name":"\nList primary card account statements. \n","isWebhook":false,"pointer":"/paths/~1v2~1accounts~1card~1primary~1statements/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"\nList primary card account statements. \n","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"\nThis endpoint lists all finalized statements for the primary card account.\n"},{"nodeType":"security","requirements":[{"schemes":[{"name":"OAuth2","scopes":["statements.card.readonly"],"type":"oauth2","description":"OAuth2 security scheme","flows":{"authorizationCode":{"authorizationUrl":"https://accounts-api.brex.com/oauth2/default/v1/authorize","tokenUrl":"https://accounts-api.brex.com/oauth2/default/v1/token","scopes":{"openid":"openid","offline_access":"offline access","transactions.card.readonly":"View card transaction data","statements.card.readonly":"View card statement data","accounts.card.readonly":"View card account data","accounts.cash.readonly":"View business accounts data"}}}}]}]},{"nodeType":"item-content","variant":"query","label":"Query","labelTranslationKey":"query","parameters":[{"name":"cursor","in":"query","schemaId":"schema_0"},{"name":"limit","in":"query","schemaId":"schema_1"}],"pointer":"/paths/~1v2~1accounts~1card~1primary~1statements/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/v2/accounts/card/primary/statements","servers":[{"url":"https://api.brex.com","description":"Production"},{"url":"https://api-staging.brex.com","description":"Staging (Note: This is not a sandbox. It will not work with customer tokens.)"}],"parameters":{"path":[],"query":[{"name":"cursor","in":"query","schemaId":"schema_0"},{"name":"limit","in":"query","schemaId":"schema_1"}],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"OAuth2","type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://accounts-api.brex.com/oauth2/default/v1/authorize","tokenUrl":"https://accounts-api.brex.com/oauth2/default/v1/token","scopes":{"openid":"openid","offline_access":"offline access","transactions.card.readonly":"View card transaction data","statements.card.readonly":"View card statement data","accounts.card.readonly":"View card account data","accounts.cash.readonly":"View business accounts data"}}}}],"scopes":["statements.card.readonly"]}],"responseCodes":["200","400","401","403"],"pointer":"/v2/accounts/card/primary/statements","href":"accounts/listprimarycardstatements","openApiOperationId":"listPrimaryCardStatements","summary":"\nList primary card account statements. \n"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://api.brex.com","description":"Production"},{"url":"https://api-staging.brex.com","description":"Staging (Note: This is not a sandbox. It will not work with customer tokens.)"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Returns a list of primary card account statements.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Page_Statement_"}},"schemaId":"components/schemas/Page_Statement_"},{"code":"400","description":"Bad request"},{"code":"401","description":"Unauthorized"},{"code":"403","description":"Forbidden"}],"pointer":"/paths/~1v2~1accounts~1card~1primary~1statements/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/Page_Statement_","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Page_Statement_"}}},{"code":"400"},{"code":"401"},{"code":"403"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/accounts/listprimarycardstatements"}],"panels":[]}]},"httpPath":"/v2/accounts/card/primary/statements"},{"label":"\nList cash accounts\n","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/transactions_api/accounts/listaccounts","routeSlug":"/openapi/transactions_api/accounts/listaccounts","metadata":{"seo":{"title":"\nList cash accounts\n","description":"This endpoint lists all the existing cash accounts with their status."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"listAccounts","name":"\nList cash accounts\n","isWebhook":false,"pointer":"/paths/~1v2~1accounts~1cash/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"\nList cash accounts\n","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"\nThis endpoint lists all the existing cash accounts with their status.\n"},{"nodeType":"security","requirements":[{"schemes":[{"name":"OAuth2","scopes":["accounts.cash.readonly"],"type":"oauth2","description":"OAuth2 security scheme","flows":{"authorizationCode":{"authorizationUrl":"https://accounts-api.brex.com/oauth2/default/v1/authorize","tokenUrl":"https://accounts-api.brex.com/oauth2/default/v1/token","scopes":{"openid":"openid","offline_access":"offline access","transactions.card.readonly":"View card transaction data","statements.card.readonly":"View card statement data","accounts.card.readonly":"View card account data","accounts.cash.readonly":"View business accounts data"}}}}]}]}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/v2/accounts/cash","servers":[{"url":"https://api.brex.com","description":"Production"},{"url":"https://api-staging.brex.com","description":"Staging (Note: This is not a sandbox. It will not work with customer tokens.)"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"OAuth2","type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://accounts-api.brex.com/oauth2/default/v1/authorize","tokenUrl":"https://accounts-api.brex.com/oauth2/default/v1/token","scopes":{"openid":"openid","offline_access":"offline access","transactions.card.readonly":"View card transaction data","statements.card.readonly":"View card statement data","accounts.card.readonly":"View card account data","accounts.cash.readonly":"View business accounts data"}}}}],"scopes":["accounts.cash.readonly"]}],"responseCodes":["200","400","401","403"],"pointer":"/v2/accounts/cash","href":"accounts/listaccounts","openApiOperationId":"listAccounts","summary":"\nList cash accounts\n"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://api.brex.com","description":"Production"},{"url":"https://api-staging.brex.com","description":"Staging (Note: This is not a sandbox. It will not work with customer tokens.)"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Returns a list of cash accounts.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Page_CashAccount_"}},"schemaId":"components/schemas/Page_CashAccount_"},{"code":"400","description":"Bad request"},{"code":"401","description":"Unauthorized"},{"code":"403","description":"Forbidden"}],"pointer":"/paths/~1v2~1accounts~1cash/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/Page_CashAccount_","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Page_CashAccount_"}}},{"code":"400"},{"code":"401"},{"code":"403"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/accounts/listaccounts"}],"panels":[]}]},"httpPath":"/v2/accounts/cash"},{"label":"\nGet primary cash account\n","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/transactions_api/accounts/getprimaryaccount","routeSlug":"/openapi/transactions_api/accounts/getprimaryaccount","metadata":{"seo":{"title":"\nGet primary cash account\n","description":"This endpoint returns the primary cash account with its status. There will always be only one primary account."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getPrimaryAccount","name":"\nGet primary cash account\n","isWebhook":false,"pointer":"/paths/~1v2~1accounts~1cash~1primary/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"\nGet primary cash account\n","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"\nThis endpoint returns the primary cash account with its status. There will always be only one primary account.\n"},{"nodeType":"security","requirements":[{"schemes":[{"name":"OAuth2","scopes":["accounts.cash.readonly"],"type":"oauth2","description":"OAuth2 security scheme","flows":{"authorizationCode":{"authorizationUrl":"https://accounts-api.brex.com/oauth2/default/v1/authorize","tokenUrl":"https://accounts-api.brex.com/oauth2/default/v1/token","scopes":{"openid":"openid","offline_access":"offline access","transactions.card.readonly":"View card transaction data","statements.card.readonly":"View card statement data","accounts.card.readonly":"View card account data","accounts.cash.readonly":"View business accounts data"}}}}]}]}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/v2/accounts/cash/primary","servers":[{"url":"https://api.brex.com","description":"Production"},{"url":"https://api-staging.brex.com","description":"Staging (Note: This is not a sandbox. It will not work with customer tokens.)"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"OAuth2","type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://accounts-api.brex.com/oauth2/default/v1/authorize","tokenUrl":"https://accounts-api.brex.com/oauth2/default/v1/token","scopes":{"openid":"openid","offline_access":"offline access","transactions.card.readonly":"View card transaction data","statements.card.readonly":"View card statement data","accounts.card.readonly":"View card account data","accounts.cash.readonly":"View business accounts data"}}}}],"scopes":["accounts.cash.readonly"]}],"responseCodes":["200","400","401","403"],"pointer":"/v2/accounts/cash/primary","href":"accounts/getprimaryaccount","openApiOperationId":"getPrimaryAccount","summary":"\nGet primary cash account\n"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://api.brex.com","description":"Production"},{"url":"https://api-staging.brex.com","description":"Staging (Note: This is not a sandbox. It will not work with customer tokens.)"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Returns the primary cash account.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/CashAccount"}},"schemaId":"components/schemas/CashAccount"},{"code":"400","description":"Bad request"},{"code":"401","description":"Unauthorized"},{"code":"403","description":"Forbidden"}],"pointer":"/paths/~1v2~1accounts~1cash~1primary/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/CashAccount","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/CashAccount"}}},{"code":"400"},{"code":"401"},{"code":"403"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/accounts/getprimaryaccount"}],"panels":[]}]},"httpPath":"/v2/accounts/cash/primary"},{"label":"\nGet cash account by ID\n","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/transactions_api/accounts/getaccount","routeSlug":"/openapi/transactions_api/accounts/getaccount","metadata":{"seo":{"title":"\nGet cash account by ID\n","description":"This endpoint returns the cash account associated with the provided ID with its status."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getAccount","name":"\nGet cash account by ID\n","isWebhook":false,"pointer":"/paths/~1v2~1accounts~1cash~1{id}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"\nGet cash account by ID\n","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"\nThis endpoint returns the cash account associated with the provided ID with its status.\n"},{"nodeType":"security","requirements":[{"schemes":[{"name":"OAuth2","scopes":["accounts.cash.readonly"],"type":"oauth2","description":"OAuth2 security scheme","flows":{"authorizationCode":{"authorizationUrl":"https://accounts-api.brex.com/oauth2/default/v1/authorize","tokenUrl":"https://accounts-api.brex.com/oauth2/default/v1/token","scopes":{"openid":"openid","offline_access":"offline access","transactions.card.readonly":"View card transaction data","statements.card.readonly":"View card statement data","accounts.card.readonly":"View card account data","accounts.cash.readonly":"View business accounts data"}}}}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"id","in":"path","schemaId":"schema_5","required":true}],"pointer":"/paths/~1v2~1accounts~1cash~1{id}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/v2/accounts/cash/{id}","servers":[{"url":"https://api.brex.com","description":"Production"},{"url":"https://api-staging.brex.com","description":"Staging (Note: This is not a sandbox. It will not work with customer tokens.)"}],"parameters":{"path":[{"name":"id","in":"path","required":true,"schemaId":"schema_5"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"OAuth2","type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://accounts-api.brex.com/oauth2/default/v1/authorize","tokenUrl":"https://accounts-api.brex.com/oauth2/default/v1/token","scopes":{"openid":"openid","offline_access":"offline access","transactions.card.readonly":"View card transaction data","statements.card.readonly":"View card statement data","accounts.card.readonly":"View card account data","accounts.cash.readonly":"View business accounts data"}}}}],"scopes":["accounts.cash.readonly"]}],"responseCodes":["200","400","401","403"],"pointer":"/v2/accounts/cash/{id}","href":"accounts/getaccount","openApiOperationId":"getAccount","summary":"\nGet cash account by ID\n"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://api.brex.com","description":"Production"},{"url":"https://api-staging.brex.com","description":"Staging (Note: This is not a sandbox. It will not work with customer tokens.)"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Returns the cash account.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/CashAccount"}},"schemaId":"components/schemas/CashAccount"},{"code":"400","description":"Bad request"},{"code":"401","description":"Unauthorized"},{"code":"403","description":"Forbidden"}],"pointer":"/paths/~1v2~1accounts~1cash~1{id}/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/CashAccount","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/CashAccount"}}},{"code":"400"},{"code":"401"},{"code":"403"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/accounts/getaccount"}],"panels":[]}]},"httpPath":"/v2/accounts/cash/{id}"},{"label":"\nList cash account statements.    \n","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/transactions_api/accounts/listcashstatements","routeSlug":"/openapi/transactions_api/accounts/listcashstatements","metadata":{"seo":{"title":"\nList cash account statements.    \n","description":"This endpoint lists all finalized statements for the cash account by ID."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"listCashStatements","name":"\nList cash account statements.    \n","isWebhook":false,"pointer":"/paths/~1v2~1accounts~1cash~1{id}~1statements/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"\nList cash account statements.    \n","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"\nThis endpoint lists all finalized statements for the cash account by ID.\n"},{"nodeType":"security","requirements":[{"schemes":[{"name":"OAuth2","scopes":["statements.cash.readonly"],"type":"oauth2","description":"OAuth2 security scheme","flows":{"authorizationCode":{"authorizationUrl":"https://accounts-api.brex.com/oauth2/default/v1/authorize","tokenUrl":"https://accounts-api.brex.com/oauth2/default/v1/token","scopes":{"openid":"openid","offline_access":"offline access","transactions.card.readonly":"View card transaction data","statements.card.readonly":"View card statement data","accounts.card.readonly":"View card account data","accounts.cash.readonly":"View business accounts data"}}}}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"id","in":"path","schemaId":"schema_5","required":true}],"pointer":"/paths/~1v2~1accounts~1cash~1{id}~1statements/get/parameters"},{"nodeType":"item-content","variant":"query","label":"Query","labelTranslationKey":"query","parameters":[{"name":"cursor","in":"query","schemaId":"schema_0"},{"name":"limit","in":"query","schemaId":"schema_1"}],"pointer":"/paths/~1v2~1accounts~1cash~1{id}~1statements/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/v2/accounts/cash/{id}/statements","servers":[{"url":"https://api.brex.com","description":"Production"},{"url":"https://api-staging.brex.com","description":"Staging (Note: This is not a sandbox. It will not work with customer tokens.)"}],"parameters":{"path":[{"name":"id","in":"path","required":true,"schemaId":"schema_5"}],"query":[{"name":"cursor","in":"query","schemaId":"schema_0"},{"name":"limit","in":"query","schemaId":"schema_1"}],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"OAuth2","type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://accounts-api.brex.com/oauth2/default/v1/authorize","tokenUrl":"https://accounts-api.brex.com/oauth2/default/v1/token","scopes":{"openid":"openid","offline_access":"offline access","transactions.card.readonly":"View card transaction data","statements.card.readonly":"View card statement data","accounts.card.readonly":"View card account data","accounts.cash.readonly":"View business accounts data"}}}}],"scopes":["statements.cash.readonly"]}],"responseCodes":["200","400","401","403"],"pointer":"/v2/accounts/cash/{id}/statements","href":"accounts/listcashstatements","openApiOperationId":"listCashStatements","summary":"\nList cash account statements.    \n"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://api.brex.com","description":"Production"},{"url":"https://api-staging.brex.com","description":"Staging (Note: This is not a sandbox. It will not work with customer tokens.)"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Returns a list of cash account statements.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Page_Statement_"}},"schemaId":"components/schemas/Page_Statement_"},{"code":"400","description":"Bad request"},{"code":"401","description":"Unauthorized"},{"code":"403","description":"Forbidden"}],"pointer":"/paths/~1v2~1accounts~1cash~1{id}~1statements/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/Page_Statement_","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Page_Statement_"}}},{"code":"400"},{"code":"401"},{"code":"403"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/accounts/listcashstatements"}],"panels":[]}]},"httpPath":"/v2/accounts/cash/{id}/statements"}],"content":{"contentType":"group","meta":{"name":"Accounts"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Accounts","showPageActions":true},{"nodeType":"markdoc","content":"Endpoints for account data."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/v2/accounts/card","summary":"\nList card accounts\n","prefix":{"name":"get","color":"get"},"badges":[],"link":"/accounts/listcardaccounts","deprecated":false},{"title":"/v2/accounts/card/primary/statements","summary":"\nList primary card account statements. \n","prefix":{"name":"get","color":"get"},"badges":[],"link":"/accounts/listprimarycardstatements","deprecated":false},{"title":"/v2/accounts/cash","summary":"\nList cash accounts\n","prefix":{"name":"get","color":"get"},"badges":[],"link":"/accounts/listaccounts","deprecated":false},{"title":"/v2/accounts/cash/primary","summary":"\nGet primary cash account\n","prefix":{"name":"get","color":"get"},"badges":[],"link":"/accounts/getprimaryaccount","deprecated":false},{"title":"/v2/accounts/cash/{id}","summary":"\nGet cash account by ID\n","prefix":{"name":"get","color":"get"},"badges":[],"link":"/accounts/getaccount","deprecated":false},{"title":"/v2/accounts/cash/{id}/statements","summary":"\nList cash account statements.    \n","prefix":{"name":"get","color":"get"},"badges":[],"link":"/accounts/listcashstatements","deprecated":false}]}]}]}]}}],"store":{"schemaStore":{"components/schemas/CardAccount":{"id":"components/schemas/CardAccount","kind":"json-schema","title":"CardAccount","data":{"required":["current_statement_period","id"],"type":"object","properties":{"id":{"type":"string","description":"ID of the card account"},"status":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Status"}]},"current_balance":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Money"}]},"available_balance":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Money"}]},"account_limit":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Money"}]},"current_statement_period":{"$ref":"#/components/schemas/StatementPeriod"}}}},"components/schemas/CardTransaction":{"id":"components/schemas/CardTransaction","kind":"json-schema","title":"CardTransaction","data":{"required":["amount","description","id","initiated_at_date","posted_at_date"],"type":"object","properties":{"id":{"type":"string"},"card_id":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"ID of the card used for the transaction. Null when type is REWARDS_CREDIT or COLLECTION."},"children":[],"type":"text"}],"type":"paragraph"}],"nullable":true},"description":{"type":"string","description":"Description of the transaction"},"amount":{"$ref":"#/components/schemas/Money"},"initiated_at_date":{"type":"string","description":"ISO 8601 date string","format":"date"},"posted_at_date":{"type":"string","description":"ISO 8601 date string","format":"date"},"type":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/CardTransactionType"}]},"merchant":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Merchant"}]},"card_metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"\nSet of key value pairs associated with this object. Please do not store any personally identifiable or sensitive information here.\nLimitations: maximum of 50 keys, keys cannot exceed 40 characters, values cannot exceed 500 characters. \n","nullable":true},"expense_id":{"type":"string","description":"The expense ID related to the card transaction.","nullable":true},"card_transaction_operation_reference_id":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"The card transaction operation reference ID. Null when type is REWARDS_CREDIT, COLLECTION, or BNPL_FEE."},"children":[],"type":"text"}],"type":"paragraph"}],"nullable":true},"usd_equivalent_amount":{"nullable":true,"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"The amount of the transaction in USD. It is an estimate when neither the billing nor the original currency is USD. Null when no USD amount is available for the transaction, for example when type is REWARDS_CREDIT or COLLECTION."},"children":[],"type":"text"}],"type":"paragraph"}],"allOf":[{"$ref":"#/components/schemas/Money"}]}}}},"components/schemas/CardTransactionType":{"id":"components/schemas/CardTransactionType","kind":"json-schema","title":"CardTransactionType","data":{"type":"string","enum":["PURCHASE","REFUND","CHARGEBACK","REWARDS_CREDIT","COLLECTION","BNPL_FEE"]}},"components/schemas/CashAccount":{"id":"components/schemas/CashAccount","kind":"json-schema","title":"CashAccount","data":{"required":["account_number","available_balance","current_balance","id","name","primary","routing_number"],"type":"object","properties":{"id":{"type":"string","description":"ID of the cash account"},"name":{"type":"string"},"status":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Status"}]},"current_balance":{"$ref":"#/components/schemas/Money"},"available_balance":{"$ref":"#/components/schemas/Money"},"account_number":{"type":"string"},"routing_number":{"type":"string"},"primary":{"type":"boolean","description":"Whether or not this account is the primary account. There will always be only one primary account."}}}},"components/schemas/CashTransaction":{"id":"components/schemas/CashTransaction","kind":"json-schema","title":"CashTransaction","data":{"required":["description","id","initiated_at_date","posted_at_date"],"type":"object","properties":{"id":{"type":"string"},"description":{"type":"string","description":"Description of the transaction"},"amount":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Money"}]},"initiated_at_date":{"type":"string","description":"ISO 8601 date of when the payment is initiated","format":"date"},"posted_at_date":{"type":"string","description":"ISO 8601 date of when the payment is posted","format":"date"},"type":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/CashTransactionType"}]},"transfer_id":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Transfer ID to fetch additional metadata about the transaction using "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"https://developer.brex.com/openapi/payments_api/#operation/getTransfersById"},"children":[],"type":"code"}],"type":"paragraph"}],"nullable":true}}}},"components/schemas/CashTransactionType":{"id":"components/schemas/CashTransactionType","kind":"json-schema","title":"CashTransactionType","data":{"type":"string","enum":["PAYMENT","DIVIDEND","FEE","ADJUSTMENT","INTEREST","CARD_COLLECTION","REWARDS_REDEMPTION","RECEIVABLES_OFFERS_ADVANCE","FBO_TRANSFER","RECEIVABLES_OFFERS_REPAYMENT","RECEIVABLES_OFFERS_COLLECTION","BREX_OPERATIONAL_TRANSFER","INTRA_CUSTOMER_ACCOUNT_BOOK_TRANSFER","BOOK_TRANSFER","CRYPTO_BRIDGE","STABLECOIN","TRANSACTION_FEES_COLLECTION","PAYBACK"]}},"components/schemas/Merchant":{"id":"components/schemas/Merchant","kind":"json-schema","title":"Merchant","data":{"required":["country","mcc","raw_descriptor"],"type":"object","properties":{"raw_descriptor":{"type":"string","description":"Merchant descriptor, it can be the merchant name."},"mcc":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"A four-digit number listed in ISO 18245 for retail financial services, e.g. 4121 for Taxicabs and Rideshares. Please refer to https://en.wikipedia.org/wiki/Merchant_category_code for more details."},"children":[],"type":"text"}],"type":"paragraph"}]},"country":{"type":"string","description":"Merchant's country, in ISO 3166-1 alpha-3 format."}}}},"components/schemas/Money":{"id":"components/schemas/Money","kind":"json-schema","title":"Money","data":{"required":["amount"],"type":"object","properties":{"amount":{"type":"integer","description":"The amount of money, in the smallest denomination of the currency indicated by currency. For example, when currency is USD, amount is in cents.","format":"int64","example":700},"currency":{"type":"string","description":"The type of currency, in ISO 4217 format.","nullable":true,"example":"USD","default":"USD"}},"description":"\nMoney fields can be signed or unsigned. Fields are signed (an unsigned value will be interpreted as positive). The amount of money will be represented in the smallest denomination\nof the currency indicated. For example, USD 7.00 will be represented in cents with an amount of 700.\n"}},"components/schemas/Page_CardTransaction_":{"id":"components/schemas/Page_CardTransaction_","kind":"json-schema","title":"Page_CardTransaction_","data":{"required":["items"],"type":"object","properties":{"next_cursor":{"type":"string","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/CardTransaction"}}}}},"components/schemas/Page_CashAccount_":{"id":"components/schemas/Page_CashAccount_","kind":"json-schema","title":"Page_CashAccount_","data":{"required":["items"],"type":"object","properties":{"next_cursor":{"type":"string","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/CashAccount"}}}}},"components/schemas/Page_CashTransaction_":{"id":"components/schemas/Page_CashTransaction_","kind":"json-schema","title":"Page_CashTransaction_","data":{"required":["items"],"type":"object","properties":{"next_cursor":{"type":"string","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/CashTransaction"}}}}},"components/schemas/Page_Statement_":{"id":"components/schemas/Page_Statement_","kind":"json-schema","title":"Page_Statement_","data":{"required":["items"],"type":"object","properties":{"next_cursor":{"type":"string","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/Statement"}}}}},"components/schemas/Statement":{"id":"components/schemas/Statement","kind":"json-schema","title":"Statement","data":{"required":["id","period"],"type":"object","properties":{"id":{"type":"string"},"start_balance":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Money"}]},"end_balance":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Money"}]},"period":{"$ref":"#/components/schemas/StatementPeriod"}}}},"components/schemas/StatementPeriod":{"id":"components/schemas/StatementPeriod","kind":"json-schema","title":"StatementPeriod","data":{"required":["end_date","start_date"],"type":"object","properties":{"start_date":{"type":"string","description":"Start date of the statement period at UTC 00:00:00 (inclusive)","format":"date"},"end_date":{"type":"string","description":"End date of the statement period at UTC 00:00:00 (exclusive)","format":"date"}}}},"components/schemas/Status":{"id":"components/schemas/Status","kind":"json-schema","title":"Status","data":{"type":"string","enum":["ACTIVE"]}},"schema_0":{"kind":"json-schema","data":{"type":"string","nullable":true},"id":"schema_0"},"schema_1":{"kind":"json-schema","data":{"type":"integer","format":"int32","nullable":true},"id":"schema_1"},"schema_2":{"kind":"json-schema","data":{"type":"array","nullable":true,"items":{"type":"string"}},"id":"schema_2"},"schema_3":{"kind":"json-schema","data":{"type":"string","format":"date-time","nullable":true},"id":"schema_3"},"schema_4":{"kind":"json-schema","data":{"type":"array","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"expense_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" can be passed to "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"expand[]"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" query parameter to get expanded, e.g., "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"?expand[]=expense_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"."},"children":[],"type":"text"}],"type":"paragraph"}],"nullable":true,"items":{"type":"string"}},"id":"schema_4"},"schema_5":{"kind":"json-schema","data":{"type":"string"},"id":"schema_5"},"schema_6":{"kind":"json-schema","data":{"type":"array","items":{"$ref":"#/components/schemas/CardAccount"}},"id":"schema_6"}},"exampleStore":{},"securitySchemeStore":{"OAuth2":{"id":"OAuth2","type":"oauth2","description":"OAuth2 security scheme","flows":{"authorizationCode":{"authorizationUrl":"https://accounts-api.brex.com/oauth2/default/v1/authorize","tokenUrl":"https://accounts-api.brex.com/oauth2/default/v1/token","scopes":{"openid":"openid","offline_access":"offline access","transactions.card.readonly":"View card transaction data","statements.card.readonly":"View card statement data","accounts.card.readonly":"View card account data","accounts.cash.readonly":"View business accounts data"}}}}},"specVersion":"3.0.1","servers":[{"url":"https://api.brex.com","description":"Production"},{"url":"https://api-staging.brex.com","description":"Staging (Note: This is not a sandbox. It will not work with customer tokens.)"}],"logo":{"imageUrl":"https://www.brex.com/logo.png","href":"https://brex.com","altText":"Brex Logo"},"specType":"openapi"},"options":{"showConsole":false,"codeSamples":{"languages":[{"lang":"curl"},{"lang":"JavaScript"},{"lang":"Node.js"},{"lang":"Python"},{"lang":"Ruby"},{"lang":"Java"}],"skipOptionalParameters":true},"mockServer":{"off":true},"disableRouter":true,"downloadUrls":[{"url":"/_bundle/openapi/transactions_api.json?download"},{"url":"/_bundle/openapi/transactions_api.yaml?download"}],"excludeFromSearch":false,"replayFeatures":{"graphql":false,"asyncapi":false},"specType":"openapi","markdocOptions":{"tags":{},"nodes":{},"components":{}},"metadata":{"title":"Transactions API","description":"\nThe transactions API lets you view your transactions, accounts, and statements.\n"}},"baseSlug":"/openapi/transactions_api","routesMapping":{}}