Skip to content

Preview or apply many Brex card mappings at once

POST/api/v1/brex/cards/mapping/bulk

Map several cards, or every card of a cardholder, to credit lines.

Request Body:

  • items: each names the card (brex_card_id, last_four, or card_holder_name for all of that holder's cards) and the line (credit_line_id, or line_ref matched exactly)
  • apply: false previews; true maps, and only when every row resolves

Note: same access rule as mapping one card: on a live business a signed-in operator, or an API token minted with the credit:mapping scope.

Operation ID: bulk_map_brex_cards·View as markdown·OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Request body

itemsarray · BrexBulkMapItemrequiredBrexBulkMapItem
6 fields
rowinteger

The row number to report back (file row for CSV).

brex_card_idstring
last_fourstring

The card's last 4; must identify exactly one card.

card_holder_namestring

Alone: every card this cardholder owns. With last_four: narrows it.

credit_line_idstring
line_refstring

The line's external line id, external merchant id or merchant name, matched exactly (case aside); it must name exactly one line.

applyboolean

false previews; true maps, only when every row resolves.

Responses

201Successful Response

successboolean
messagestring
codestring
dataBrexBulkMapResponse

400Bad Request - Invalid input

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

401Unauthorized - Missing or expired token, an MCP OAuth token used against the REST API, or no access to this business

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

403Forbidden - Insufficient permissions

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

422Validation Error

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.