# API Set Active Card Policy

**Endpoint: PUT /v2/vc/virtual-card-policies/{requestId}/set-active**

**Description: Set the active status of a specific virtual card policy by its ID.**

### Request

**Request Body Field Descriptions (JSON)**

| Field Name | Type    | Required | Description                                                  |
| ---------- | ------- | -------- | ------------------------------------------------------------ |
| isActive   | boolean | Yes      | Set to `true` to activate, `false` to deactivate the policy. |

**Request sample**

```json
{
  "isActive": true
}
```

#### Response

**Response Field Descriptions**

| Field Name        | Type    | Description                      |
| ----------------- | ------- | -------------------------------- |
| code              | number  | Response code                    |
| state             | number  | State of the response            |
| data.requestId    | string  | Unique request identifier        |
| data.merchantCode | string  | Merchant code                    |
| data.name         | string  | Name of the policy               |
| data.isActive     | boolean | Whether the policy is active     |
| data.createdBy    | string  | Creator's email                  |
| data.createdAt    | string  | Creation timestamp (ISO 8601)    |
| data.updatedAt    | string  | Last update timestamp (ISO 8601) |
| message           | string  | Response message                 |
| neoResponseId     | string  | Unique Neo response identifier   |

**Response sample**

```json
{
  "code": 1,
  "state": 2,
  "data": {
    "requestId": "e424ae34-5c56-45c8-882e-98c4325981d3",
    "merchantCode": "COLRLC",
    "name": "Synchronised reciprocal open architecture",
    "isActive": true,
    "createdBy": "sony@gmail.com",
    "createdAt": "2025-06-04T09:34:25.959Z",
    "updatedAt": "2025-06-05T01:58:03.365Z"
  },
  "message": "Successful",
  "neoResponseId": "48589ad9-009b-4ac9-af10-d7680ea83ca6"
}
```

### Example cURL

```bash
curl -X PUT "https://{base_url_openapi}/v2/vc/virtual-card-policies/{requestId}/set-active" \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -H "Accept-Language: en" \
  -d '{
    "isActive": true
  }'
```

#### Notes

* Requires Bearer token in the Authorization header.
* The Accept-Language header can be used to specify the response language (Support: "vi", "en").
* Replace `{requestId}` with the actual policy request ID.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.neox.vn/docs/global/virtual-card/virtual-card-policies/set-active-virtual-card-policy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
