The Expenses API allows you to manage accounting and expenses information.
Expenses API (0.1)
Request
Update an expense. Admin and bookkeeper have access to any expense, and regular users can only access their own.
- Productionhttps://api.brex.com/v1/expenses/card/{expense_id}
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v1/expenses/card/{expense_id}
- curl
- JavaScript
- Node.js
- Python
- Ruby
- Java
curl -i -X PUT \
'https://api.brex.com/v1/expenses/card/{expense_id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"memo": "string"
}'Update an expense response.
The category of expenses.
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.
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.
{ "id": "string", "memo": "string", "location_id": "string", "department_id": "string", "updated_at": "2019-08-24T14:15:22Z", "category": "ADVERTISING_AND_MARKETING", "merchant_id": "string", "budget_id": "string", "original_amount": { "amount": 700, "currency": "USD" }, "billing_amount": { "amount": 700, "currency": "USD" }, "purchased_at": "2019-08-24T14:15:22Z", "status": "DRAFT", "payment_status": "NOT_STARTED" }
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.
Get itemized expenses belong to provided parent expenses ID(s).
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
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
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
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
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
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
The cursor to use for pagination. This is the next_cursor value returned from the previous response.
- Productionhttps://api.brex.com/v1/expenses/card
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v1/expenses/card
- curl
- JavaScript
- Node.js
- Python
- Ruby
- Java
curl -i -X GET \
https://api.brex.com/v1/expenses/card \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'List expenses response.
The category of expenses.
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.
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.
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.
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.
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.
A list of custom field values associated with the expense.
Timestamp when the expense was exported to the accounting system.
Review information for the expense, including compliance status and reviewer details.
The repayment information for the expense, include the time the repayment is created and the user that created the repayment.
The expense line items. Limited to 100 items.
{ "next_cursor": "string", "items": [ { … } ] }
Request
This endpoint is deprecated. Use the "Get an expense" (GET /v1/expenses/{id}) endpoint instead.
- Productionhttps://api.brex.com/v1/expenses/card/{expense_id}
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v1/expenses/card/{expense_id}
- curl
- JavaScript
- Node.js
- Python
- Ruby
- Java
curl -i -X GET \
'https://api.brex.com/v1/expenses/card/{expense_id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Get an expense response.
The category of expenses.
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.
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.
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.
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.
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.
A list of custom field values associated with the expense.
Timestamp when the expense was exported to the accounting system.
Review information for the expense, including compliance status and reviewer details.
The repayment information for the expense, include the time the repayment is created and the user that created the repayment.
The expense line items. Limited to 100 items.
{ "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" }