# Update Customer Status

## updateStatus

<mark style="color:green;">`POST`</mark> `https://dcams.app/v3/stable/api/storage`

This endpoint allows you to update the status of a customer account already registered in the system.

#### Request Body

| Name                                      | Type   | Description                                |
| ----------------------------------------- | ------ | ------------------------------------------ |
| user<mark style="color:red;">\*</mark>    | string | Your Veratad API Username                  |
| pass<mark style="color:red;">\*</mark>    | string | Your Veratad API Password                  |
| service<mark style="color:red;">\*</mark> | string | The service name "getStatus"               |
| target                                    | object | The target of the query                    |
| email                                     | string | The user's email address for status lookup |
| status                                    | string | The status for update                      |

{% tabs %}
{% tab title="200 The customer was found" %}

```javascript
{
    "result": "Success",
    "reference": "888888812",
    "target": {
        "fn": "John",
        "ln": "Smith",
        "addr": "123 Main St",
        "city": "Stratford",
        "state": "CT",
        "zip": "06614",
        "dob": "19700101",
        "email": "test@veratad.com",
        "phone": "2015106000",
        "status": "PASS"
    }
}
```

{% endtab %}

{% tab title="400 The email was not a valid email address" %}

```javascript
{
    "result": "Error",
    "message": "The email address is invalid"
}

//or

{
    "result": "Error",
    "message": "Missing a required input"
}
```

{% endtab %}

{% tab title="401 Either a bad username or password" %}

```javascript
{
    "result": "Error",
    "message": "Either your username or password is incorrect"
}
```

{% endtab %}

{% tab title="404 The customer was not found" %}

```javascript
{
    "result": "Error",
    "message": "The email address was not found"
}
```

{% endtab %}
{% endtabs %}

## Sample Request Body

```javascript
{
"user": "USERNAME",
"pass": "PASSWORD",
"service": "updateStatus",
"target": {
    "email": "test@veratad.com", 
    "status": "PASS"
    }
}
```

## Request Fields

| attribute | values                                                                      |
| --------- | --------------------------------------------------------------------------- |
| status    | <p><code>PASS</code></p><p><code>PENDING</code></p><p><code>FAIL</code></p> |

## Response Fields

{% hint style="info" %}
The response will include all of the target attributes stored within the system for this user and the following varying fields.
{% endhint %}

| attribute | values                                                                      |
| --------- | --------------------------------------------------------------------------- |
| result    | <p><code>Success</code></p><p><code>Error</code></p>                        |
| status    | <p><code>PASS</code></p><p><code>PENDING</code></p><p><code>FAIL</code></p> |
