# Volumes

## Listar volumes

<mark style="color:blue;">`GET`</mark> `https://services.cliqueretire.com.br/ebox/api/v1/volumes`

Listar volumes cadastrados

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-Type | string | application/json |
| api-id       | string |                  |
| api-key      | string | appllication/    |

{% tabs %}
{% tab title="200 Lista de volumes" %}

```
{    
    "page": 0,
    "maxCount": 10,
    "totalPage": 1,
    "totalCount": 1,
    "resultList": [
        {
            "id": "ba3678c1-b313-4b62-9a91-cc5933c5145c",
            "expressNumber": "CODE",
            "orderNumber": "CODE",
            "status": "EBOX_STORED ",
            "lastModifiedTime": 1591030157347,
            "expressType": "Delivery",
            "accessCode": "CODE",
            "shortLink": "http://cr2.me/CODE",
            "storeUser": {
                "storeBy": "ISENT",
                "storeUserId": "d37c7a23-32a5-467c-a069-d6a0076b772e",
                "storeUserPhone": "+55 21 99999-9999"
            },
            "box": {
                "name": "Posto Suburbano",
                "boxCode": "CR0078",
                "type": "M"
            },
            "endCustomer ": {
                "celPhone": "5521999999999",
                "email": "barack.obama@gmail.com",
                "fullName": "5521999999999"
            },
            "storeTime": "2020-06-01T13:49:00-03:00",
            "takeTime": null,
            "overdueTime": "2020-06-04T23:00:00-03:00",
            "createTime": 1590751945000,
            "logisticsCompany": {
                "id": "ab0e7975-e65f-483b-a868-9195ec179182",
                "name": "FEDEX Entregas"
            },
            "importUser": {
                "name": "Clique Retire API",
                "id": "8a7ee4856e66988c016e8f26436f05fe",
                "loginName": "cliqueRetireApi"
            },
            "overdueFlag": false
        }
    ]
}
```

{% endtab %}

{% tab title="401 api-id ou api-key incorretos" %}

```
{
    "message": "Unauthorized"
}
```

{% endtab %}
{% endtabs %}

## Obter Volume pelo expressNumber (Etiqueta)

<mark style="color:blue;">`GET`</mark> `https://services.cliqueretire.com.br/ebox/api/v1/volumes_by_expressNumber/:expressNumber`

Busca informações de um volume utilizando o código da etiqueta

#### Path Parameters

| Name          | Type   | Description                  |
| ------------- | ------ | ---------------------------- |
| expressNumber | string | Código da etiqueta do pacote |

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-Type | string | application/json |
| api-id       | string |                  |
| api-key      | string |                  |

{% tabs %}
{% tab title="200 Informações do volume" %}

```
{
    "id": "ba3678c1-b313-4b62-9a91-cc5933c5145c",
    "expressNumber": "CODE",
    "orderNumber": "CODE",
    "status": "EBOX_STORED ",
    "lastModifiedTime": 1591030157347,
    "expressType": "Delivery",
    "accessCode": "CODE",
    "shortLink": "http://cr2.me/CODE",
    "storeUser": {
        "storeBy": "ISENT",
        "storeUserId": "d37c7a23-32a5-467c-a069-d6a0076b772e",
        "storeUserPhone": "+55 21 99999-9999"
    },
    "box": {
        "name": "Posto Suburbano",
        "boxCode": "CR0078",
        "type": "M"
    },
    "endCustomer ": {
        "celPhone": "5521999999999",
        "email": "barack.obama@gmail.com",
        "fullName": "5521999999999"
    },
    "storeTime": "2020-06-01T13:49:00-03:00",
    "takeTime": null,
    "overdueTime": "2020-06-04T23:00:00-03:00",
    "createTime": 1590751945000,
    "logisticsCompany": {
        "id": "ab0e7975-e65f-483b-a868-9195ec179182",
        "name": "FEDEX Entregas"
    },
    "importUser": {
        "name": "Clique Retire API",
        "id": "8a7ee4856e66988c016e8f26436f05fe",
        "loginName": "cliqueRetireApi"
    },
    "overdueFlag": false
}
```

{% endtab %}

{% tab title="401 api-id ou api-key incorretos" %}

```
{
    "message": "Unauthorized"
}
```

{% endtab %}

{% tab title="404 Volume não encontrado no sistema" %}

```
"Volume not found"
```

{% endtab %}
{% endtabs %}

## Cancelar volume

<mark style="color:red;">`DELETE`</mark> `https://services.cliqueretire.com.br/ebox/api/v1/volumes`

Cancela um volume através de seu expressNumber

#### Path Parameters

| Name          | Type   | Description                  |
| ------------- | ------ | ---------------------------- |
| expressNumber | string | Código da etiqueta do pacote |

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-Type | string | application/json |
| api-id       | string |                  |
| api-key      | string |                  |

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

```
```

{% endtab %}

{% tab title="401 api-id ou api-key incorretos" %}

```
{
    "message": "Unauthorized"
}
```

{% endtab %}

{% tab title="404 Volume não encontrado" %}

```
{
    "errorMessage": "Express not found",
    "reference": "offline_awsRequestId_ckaws7oed000n64spfm99cwf2"
}
```

{% endtab %}
{% endtabs %}
