Skip to content

Expenses API (0.1)

The Expenses API allows you to manage accounting and expenses information.

Download OpenAPI description
Languages
Servers
Production
https://api.brex.com
Staging (Note: This is not a sandbox. It will not work with customer tokens.)
https://api-staging.brex.com

View and manage card expenses data.

Operations

Upload receipt and match automatically.

Operations
Operations

Request

List expenses under the same account. Admin and bookkeeper have access to any expense, and regular users can only access their own.

Security
OAuth2(Required scopes:
expenses.card.readonly
expenses.card
)
Query
expand[]Array of strings or null

Get additional details for the expense, e.g. merchant mcc code, by passing in expand[]=merchant. Query parameters include location, department, merchant, receipts.download_uris, user, budget and payment.

Example: expand[]= ?expand[]=merchant&expand[]=location
user_id[]Array of strings or null

Get expenses belong to provided user(s).

parent_expense_id[]Array of strings or null

Get itemized expenses belong to provided parent expenses ID(s).

budget_id[]Array of strings or null
spending_entity_id[]Array of strings or null
expense_type[]Array of strings or null(ExpenseType)
Enum"CARD""BILLPAY""REIMBURSEMENT""CLAWBACK""UNSET"
status[]Array of strings or null(ExpenseStatus)
Enum"DRAFT""SUBMITTED""APPROVED""OUT_OF_POLICY""VOID""CANCELED""SPLIT""SETTLED"
payment_status[]Array of strings or null(ExpensePaymentStatus)
Enum"NOT_STARTED""PROCESSING""CANCELED""DECLINED""CLEARED""REFUNDING""REFUNDED""CASH_ADVANCE""CREDITED""AWAITING_PAYMENT"
purchased_at_startstring or null(date-time)

Shows only expenses with a purchased_at on or after this date-time. This parameter is the date-time notation as defined by RFC 3339, section 5.6, e.g. 2022-11-12T23:59:59.999

Example: purchased_at_start= 2023-01-01T23:59:59.999
purchased_at_endstring or null(date-time)

Shows only expenses with a purchased_at on or before this date-time. This parameter is the date-time notation as defined by RFC 3339, section 5.6, e.g. 2022-11-12T23:59:59.999

Example: purchased_at_end= 2023-01-10T23:59:59.999
updated_at_startstring or null(date-time)

Shows only expenses with a updated_at on or after this date-time. This parameter is the date-time notation as defined by RFC 3339, section 5.6, e.g. 2022-11-12T23:59:59.999

Example: updated_at_start= 2023-01-01T23:59:59.999
updated_at_endstring or null(date-time)

Shows only expenses with a updated_at on or before this date-time. This parameter is the date-time notation as defined by RFC 3339, section 5.6, e.g. 2022-11-12T23:59:59.999

Example: updated_at_end= 2023-01-10T23:59:59.999
payment_posted_at_startstring or null(date-time)

Shows only expenses with a payment_posted_at on or after this date-time. This parameter is the date-time notation as defined by RFC 3339, section 5.6, e.g. 2022-11-12T23:59:59.999

Example: payment_posted_at_start= 2023-01-01T23:59:59.999
payment_posted_at_endstring or null(date-time)

Shows only expenses with a payment_posted_at on or before this date-time. This parameter is the date-time notation as defined by RFC 3339, section 5.6, e.g. 2022-11-12T23:59:59.999

Example: payment_posted_at_end= 2023-01-10T23:59:59.999
load_custom_fieldsboolean or null

Load custom fields for the expenses.

cursorstring or null

The cursor to use for pagination. This is the next_cursor value returned from the previous response.

limitinteger or null(int32)

Controls the maximum number of expenses returned in the response, can't be greater than 100

curl -i -X GET \
  https://api.brex.com/v1/expenses \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

List expenses response.

Bodyapplication/json
next_cursorstring or null
itemsArray of objects(ExpandableExpense)required
items[].​idstringrequired

Unique ID associated with the expense.

items[].​memostring or null

The memo of the expense.

items[].​location_idstring or null
items[].​locationobject or null

The location associated with the expense.

items[].​addressobject or null

Location

items[].​department_idstring or null
items[].​departmentobject or null

The department associated with the expense.

items[].​updated_atstring(date-time)required

The last time the expense was updated.

items[].​payment_posted_atstring or null(date-time)
items[].​categorystring or null

The category of expenses.

Enum"ADVERTISING_AND_MARKETING""GROCERY""TELEPHONY""OFFICE_SUPPLIES""PRIVATE_AIR_TRAVEL""CLOTHING""CAR_RENTAL""VEHICLE_EXPENSES""RESTAURANTS""GAMBLING"
items[].​merchant_idstring or null
items[].​merchantobject or null
items[].​receiptsArray of objects or null(Receipt)

A list of receipts associated with the expense.

items[].​budget_idstring or null
items[].​budgetobject or null
items[].​expense_typestring or null
Enum"CARD""BILLPAY""REIMBURSEMENT""CLAWBACK""UNSET"
items[].​original_amountobject or null

Money 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 of the currency indicated. For example, USD 7.00 will be represented in cents with an amount of 700.

items[].​billing_amountobject or null

Money 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 of the currency indicated. For example, USD 7.00 will be represented in cents with an amount of 700.

items[].​budget_amountobject or null

Money 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 of the currency indicated. For example, USD 7.00 will be represented in cents with an amount of 700.

items[].​purchased_amountobject or null

Money 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 of the currency indicated. For example, USD 7.00 will be represented in cents with an amount of 700.

items[].​usd_equivalent_amountobject or null

Money 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 of the currency indicated. For example, USD 7.00 will be represented in cents with an amount of 700.

items[].​purchased_atstring or null(date-time)

The time the purchase was made.

items[].​statusstring or null
Enum"DRAFT""SUBMITTED""APPROVED""OUT_OF_POLICY""VOID""CANCELED""SPLIT""SETTLED"
items[].​payment_statusstring or null
Enum"NOT_STARTED""PROCESSING""CANCELED""DECLINED""CLEARED""REFUNDING""REFUNDED""CASH_ADVANCE""CREDITED""AWAITING_PAYMENT"
items[].​user_idstring or null
items[].​userobject or null
items[].​paymentobject or null

The payment associated with the expense.

items[].​custom_fieldsArray of objects or null(CustomField)

A list of custom field values associated with the expense.

items[].​trip_idstring or null

The trip ID associated with the expense if it is a trip expense.

items[].​spending_entity_idstring or null

The spending entity ID associated with the expense.

items[].​spending_entityobject or null(Legal Entity)

A Brex legal entity.

items[].​billing_entity_idstring or null

ID of the legal entity responsible for billing the expense.

items[].​exported_atstring or null(date-time)

Timestamp when the expense was exported to the accounting system.

items[].​integration_spending_entity_idstring or null

ID of the spending entity in accounting.

items[].​integration_billing_entity_idstring or null

ID of the billing entity in accounting.

items[].​reviewobject or null

Review information for the expense, including compliance status and reviewer details.

items[].​repaymentobject or null

The repayment information for the expense, include the time the repayment is created and the user that created the repayment.

items[].​approved_atstring or null(date-time)

The time the expense is approved.

items[].​submitted_atstring or null(date-time)

The time the expense is submitted,

items[].​completion_datestring or null(date-time)

The time payment will be completed/is completed.

items[].​policyobject or null

The policy associated with the expense.

items[].​expense_line_itemsArray of objects or null(ExpandableExpense)

The expense line items. Limited to 100 items.

items[].​dashboard_urlstringrequired

URL to view the expense in the Brex dashboard.

Response
application/json
{ "next_cursor": "string", "items": [ {} ] }

Request

Get an expense by its ID.

Security
OAuth2(Required scopes:
expenses.card.readonly
expenses.card
)
Path
idstringrequired
Query
expand[]Array of strings or null

Get additional details for the expense, e.g. merchant mcc code, by passing in expand[]=merchant. Query parameters include location, department, merchant, receipts.download_uris, user, budget and payment.

Example: expand[]= ?expand[]=merchant&expand[]=location
load_custom_fieldsboolean or null

Load custom fields for the expense.

curl -i -X GET \
  'https://api.brex.com/v1/expenses/{id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Get an expense response.

Bodyapplication/json
idstringrequired

Unique ID associated with the expense.

memostring or null

The memo of the expense.

location_idstring or null
locationobject or null

The location associated with the expense.

addressobject or null

Location

department_idstring or null
departmentobject or null

The department associated with the expense.

updated_atstring(date-time)required

The last time the expense was updated.

payment_posted_atstring or null(date-time)
categorystring or null

The category of expenses.

Enum"ADVERTISING_AND_MARKETING""GROCERY""TELEPHONY""OFFICE_SUPPLIES""PRIVATE_AIR_TRAVEL""CLOTHING""CAR_RENTAL""VEHICLE_EXPENSES""RESTAURANTS""GAMBLING"
merchant_idstring or null
merchantobject or null
receiptsArray of objects or null(Receipt)

A list of receipts associated with the expense.

budget_idstring or null
budgetobject or null
expense_typestring or null
Enum"CARD""BILLPAY""REIMBURSEMENT""CLAWBACK""UNSET"
original_amountobject or null

Money 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 of the currency indicated. For example, USD 7.00 will be represented in cents with an amount of 700.

billing_amountobject or null

Money 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 of the currency indicated. For example, USD 7.00 will be represented in cents with an amount of 700.

budget_amountobject or null

Money 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 of the currency indicated. For example, USD 7.00 will be represented in cents with an amount of 700.

purchased_amountobject or null

Money 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 of the currency indicated. For example, USD 7.00 will be represented in cents with an amount of 700.

usd_equivalent_amountobject or null

Money 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 of the currency indicated. For example, USD 7.00 will be represented in cents with an amount of 700.

purchased_atstring or null(date-time)

The time the purchase was made.

statusstring or null
Enum"DRAFT""SUBMITTED""APPROVED""OUT_OF_POLICY""VOID""CANCELED""SPLIT""SETTLED"
payment_statusstring or null
Enum"NOT_STARTED""PROCESSING""CANCELED""DECLINED""CLEARED""REFUNDING""REFUNDED""CASH_ADVANCE""CREDITED""AWAITING_PAYMENT"
user_idstring or null
userobject or null
paymentobject or null

The payment associated with the expense.

custom_fieldsArray of objects or null(CustomField)

A list of custom field values associated with the expense.

trip_idstring or null

The trip ID associated with the expense if it is a trip expense.

spending_entity_idstring or null

The spending entity ID associated with the expense.

spending_entityobject or null(Legal Entity)

A Brex legal entity.

billing_entity_idstring or null

ID of the legal entity responsible for billing the expense.

exported_atstring or null(date-time)

Timestamp when the expense was exported to the accounting system.

integration_spending_entity_idstring or null

ID of the spending entity in accounting.

integration_billing_entity_idstring or null

ID of the billing entity in accounting.

reviewobject or null

Review information for the expense, including compliance status and reviewer details.

repaymentobject or null

The repayment information for the expense, include the time the repayment is created and the user that created the repayment.

approved_atstring or null(date-time)

The time the expense is approved.

submitted_atstring or null(date-time)

The time the expense is submitted,

completion_datestring or null(date-time)

The time payment will be completed/is completed.

policyobject or null

The policy associated with the expense.

expense_line_itemsArray of objects or null(ExpandableExpense)

The expense line items. Limited to 100 items.

dashboard_urlstringrequired

URL to view the expense in the Brex dashboard.

Response
application/json
{ "id": "string", "memo": "string", "location_id": "string", "location": { "id": "string", "name": "string" }, "address": { "country": "string", "state": "string", "city": "string", "postal_code": "string", "timezone": "string", "coordinates": {}, "line1": "string", "line2": "string" }, "department_id": "string", "department": { "id": "string", "name": "string" }, "updated_at": "2019-08-24T14:15:22Z", "payment_posted_at": "2019-08-24T14:15:22Z", "category": "ADVERTISING_AND_MARKETING", "merchant_id": "string", "merchant": { "raw_descriptor": "string", "mcc": "string", "country": "string" }, "receipts": [ {} ], "budget_id": "string", "budget": { "id": "string", "name": "string" }, "expense_type": "CARD", "original_amount": { "amount": 700, "currency": "USD" }, "billing_amount": { "amount": 700, "currency": "USD" }, "budget_amount": { "amount": 700, "currency": "USD" }, "purchased_amount": { "amount": 700, "currency": "USD" }, "usd_equivalent_amount": { "amount": 700, "currency": "USD" }, "purchased_at": "2019-08-24T14:15:22Z", "status": "DRAFT", "payment_status": "NOT_STARTED", "user_id": "string", "user": { "id": "string", "first_name": "string", "last_name": "string", "department_id": "string", "location_id": "string" }, "payment": { "id": "string", "paymentInstrument": {}, "statusReason": "OTHER" }, "custom_fields": [ {} ], "trip_id": "string", "spending_entity_id": "string", "spending_entity": { "id": "string", "display_name": "string", "billing_address": {}, "created_at": "2019-08-24T14:15:22Z", "status": "UNSUBMITTED", "is_default": true }, "billing_entity_id": "string", "exported_at": "2019-08-24T14:15:22Z", "integration_spending_entity_id": "string", "integration_billing_entity_id": "string", "review": { "compliance_status": "string", "approval_steps": [] }, "repayment": { "repayment_initiated_by": {}, "repayment_initiation_date": "2019-08-24T14:15:22Z" }, "approved_at": "2019-08-24T14:15:22Z", "submitted_at": "2019-08-24T14:15:22Z", "completion_date": "2019-08-24T14:15:22Z", "policy": { "id": "string", "name": "string" }, "expense_line_items": [ {} ], "dashboard_url": "string" }
Operations