The Fields API allows you to manage fields and field values information. The Fields API is currently in Beta and is available for use. Customers do not need to explicitly opt-in to Beta. However, the API is subject to changes as per the expectations set regarding Beta APIs in the API Launch Stages documentation: https://developer.brex.com/docs/api-launch-stages/.
- Update custom field values
Fields API (1.0.0-beta)
Field value Brex identifier(s) to filter by
Field value remote identifier(s) to filter by
The cursor to use for pagination. This is the next_cursor value returned from the previous response.
Controls the maximum number of field values returned in the response. It can't be greater than 1000.
- Productionhttps://api.brex.com/v1/fields/{field_id}/values
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v1/fields/{field_id}/values
- curl
- JavaScript
- Node.js
- Python
curl -i -X GET \
https://api.brex.com/v1/fields/extended_field_foobar/values \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'List custom field values response
Remote/external ID of custom field value from external system (e.g. ERP or HRIS system)
The value ID or code of the field value; Usually it is a unique identifier for the custom field value in the remote system
The ID of the parent field this value belongs to
{ "next_cursor": "string", "items": [ { … } ] }
- Productionhttps://api.brex.com/v1/fields/{field_id}/values
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v1/fields/{field_id}/values
- curl
- JavaScript
- Node.js
- Python
curl -i -X PUT \
https://api.brex.com/v1/fields/extended_field_foobar/values \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"items": [
{
"brex_id": "efo_foobar",
"data": {
"value": "string",
"is_disabled": true
}
}
]
}'Update custom field value list response
The list of updated field values
Remote/external ID of custom field value from external system (e.g. ERP or HRIS system)
The value ID or code of the field value; Usually it is a unique identifier for the custom field value in the remote system
The ID of the parent field this value belongs to
{ "items": [ { … } ] }
The list of field values to be created
The value ID or code of the field value; Usually it is a unique identifier for the custom field value in the remote system
Remote/external ID of custom field value from external system (e.g. ERP or HRIS system)
- Productionhttps://api.brex.com/v1/fields/{field_id}/values
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v1/fields/{field_id}/values
- curl
- JavaScript
- Node.js
- Python
curl -i -X POST \
https://api.brex.com/v1/fields/extended_field_foobar/values \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: string' \
-d '{
"items": [
{
"value": "string",
"value_id": "FooBar",
"remote_id": "foo_bar",
"is_disabled": true
}
]
}'Create custom field values response
The list of created field values
Remote/external ID of custom field value from external system (e.g. ERP or HRIS system)
The value ID or code of the field value; Usually it is a unique identifier for the custom field value in the remote system
The ID of the parent field this value belongs to
{ "items": [ { … } ] }
- Productionhttps://api.brex.com/v1/fields/{field_id}/values
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v1/fields/{field_id}/values
- curl
- JavaScript
- Node.js
- Python
curl -i -X DELETE \
https://api.brex.com/v1/fields/extended_field_foobar/values \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"items": [
{
"brex_id": "efo_foobar"
}
]
}'{}
- Productionhttps://api.brex.com/v1/fields/{field_id}/values/{brex_id}
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v1/fields/{field_id}/values/{brex_id}
- curl
- JavaScript
- Node.js
- Python
curl -i -X GET \
https://api.brex.com/v1/fields/extended_field_foobar/values/efo_foobar \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Get a field value response
Remote/external ID of custom field value from external system (e.g. ERP or HRIS system)
The value ID or code of the field value; Usually it is a unique identifier for the custom field value in the remote system
The ID of the parent field this value belongs to
{ "brex_id": "efo_foobar", "remote_id": "foo_bar", "value_id": "foo_bar", "value": "string", "field_id": "extended_field_foobar", "updated_at": "2019-08-24T14:15:22Z", "is_disabled": true }