Atualizar status
Request
ENDPOINT
/prepaid/card/CARD_KEYMÉTODO
PATCHPath params
| Campo | Tipo | Descrição | Caracteres |
|---|---|---|---|
CARD_KEY * | string | Chave de identificação do cartão. | uuid |
Request Body
{
"status": "blocked"
}
Body params
| Campo | Tipo | Descrição | Caracteres |
|---|---|---|---|
status * | string | Status do cartão. | Enumeradores |
Enumeradores card_status
| Enumerador | Tradução | Tipo |
|---|---|---|
| created | Criação solicitada | Initial |
| building | Em construção | Initial |
| active | Apto a transacionar | Active |
| embossing | Em produção | Temporary block |
| blocked | Bloqueado | Temporary block |
| warning | Com suspeita | Temporary block |
| pending | Pendente | Temporary block |
| lost | Perdido | Terminated |
| robbed | Roubado | Terminated |
| fraud | Fraudado | Terminated |
| canceled | Cancelado | Terminated |
| theft | Furtado | Terminated |
Erros
STATUS
4XX Response Body
{
"title": "Not Acceptable",
"description": "The operation is not valid for the current status of the card [canceled]",
"translation": "Unable to transition",
"code": "CARD000014"
}
| Code | Status code | Descrição |
|---|---|---|
| QIT000001 | 400 | Invalid Json schema. |
| CARD000011 | 404 | It was not possible to fetch the Card for the card_key {card_key}. |
| CARD000013 | 406 | Unable to transition from {old_status} to {new_status}. |
| CARD000014 | 406 | The operation is not valid for the current status of the card [{card_status}]. |
| CARD000015 | 400 | We're sorry, but the card could not be update. Please try again later |
Webhook
WEBHOOK_TYPE
baas.prepaid_card.cardWebhook Body
{
"webhook_type": "baas.prepaid_card.card",
"event_datetime": "2023-07-25T12:00:00.000Z",
"data": {
"card_key": "9bd93e97-bb6d-410f-8981-06b2765f12a1",
"type": "virtual",
"status": "active",
"old_status": "created"
}
}