---
# System prepended metadata

title: API Vasp Expresso Parte 1

---

# API Vasp Expresso Parte 1
# Registo de alterações
| Data | Autor | Descrição | Versão API |
|--|--|--|--|
| 2021-10-14 | Francisco Lacerda | Versão Inicial | 1.0 |

# Endpoints
|Ambiente|Endpoint|
|-|-|
|PROD|https://vaspapirest.vaspexpresso.pt|
|QUA|http://vaspapirest-qua.vaspexpresso.pt|

# Autenticação
O acesso à API é feito usando autenticação JWT (JSON Web Token).
## Obter token
### Input
:::info
`POST /Token`
|Campo|Obrigatório|
|-|-|
|username|Sim|
|password|Sim|
|grant_type|Sim|
:::
### Output
:::success
**OK : 200**
Autenticação bem sucedida.

|Campo|Descrição|Tipo|
|-|-|-|
|access_token|Token de acesso|string|
|token_type|Tipo do token `(bearer)`|string|
|expires_in|Data em unix|int|
:::
:::warning
**Unauthorized : 401**
Credenciais incorrectas
:::
### Como gerar um pedido de teste no POSTMAN

1. Cópiar o código de exemplo cURL.

```curl=
curl --location --request POST 'https://vaspapirest.vaspexpresso.pt/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'username=teste@vasp.pt' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'password=YYYYYYYY'
```

2. Substituir as credênciais dummy pelas credênciais enviadas. Caso esteja a utilizar o Ambiente de QUA, deverá substituir o url do cURL para 	http://vaspapirest-qua.vaspexpresso.pt/token

3. No POSTMAN, no canto superior esquerdo, selecionar File -> Import.

![Alt text](https://vaspapirest.vaspexpresso.pt/POSTMAN/1.jpg "File Import")

4. Colar o código cURL com as credências e url atualizado na caixa de texto assinalada.

![Alt text](https://vaspapirest.vaspexpresso.pt/POSTMAN/2.jpg "Colar cURL")

5. Vai aparecer no POSTMAN o pedido preenchido com todos os dados necessários para fazer autenticação. Basta clicar no botão "Send".

![Alt text](https://vaspapirest.vaspexpresso.pt/POSTMAN/3.jpg "Colar cURL")

![Alt text](https://vaspapirest.vaspexpresso.pt/POSTMAN/4.jpg "Colar cURL")

### Código Exemplo
#### cURL
```curl=
curl --location --request POST 'https://vaspapirest.vaspexpresso.pt/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'username=teste@vasp.pt' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'password=YYYYYYYY'
```

#### C#
```csharp=
var client = new RestClient("https://vaspapirest.vaspexpresso.pt/token");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
request.AddParameter("username", "teste@XXXX.pt");
request.AddParameter("grant_type", "password");
request.AddParameter("password", "YYYYYYYY");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
```
#### Java
```java=
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://vaspapirest.vaspexpresso.pt/token")
  .header("Content-Type", "application/x-www-form-urlencoded")
  .field("username", "teste@XXXX.pt")
  .field("grant_type", "password")
  .field("password", "YYYYYYYY")
  .asString();

```


#### Javascript
```javascript=
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/x-www-form-urlencoded");

var urlencoded = new URLSearchParams();
urlencoded.append("username", "teste@XXXX.pt");
urlencoded.append("grant_type", "password");
urlencoded.append("password", "YYYYYYYY");

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: urlencoded,
  redirect: 'follow'
};

fetch("https://vaspapirest.vaspexpresso.pt/token", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
```

#### PHP
```php=
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://vaspapirest.vaspexpresso.pt/token',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => 'username=teste%40XXXX.pt&grant_type=password&password=YYYYYYYY',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/x-www-form-urlencoded'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
```

#### Python
```python=
import http.client

conn = http.client.HTTPSConnection("vaspapirest.vaspexpresso.pt")
payload = 'username=teste%40vasp.pt&grant_type=password&password=YYYYYYYY'
headers = {
  'Content-Type': 'application/x-www-form-urlencoded'
}
conn.request("POST", "/token", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```

# Manifesto de Carga
## Criar manifesto
### Input

:::info
`POST /api/V3/CargoManifest/Volumes`
|Campo|Descrição|Tipo|Tamanho|Obrigatório|
|-|-|-|-|-|
|volumes|Lista de códigos de barras de volumes a serem declarados no manifesto de carga <details><summary>Ver detalhes</summary>Exemplo de código de barras de um volume: `0000123000123001` |string array||Sim|
:::

### Output

:::    success
**OK : 200**
Resposta do pedido : 
|Campo|Descrição|Tipo|
|-|-|-|
|response|Resposta da operação||
|statusCode|Código Http da operação|numeric|
|exceptions|Lista de erros||

Response : 
|Campo|Descrição|Tipo|
|-|-|-|
|cargoManifestNumber|Número de manifesto de carga|string|
|document|Ficheiro PDF no formato array de bytes em base 64|string|

Exceptions : 
|Campo|Descrição|Tipo|
|-|-|-|
|exceptionCode|Código do erro|
|exceptionMessage|Mensagem do erro|string|
|language|Linguagem do erro `(PT ou EN)`|string|
:::


:::warning
**Bad Request : 400**
Formato da mensagem inválida ou parametros inválidos.

|Campo|Descrição|Exemplo|
|-|-|-|
|message|Mensagem de erro|
|status|Status HTTP|400|
:::


:::warning
**Unauthorized : 401**
Token de autorização invalido ou expirado.
:::

### Código Exemplo
#### cURL
```curl=
curl --location --request POST 'https://vaspapirest.vaspexpresso.pt/api/V3/CargoManifest/Volumes' \
--header 'Authorization: Bearer fyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg' \
--header 'Content-Type: application/json' \
--data-raw '{
  "volumes": [
    "0000123000123001", 
    "0000123000456001",
    "0000123000789001"
  ]
}'
```

#### C#
```csharp=
var client = new RestClient("https://vaspapirest.vaspexpresso.pt/api/V3/CargoManifest/Volumes");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg");
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@"  ""volumes"": [
" + "\n" +
@"    ""0000123000123001"", 
" + "\n" +
@"    ""0000123000456001"",
" + "\n" +
@"    ""0000123000789001""
" + "\n" +
@"  ]
" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
```
#### Java
```java=
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://vaspapirest.vaspexpresso.pt/api/V3/CargoManifest/Volumes")
  .header("Authorization", "Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg")
  .header("Content-Type", "application/json")
  .body("{\r\n  \"volumes\": [\r\n    \"0000123000123001\", \r\n    \"0000123000456001\",\r\n    \"0000123000789001\"\r\n  ]\r\n}")
  .asString();
```


#### Javascript
```javascript=
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "volumes": [
    "0000123000123001",
    "0000123000456001",
    "0000123000789001"
  ]
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://vaspapirest.vaspexpresso.pt/api/V3/CargoManifest/Volumes", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
```

#### PHP
```php=
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://vaspapirest.vaspexpresso.pt/api/V3/CargoManifest/Volumes',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
  "volumes": [
    "0000123000123001", 
    "0000123000456001",
    "0000123000789001"
  ]
}',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

#### Python
```python=
import http.client
import json

conn = http.client.HTTPSConnection("vaspapirest.vaspexpresso.pt")
payload = json.dumps({
  "volumes": [
    "0000123000123001",
    "0000123000456001",
    "0000123000789001"
  ]
})
headers = {
  'Authorization': 'Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg',
  'Content-Type': 'application/json'
}
conn.request("POST", "/api/V3/CargoManifest/Volumes", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```

# Lojas Kios
## Obter todas as Lojas Kios
### Input

:::info
`GET /api/V3/Kios`
:::


### Output

:::    success
**OK : 200**
Resposta do pedido : 
|Campo|Descrição|Tipo|
|-|-|-|
|kiosStores|Lista de Lojas Kios||

KiosStore : 
|Campo|Descrição|Tipo|
|-|-|-|
|businessName|Nome de Loja Kios|string|
|businessPhone|Número de contacto|string|
|code|Código de Loja Kios|string|
|name|Nome do proprietário|string|
|address|Morada|string|
|postalCode|Código postal|string|
|postalCodePlace|Localidade postal|string|
|email|E-mail|string|
|municipality|Município|string|
|district|Distrito|string|
|longitude|Longitude|decimal|
|latitude|Latitude|decimal|
|weekSchedule|Horário da semana|string|
|saturdaySchedule|Horário de Sábado|string|
|sundaySchedule|Horário de Domingo|string|
|isOpenLocalHoliday|Aberto em feriados locais|boolean|
|isOpenNationalHoliday|Aberto em feriados nacionais|boolean|
|isOpenHolidayNextDay|Aberto no dia seguinte a feriado|boolean|
|isActive|Activo|boolean|

Erro:
|Campo|Descrição|Exemplo|
|-|-|-|
|message|Mensagem de erro|
|status|Status HTTP|400|
:::

:::warning
**Unauthorized : 401**
Token de autorização invalido ou expirado.
:::

### Código Exemplo
#### cURL
```curl=
curl --location --request GET 'https://vaspapirest.vaspexpresso.pt/api/V3/Kios' \
--header 'Authorization: Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg'
```

#### C#
```csharp=
var client = new RestClient("https://vaspapirest.vaspexpresso.pt/api/V3/Kios");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
```
#### Java
```java=
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get("https://vaspapirest.vaspexpresso.pt/api/V3/Kios")
  .header("Authorization", "Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg")
  .asString();

```


#### Javascript
```javascript=
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://vaspapirest.vaspexpresso.pt/api/V3/Kios", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
```

#### PHP
```php=
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://vaspapirest.vaspexpresso.pt/api/V3/Kios',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

#### Python
```python=
import http.client

conn = http.client.HTTPSConnection("vaspapirest.vaspexpresso.pt")
payload = ''
headers = {
  'Authorization': 'Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg'
}
conn.request("GET", "/api/V3/Kios", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```

## Obter Lojas Kios por código postal ou localidade
### Input

:::info
`GET /api/V3/Kios/{postalCodeOrLocality}`
|Campo|Descrição|Tipo|Tamanho|Obrigatório|
|-|-|-|-|-|
|postalCodeOrLocality|Código postal ou localidade|string||Sim|
:::



### Output

:::    success
**OK : 200**
Resposta do pedido : 
|Campo|Descrição|Tipo|
|-|-|-|
|kiosStores|Lista de Lojas Kios. Pesquisas por códigos postais no formato xxxx-xxx, devolvem uma listagem de Lojas Kios | Lista de KiosStores|
|addresses|Lista de moradas. Pesquisas por localidade em que existem várias localidades com o mesmo nome, devolvem lista de moradas com o formato:  `{ "2795-000",  "2795-000 / Lisboa / Oeiras / Carnaxide / Rua da Garagem" }` | Lista de dicionários<string, string> |

Addresses : 
|Campo|Descrição|Tipo|
|-|-|-|
|key|Código postal|string|
|value|Morada no formato `“2795-000 / Lisboa / Oeiras / Carnaxide / Rua da Garagem”` |string|

KiosStore : 
|Campo|Descrição|Tipo|
|-|-|-|
|businessName|Nome de Loja Kios|string|
|businessPhone|Número de contacto|string|
|code|Código de Loja Kios|string|
|name|Nome do proprietário|string|
|address|Morada|string|
|postalCode|Código postal|string|
|postalCodePlace|Localidade postal|string|
|email|E-mail|string|
|municipality|Município|string|
|district|Distrito|string|
|longitude|Longitude|decimal|
|latitude|Latitude|decimal|
|weekSchedule|Horário da semana|string|
|saturdaySchedule|Horário de Sábado|string|
|sundaySchedule|Horário de Domingo|string|
|isOpenLocalHoliday|Aberto em feriados locais|boolean|
|isOpenNationalHoliday|Aberto em feriados nacionais|boolean|
|isOpenHolidayNextDay|Aberto no dia seguinte a feriado|boolean|
|isActive|Activo|boolean|
|distance|Distância|decimal|

Erro:
|Campo|Descrição|Exemplo|
|-|-|-|
|message|Mensagem de erro|
|status|Status HTTP|400|
:::

:::warning
**Unauthorized : 401**
Token de autorização invalido ou expirado.
:::


### Código Exemplo
#### cURL
```curl=
curl --location --request GET 'https://vaspapirest.vaspexpresso.pt/api/V3/Kios/2795-084' \
--header 'Authorization: Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg'
```

#### C#
```csharp=
var client = new RestClient("https://vaspapirest.vaspexpresso.pt/api/V3/Kios/2795-084");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
```
#### Java
```java=
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get("https://vaspapirest.vaspexpresso.pt/api/V3/Kios/2795-084")
  .header("Authorization", "Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg")
  .asString();

```


#### Javascript
```javascript=
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://vaspapirest.vaspexpresso.pt/api/V3/Kios/2795-084", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
```

#### PHP
```php=
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://vaspapirest.vaspexpresso.pt/api/V3/Kios/2795-084',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

#### Python
```python=
import http.client

conn = http.client.HTTPSConnection("vaspapirest.vaspexpresso.pt")
payload = ''
headers = {
  'Authorization': 'Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg'
}
conn.request("GET", "/api/V3/Kios/2795-084", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```



## Obter Lojas Kios por código postal ou localidade, aberto ao fim-de-semana ou aberto depois das 20 horas
### Input

:::info
`GET /api/V3/Kios/{postalCodeOrPlace}/{openWeekend}/{openAfter20H}`
|Campo|Descrição|Tipo|Tamanho|Obrigatório|
|-|-|-|-|-|
|postalCodeOrPlace|Código postal ou localidade|string||Sim|
|openWeekend|Aberto ao fim-de-semana|boolean||Sim|
|openAfter20H|Aberto depois das 20 horas|boolean||Sim|
:::



### Output

:::    success
**OK : 200**
Resposta do pedido : 
|Campo|Descrição|Tipo|
|-|-|-|
|kiosStores|Lista de Lojas Kios. Pesquisas por códigos postais no formato `xxxx-xxx`, devolvem uma listagem de Lojas Kios | Lista de KiosStores|
|addresses|Lista de moradas. Pesquisas por localidade em que existem várias localidades com o mesmo nome, devolvem lista de moradas com o formato:  `{ "2795-000",  "2795-000 / Lisboa / Oeiras / Carnaxide / Rua da Garagem" }` | Lista de dicionários<string, string> |

Addresses : 
|Campo|Descrição|Tipo|
|-|-|-|
|key|Código postal|string|
|value|Morada no formato `“2795-000 / Lisboa / Oeiras / Carnaxide / Rua da Garagem”` |string|

KiosStore : 
|Campo|Descrição|Tipo|
|-|-|-|
|businessName|Nome de Loja Kios|string|
|businessPhone|Número de contacto|string|
|code|Código de Loja Kios|string|
|name|Nome do proprietário|string|
|address|Morada|string|
|postalCode|Código postal|string|
|postalCodePlace|Localidade postal|string|
|email|E-mail|string|
|municipality|Município|string|
|district|Distrito|string|
|longitude|Longitude|decimal|
|latitude|Latitude|decimal|
|weekSchedule|Horário da semana|string|
|saturdaySchedule|Horário de Sábado|string|
|sundaySchedule|Horário de Domingo|string|
|isOpenLocalHoliday|Aberto em feriados locais|boolean|
|isOpenNationalHoliday|Aberto em feriados nacionais|boolean|
|isOpenHolidayNextDay|Aberto no dia seguinte a feriado|boolean|
|isActive|Activo|boolean|
|distance|Distância|decimal|

Erro:
|Campo|Descrição|Exemplo|
|-|-|-|
|message|Mensagem de erro|
|status|Status HTTP|400|
:::

:::warning
**Unauthorized : 401**
Token de autorização invalido ou expirado.
:::

### Código Exemplo
#### cURL
```curl=
curl --location --request GET 'https://vaspapirest.vaspexpresso.pt/api/V3/Kios/2795-084/false/false' \
--header 'Authorization: Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg'
```

#### C#
```csharp=
var client = new RestClient("https://vaspapirest.vaspexpresso.pt/api/V3/Kios/2795-084/false/false");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
```
#### Java
```java=
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get("https://vaspapirest.vaspexpresso.pt/api/V3/Kios/2795-084/false/false")
  .header("Authorization", "Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg")
  .asString();

```


#### Javascript
```javascript=
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://vaspapirest.vaspexpresso.pt/api/V3/Kios/2795-084/false/false", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
```

#### PHP
```php=
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://vaspapirest.vaspexpresso.pt/api/V3/Kios/2795-084/false/false',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

#### Python
```python=
import http.client

conn = http.client.HTTPSConnection("vaspapirest.vaspexpresso.pt")
payload = ''
headers = {
  'Authorization': 'Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg'
}
conn.request("GET", "/api/V3/Kios/2795-084/false/false", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```


# RMA

## Criar RMA
### Input

:::info
`POST /api/V3/RMA`
|Campo|Descrição|Tipo|Tamanho|Obrigatório|
|-|-|-|-|-|
|rma|Código RMA|string|50|Sim|
|clientReference|Código de referência do cliente|string|50|Sim|
:::


### Output
 
:::    success
**OK : 200**
Resposta do pedido : 
|Campo|Descrição|Tipo|
|-|-|-|
|success|Sucesso| boolean |
|errorList|Lista de erros| Array de Errors |

Error : 
|Campo|Descrição|Tipo|
|-|-|-|
|rma| Código RMA caso exista |string|
|message|Mensagem de erro |string|

Mensagens de erro : 
|Descrição|
|-|
|Request is null.|
|RMAXXXX already exists.|
|Client not configured for RMA devolution.|
|RMAXXXX and ClientReferenceXXXX must be equal or less than 50 characters.|

:::warning
**Unauthorized : 401**
Token de autorização invalido ou expirado.
:::



### Código Exemplo
#### cURL
```curl=
curl --location 'https://vaspapirest.vaspexpresso.pt/api/V3/RMA' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg' \
--data '[ 
   { 
     "rma": "testeRMA123",  
     "clientReference": "testeRMA123"  
   } 
 ]'    
```

#### C#
```csharp=
 var options = new RestClientOptions("https://vaspapirest.vaspexpresso.pt")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/api/V3/RMA", Method.Post);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg");
var body = @"[ 
" + "\n" +
@"   { 
" + "\n" +
@"     ""rma"": ""testeRMA123"",  
" + "\n" +
@"     ""clientReference"": ""testeRMA123""  
" + "\n" +
@"   } 
" + "\n" +
@" ]";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
```

#### Java
```java=
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://vaspapirest.vaspexpresso.pt/api/V3/RMA")
  .header("Content-Type", "application/json")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg")
  .body("[ \r\n   { \r\n     \"rma\": \"testeRMA123\",  \r\n     \"clientReference\": \"testeRMA123\"  \r\n   } \r\n ]")
  .asString();
```


#### Javascript
```javascript=
const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Accept", "application/json");
myHeaders.append("Authorization", "Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg");

const raw = JSON.stringify([
  {
    "rma": "testeRMA123",
    "clientReference": "testeRMA123"
  }
]);

const requestOptions = {
  method: "POST",
  headers: myHeaders,
  body: raw,
  redirect: "follow"
};

fetch("https://vaspapirest.vaspexpresso.pt/api/V3/RMA", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
```

#### PHP
```php=
  <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://vaspapirest.vaspexpresso.pt/api/V3/RMA',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'[ 
   { 
     "rma": "testeRMA123",  
     "clientReference": "testeRMA123"  
   } 
 ]',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Accept: application/json',
    'Authorization: Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

#### Python
```python=
import http.client
import json

conn = http.client.HTTPSConnection("vaspapirest-qua.vaspexpresso.pt")
payload = json.dumps([
  {
    "rma": "testeRMA123",
    "clientReference": "testeRMA123"
  }
])
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg'
}
conn.request("POST", "/api/V3/RMA", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```


## Obter lista de RMAs
### Input

:::info
`GET /api/V3/RMA`
|Campo|Descrição|Tipo|Tamanho|Obrigatório|
|-|-|-|-|-|
|rmas|Lista de RMAs|Array de string|20|Sim|
:::

### Output

:::    success
**OK : 200**
Resposta do pedido : 
|Campo|Descrição|Tipo|
|-|-|-|
|rmas|Lista de RMAs|Array de RMAs|


RMA: 
|Campo|Descrição|Tipo|
|-|-|-|
|rma|Lista de RMAs|string|
|clientBarCode|Código de barras do serviço|string|
|shipped|Foi entregue na Loja Kios|string|
|clientReference|Código de referência do cliente|string|

:::

:::warning
**Unauthorized : 401**
Token de autorização invalido ou expirado.
:::

# Rotas



## Obter todas as rotas
### Input

:::info
`GET /api/V3/Routes`
:::


### Output

:::    success
**OK : 200**
Resposta do pedido : 
|Campo|Descrição|Tipo|
|-|-|-|
|Routes|Lista de rotas| Lista de Routes|


Routes : 
|Campo|Descrição|Tipo|
|-|-|-|
|zoneCode|Código da zona `(ex.: R0101)`|string|
|name|Nome da rota `(ex.: MLP - Cascais)`|string|
|shortName|Abreviatura da rota `(ex.: LIS)`|string|
|zones|Lista de zonas por intervalos de códigos postais|Lista de Zones|


Zones : 
|Campo|Descrição|Tipo|
|-|-|-|
|zoneCode|Código da zona `(ex.: R0101)`|string|
|name|Nome da rota `(ex.: MLP - Cascais)`|string|
|shortName|Abreviatura da rota `(ex.: LIS)`|string|
|fromPostalCode|Inicio de intervalo do códigos postal da rota `(ex.: 2750000)`|int|
|toPostalCode|Fim de intervalo do códigos postal da rota `(ex.: 2754521)`|int|

Erro :
|Campo|Descrição|Exemplo|
|-|-|-|
|message|Mensagem de erro|
|status|Status HTTP|400|
:::

:::warning
**Unauthorized : 401**
Token de autorização invalido ou expirado.
:::



### Código Exemplo
#### cURL
```curl=
curl --location --request GET 'https://vaspapirest.vaspexpresso.pt/api/V3/Routes' \
--header 'Authorization: Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg'
```

#### C#
```csharp=
var client = new RestClient("https://vaspapirest.vaspexpresso.pt/api/V3/Routes");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
```
#### Java
```java=
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get("https://vaspapirest.vaspexpresso.pt/api/V3/Routes")
  .header("Authorization", "Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg")
  .asString();

```


#### Javascript
```javascript=
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://vaspapirest.vaspexpresso.pt/api/V3/Routes", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
```

#### PHP
```php=
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://vaspapirest.vaspexpresso.pt/api/V3/Routes',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

#### Python
```python=
import http.client

conn = http.client.HTTPSConnection("vaspapirest.vaspexpresso.pt")
payload = ''
headers = {
  'Authorization': 'Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg'
}
conn.request("GET", "/api/V3/Routes", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```


# Tipos de serviço



## Obter todos os tipos de serviço de um clinte
### Input

:::info
`GET /api/V3/ServiceTypes`
:::


### Output

:::    success
**OK : 200**
Resposta do pedido : 
|Campo|Descrição|Tipo|
|-|-|-|
|ServiceTypes|Lista de Tipos de serviços| Lista de ServiceType|


ServiceType : 
|Campo|Descrição|Tipo|
|-|-|-|
|serviceTypeId|Código do tipo de serviço (ex.: 93)|int|
|name|Nome do tipo de serviço `(ex.: VASP24 - Entrega volumes no dia seguinte)`|string|

:::warning
**Unauthorized : 401**
Token de autorização invalido ou expirado.
:::



### Código Exemplo
#### cURL
```curl=
curl --location --request GET 'https://vaspapirest.vaspexpresso.pt/api/V3/ServiceTypes' \
--header 'Authorization: Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg'
```

#### C#
```csharp=
var client = new RestClient("https://vaspapirest.vaspexpresso.pt/api/V3/ServiceTypes");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
```
#### Java
```java=
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get("https://vaspapirest.vaspexpresso.pt/api/V3/ServiceTypes")
  .header("Authorization", "Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg")
  .asString();

```


#### Javascript
```javascript=
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://vaspapirest.vaspexpresso.pt/api/V3/ServiceTypes", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
```

#### PHP
```php=
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://vaspapirest.vaspexpresso.pt/api/V3/ServiceTypes',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

#### Python
```python=
import http.client

conn = http.client.HTTPSConnection("vaspapirest.vaspexpresso.pt")
payload = ''
headers = {
  'Authorization': 'Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg'
}
conn.request("GET", "/api/V3/ServiceTypes", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```

## Obter lista de tipos de serviço por código postal
### Input

:::info
`GET /api/V3/ServiceTypes/{postalCode}`
|Campo|Descrição|Tipo|Tamanho|Obrigatório|
|-|-|-|-|-|
|postalCode|Código postal `(formato xxxx ou xxxx-xxx)`|string||Sim|
:::



### Output

:::    success
**OK : 200**
Resposta do pedido : 
|Campo|Descrição|Tipo|
|-|-|-|
|response|Lista de Tipos de serviços| Lista de ServiceType|


ServiceType : 
|Campo|Descrição|Tipo|
|-|-|-|
|serviceTypeId|Código do tipo de serviço (ex.: 93)|int|
|name|Nome do tipo de serviço `(ex.: VASP24 - Entrega volumes no dia seguinte)`|string|


Erro :
|Campo|Descrição|Exemplo|
|-|-|-|
|message|Mensagem de erro|
|status|Status HTTP|400|
:::

:::warning
**Unauthorized : 401**
Token de autorização invalido ou expirado.
:::


### Código Exemplo
#### cURL
```curl=
curl --location --request GET 'https://vaspapirest.vaspexpresso.pt/api/V3/ServiceTypes/2795-084' \
--header 'Authorization: Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg'
```

#### C#
```csharp=
var client = new RestClient("https://vaspapirest.vaspexpresso.pt/api/V3/ServiceTypes/2795-084");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
```

#### Java
```java=
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get("https://vaspapirest.vaspexpresso.pt/api/V3/ServiceTypes/2795-084")
  .header("Authorization", "Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg")
  .asString();

```


#### Javascript
```javascript=
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://vaspapirest.vaspexpresso.pt/api/V3/ServiceTypes/2795-084", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
```

#### PHP
```php=
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://vaspapirest.vaspexpresso.pt/api/V3/ServiceTypes/2795-084',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

#### Python
```python=
import http.client

conn = http.client.HTTPSConnection("vaspapirest.vaspexpresso.pt")
payload = ''
headers = {
  'Authorization': 'Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjE3NzYiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjpbInRlc3RlQHZhc3AucHQiLCJ0ZXN0ZUB2YXNwLnB0Il0sImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYWNjZXNzY29udHJvbHNlcnZpY2UvMjAxMC8wNy9jbGFpbXMvaWRlbnRpdHlwcm92aWRlciI6IkFTUC5ORVQgSWRlbnRpdHkiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdjMTRhZGQwLWZhZDEtNDkyYi1iMWFkLTFlN2JkODZiZDY3NyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InRlc3RlQHZhc3AucHQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJQUk9EIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbW9iaWxlcGhvbmUiOiI5NjAwMDAwMDAiLCJjbGllbnRfaWQiOiIxNyIsIm5iZiI6MTYzNDYzNzUxMSwiZXhwIjoxNjM0NzIzOTExLCJpc3MiOiJodHRwczovL3Zhc3BhcGlyZXN0LnZhc3BleHByZXNzby5wdCIsImF1ZCI6IjhFcHlVNVIzNUV4YzdWQld1OXdkS3JuWXRMVjlOOE4yIn0.C9dDciSDGBjPPON8JkVUCQkIjZsmV93vAQYbhTS5wtg'
}
conn.request("GET", "/api/V3/ServiceTypes/2795-084", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```

[Continua no documento seguinte ->](https://hackmd.io/@dsi-vasp/APIVaspExpressoParte2)