# Change Visit Status

## Allow a Visit

<mark style="color:purple;">`PATCH`</mark> `https://api.w3lcome.com/v1/visit/allow/:id`

This endpoint allows you to allow a visit entrance

#### Path Parameters

| Name | Type   | Description     |
| ---- | ------ | --------------- |
| id   | string | ID of the visit |

#### Headers

| Name           | Type   | Description      |
| -------------- | ------ | ---------------- |
| Content-Type   | string | application/JSON |
| Authentication | string | Basic `token`    |

{% tabs %}
{% tab title="200 Success" %}

```javascript
{
    "id": "43d2895a-6785-4442-b065-d4c80d7825c8",
    "checkinAt": "2019-07-09T08:02:17-03:00",
    "isInsideCompany": true,
    "type": "visit",
    "name": "Alisson Enz",
    "host": {
        "id": "b98ff2895de825dec050af67d57a23e1",
        "name": "Gabriel Gratival",
        "email": "gabriel@w3lcome.com",
        "type": "host",
    },
    "pictureUrl": "https://firebasestorage.googleapis.com/v0/b/w3lcome-cbcbb.appspot.com/o/AlissonEnz.jpg?alt=media&token=e2f80260-fc3e-417d-b3ad-572513cf8e18",
    "phone": "(43) 9 9982-0420",
    "email": "alisson@w3lcome.com",
    "authorizationStatus": "allowed"
}
```

{% endtab %}

{% tab title="404 Error" %}

```javascript
{
    "type": "NOT_FOUND"
}
```

{% endtab %}
{% endtabs %}

## Deny a Visit

<mark style="color:purple;">`PATCH`</mark> `https://api.w3lcome.com/v1/visit/deny/:id`

This endpoint allows you to deny a visit entrance

#### Path Parameters

| Name | Type   | Description     |
| ---- | ------ | --------------- |
| id   | string | ID of the visit |

#### Headers

| Name           | Type   | Description      |
| -------------- | ------ | ---------------- |
| Content-Type   | string | application/json |
| Authentication | string | Basic `token`    |

{% tabs %}
{% tab title="200 Success" %}

```javascript
{
    "id": "43d2895a-6785-4442-b065-d4c80d7825c8",
    "checkinAt": "2019-07-09T08:02:17-03:00",
    "isInsideCompany": true,
    "type": "visit",
    "name": "Alisson Enz",
    "host": {
        "id": "b98ff2895de825dec050af67d57a23e1",
        "name": "Gabriel Gratival",
        "email": "gabriel@w3lcome.com",
        "type": "host",
    },
    "pictureUrl": "https://firebasestorage.googleapis.com/v0/b/w3lcome-cbcbb.appspot.com/o/AlissonEnz.jpg?alt=media&token=e2f80260-fc3e-417d-b3ad-572513cf8e18",
    "phone": "(43) 9 9982-0420",
    "email": "alisson@w3lcome.com",
    "authorizationStatus": "denied"
}
```

{% endtab %}

{% tab title="404 Error" %}

```javascript
{
    "type": "NOT_FOUND"
}
```

{% endtab %}
{% endtabs %}
