> 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/interswitch/updatecardstatus.md).

# UpdateCardStatus

To change the status of a card record, you can send a `PUT` request to the following endpoint:

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

The request body should contain the `cardId` of the card record, along with the new `status` to move it to, and an optional `reason` explaining the change.

This endpoint streamlines the process of managing a card's lifecycle, offering a single call to block, unblock, hotlist, or activate a card as needed.

{% hint style="info" %}
This endpoint can be used for card activation, among other status changes.
{% endhint %}

**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</th><th>Description</th></tr></thead><tbody><tr><td><code>cardId</code></td><td>string</td><td>true</td><td>Id of the card record.</td></tr><tr><td><code>status</code></td><td>string</td><td>true</td><td>Status to update the card to.</td></tr><tr><td><code>reason</code></td><td>string</td><td>false</td><td>Reason for updating the card status.</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}}/Interswitch/UpdateCardStatus' \
--header 'Content-Type: application/json' \
--data '{
  "cardId": "5099f14c-b963-4919-95a4-104a42eeedd8",
  "status": 4, //Block = 1, Unblock = 2, Hotlist = 3, Activate = 4
  "reason": "Card Activation"
}'
```

</details>

<details>

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

```json
{
  "status": true,
  "message": "Operation Successful"
}
```

</details>
