curl --request PATCH \
--url https://api.sandbox.lead.bank/v0/cards/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"metadata": {
"cost_center": "1234"
}
}
'{
"id": "card_xyz123",
"client_card_id": "<string>",
"account_id": "account_xyz123",
"entity_id": "entity_xyz123",
"status": "active",
"status_reason": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"details": {
"card_product_name": "<string>",
"is_virtual": true,
"card_type": "hsa",
"expiry_date": "2023-12-25",
"last_four": "1234",
"replacement_for": "card_xyz123",
"closed_at": "2023-11-07T05:31:56Z"
},
"metadata": {}
}Cards
Update a Card
Beta: This endpoint is in beta and may change before general availability.
Updates mutable attributes of a card. This is a partial update: only the
fields present in the request body are changed; omitted fields are left
unchanged. Card status is system-managed and changes through the
status-transition endpoints, not this endpoint.
Idempotency
The Idempotency-Key header is required. Reusing a key with a different request body will return a 422 error.
PATCH
/
v0
/
cards
/
{id}
curl --request PATCH \
--url https://api.sandbox.lead.bank/v0/cards/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"metadata": {
"cost_center": "1234"
}
}
'{
"id": "card_xyz123",
"client_card_id": "<string>",
"account_id": "account_xyz123",
"entity_id": "entity_xyz123",
"status": "active",
"status_reason": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"details": {
"card_product_name": "<string>",
"is_virtual": true,
"card_type": "hsa",
"expiry_date": "2023-12-25",
"last_four": "1234",
"replacement_for": "card_xyz123",
"closed_at": "2023-11-07T05:31:56Z"
},
"metadata": {}
}Authorizations
Headers
Path Parameters
Body
application/json
Request body for updating a card. This is a partial update: every field is
optional and only the fields present are changed. Card status is
system-managed (see the status-transition endpoints) and cannot be set here.
Response
Card updated successfully.
A card object
Was this page helpful?

