# Visa Consumer Authentication Service

## VCAS-CardStatus-API

APIs for managing Card Status information in VCAS product.

### Upsert Card Status  v1 - Latest

Upsert the card status

#### Request

##### Request Body schema: application/json

Card status upsert request

Array

|     |     |
| --- | --- |
| accountNumber | string \[ 13 .. 19 \] characters ^\[0-9\]\*$<br>Primary account number (PAN) is the key identifier for the cardholder's account.<br>Example: "1234567890123456" |
| orgUnitId | string 24 characters ^\[a-zA-Z0-9\]\*$<br>Unique ID given to each issuer<br>Example: "55555551dd3648c5b814d2ed" |
| status | any<br>Enum:"ACTIVE" "BLOCKED" "BYPASS" "FORCED_CHALLENGE" "TIMED_BLOCK" |
| statusDuration | string^(\\d+)(\[mhdwy\])$<br>Status will be maintained for the given duration and then it will be ACTIVE<br>Example: "15m" |

#### Responses

**200**  
Added/Updated the card status record

##### Response Schema: application/json

Array

|     |     |
| --- | --- |
| responseCode<br>required | any<br>Service response code 0 - Success; 10 - Invalid OrgUnitID; 11 - Invalid PAN; 20 - Forbidden; 30 - Not found; 40 - System error<br>Example: "0" |
| responseMessage<br>required | any<br>Service response text specific for CRUD operations<br>Example: "Successfully Processed" |
| errorDetail | any<br>Detailed error message in case of error response<br>Example: "null" |

**400**  
Incomplete or invalid request information

##### Response Schema: application/json

|     |     |
| --- | --- |
| responseCode<br>required | any<br>Service response code 0 - Success; 10 - Invalid OrgUnitID; 11 - Invalid PAN; 20 - Forbidden; 30 - Not found; 40 - System error<br>Example: "10" |
| responseMessage<br>required | any<br>Service response text specific for CRUD operations<br>Example: "Invalid OrgUnitID" |
| errorDetail | any<br>Detailed error message in case of error response<br>Example: "null" |

**401**  
Access denied

##### Response Schema: application/json

|     |     |
| --- | --- |
| responseCode<br>required | any<br>Service response code 0 - Success; 10 - Invalid OrgUnitID; 11 - Invalid PAN; 20 - Forbidden; 30 - Not found; 40 - System error<br>Example: "20" |
| responseMessage<br>required | any<br>Service response text specific for CRUD operations<br>Example: "Forbidden access to the account information" |
| errorDetail | any<br>Detailed error message in case of error response<br>Example: "null" |

**404**  
Account information not found

##### Response Schema: application/json

|     |     |
| --- | --- |
| responseCode<br>required | any<br>Service response code 0 - Success; 10 - Invalid OrgUnitID; 11 - Invalid PAN; 20 - Forbidden; 30 - Not found; 40 - System error<br>Example: "30" |
| responseMessage<br>required | any<br>Service response text specific for CRUD operations<br>Example: "Account details not found" |
| errorDetail | any<br>Detailed error message in case of error response<br>Example: "null" |

**500**  
Error while processing the request

##### Response Schema: application/json

|     |     |
| --- | --- |
| responseCode<br>required | any<br>Service response code 0 - Success; 10 - Invalid OrgUnitID; 11 - Invalid PAN; 20 - Forbidden; 30 - Not found; 40 - System error<br>Example: "40" |
| responseMessage<br>required | any<br>Service response text specific for CRUD operations<br>Example: "Error while processing the request" |
| errorDetail | any<br>Detailed error message in case of error response<br>Example: "null" |

---

### Request samples

- Payload

application/json

```json
[{"status": "ACTIVE",
"orgUnitId": "55555551dd3648c5b814d2ed",
"accountNumber": "1234567890123456",
"statusDuration": "15m"
}]
```

### Response samples

- **200**
- **400**
- **401**
- **404**
- **500**

application/json

```json
[nul]
```
