> For the complete documentation index, see [llms.txt](https://docs.udara360.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.udara360.io/udara360-docs-1/cards/providus/blockunblockcard.md).

# BlockUnblockCard

The "BlockUnblockCard" endpoint allows customers to change a card's status between blocked and unblocked, useful for temporarily restricting a card (e.g. if reported lost) or restoring it to active use.

<mark style="color:blue;">`PUT`</mark> `/api/Card/v{{version}}/Providus/BlockUnblockCard`

To update a card's status, provide the `cardId` of the card along with the `status` to set it to `1` to block the card, `2` to unblock it.

**Headers**

| Name                                           | Value              |
| ---------------------------------------------- | ------------------ |
| Content-Type<mark style="color:red;">\*</mark> | `application/json` |
| Request-Reference                              | `unique_string`    |

**Body**

<table><thead><tr><th>Name</th><th>Data Type</th><th data-type="checkbox">Required/Optional</th><th>Description</th></tr></thead><tbody><tr><td><code>cardId</code></td><td>string</td><td>true</td><td>The <code>cardId</code> field from the SearchCards endpoint response.</td></tr><tr><td><code>status</code></td><td>Enum (Block = 1, Unblock = 2)</td><td>true</td><td>The status to set the card to.</td></tr></tbody></table>

Here is an example request and response with a sample payload sent to the endpoint in Curl format.

<details>

<summary>Sample Request</summary>

```json
curl --location -g --request PUT '{{baseUrl}}/api/Card/v{{version}}/Providus/SetCardPIN' \
--header 'Content-Type: application/json' \
--data '{
  //"cardRecordId": "b6adc86a-750d-436a-9625-b35400c5ed58" //Id field in the SearchCards endpoint response
  "cardId":"76b0c321-9376-4bde-b4e6-f4740189ed40", //cardId field in the SearchCards endpoint response
  "status": 1 //Block = 1, Unblock = 2
}'
```

</details>

<details>

<summary>Response: <code>200</code></summary>

```json
{
  "status": true,
  "message": "Request successful",
  "data": {
    "responseCode": "00",
    "responseMessage": "Card successfully blocked"
  }
}
```

</details>
