---
# System prepended metadata

title: Gateway CRM Parte 2

---

# Gateway CRM Parte 2
## Reagendar serviço - alterar morada de entrega


### Código Exemplo
#### cURL
```curl=
curl --location --request POST 'https://crmgateway-qua.vaspexpresso.pt/api/services/rescheduledelivery' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTAzMTUxMDYsImV4cCI6MTY1MDMxODcwNiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTAzMTUxMDYsInNjb3BlIjpbInNlcnZpY2VzYXBpLmdldGJ5YmFyY29kZSJdfQ.YX__59ff1McgzG8c9o8jsJD4pP1ddbJLceBg3haFc16QTebU9Ot3Gy3FNb3P7_Np3uMuGwAwXTFIP8edhX826y3hzC_wV520EIrJBZBVHTwxGNguxMGLk5vbALDcV9SMSc8QtycvAR6lsnzFTxU78emVDkF8256KZz6OpiOXysxrGudxuGCX3QnDC3rC4_KxjRd3J_h6JAp3CoKufF1-Zqkpn7FFRu11aMHa6DPIHsrK-PB8Ck8qnUAuug3bs2Owx6bIq4J4peXmDpSZaCp6_yCHD-NZo8c4ZImx_LHIbmdSHqL52D9eywd535GQiq3wq85u87wzZGBjdb_LnzoyjQ' \
--header 'Content-Type: application/json' \
--data-raw '{"ServiceId":10898,"ChangeType":1,"Address":{"Street":"Rua Alto do Monte, nr 10","City":"LX","PostalCode":"1000-123","Phone":"960000000"},"KiosCode":null,"RescheduleDate":null,"CreatedBy":"teste"}'
```

#### C#
```csharp=
var client = new RestClient("https://crmgateway-qua.vaspexpresso.pt/api/services/rescheduledelivery");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTAzMTUxMDYsImV4cCI6MTY1MDMxODcwNiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTAzMTUxMDYsInNjb3BlIjpbInNlcnZpY2VzYXBpLmdldGJ5YmFyY29kZSJdfQ.YX__59ff1McgzG8c9o8jsJD4pP1ddbJLceBg3haFc16QTebU9Ot3Gy3FNb3P7_Np3uMuGwAwXTFIP8edhX826y3hzC_wV520EIrJBZBVHTwxGNguxMGLk5vbALDcV9SMSc8QtycvAR6lsnzFTxU78emVDkF8256KZz6OpiOXysxrGudxuGCX3QnDC3rC4_KxjRd3J_h6JAp3CoKufF1-Zqkpn7FFRu11aMHa6DPIHsrK-PB8Ck8qnUAuug3bs2Owx6bIq4J4peXmDpSZaCp6_yCHD-NZo8c4ZImx_LHIbmdSHqL52D9eywd535GQiq3wq85u87wzZGBjdb_LnzoyjQ");
request.AddHeader("Content-Type", "application/json");
var body = @"{""ServiceId"":10898,""ChangeType"":1,""Address"":{""Street"":""Rua Alto do Monte, nr 10"",""City"":""LX"",""PostalCode"":""1000-123"",""Phone"":""960000000""},""KiosCode"":null,""RescheduleDate"":null,""CreatedBy"":""teste""}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
```

#### Dart
```dart=
var headers = {
  'Authorization': 'Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTAzMTUxMDYsImV4cCI6MTY1MDMxODcwNiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTAzMTUxMDYsInNjb3BlIjpbInNlcnZpY2VzYXBpLmdldGJ5YmFyY29kZSJdfQ.YX__59ff1McgzG8c9o8jsJD4pP1ddbJLceBg3haFc16QTebU9Ot3Gy3FNb3P7_Np3uMuGwAwXTFIP8edhX826y3hzC_wV520EIrJBZBVHTwxGNguxMGLk5vbALDcV9SMSc8QtycvAR6lsnzFTxU78emVDkF8256KZz6OpiOXysxrGudxuGCX3QnDC3rC4_KxjRd3J_h6JAp3CoKufF1-Zqkpn7FFRu11aMHa6DPIHsrK-PB8Ck8qnUAuug3bs2Owx6bIq4J4peXmDpSZaCp6_yCHD-NZo8c4ZImx_LHIbmdSHqL52D9eywd535GQiq3wq85u87wzZGBjdb_LnzoyjQ',
  'Content-Type': 'application/json'
};
var request = http.Request('POST', Uri.parse('https://crmgateway-qua.vaspexpresso.pt/api/services/rescheduledelivery'));
request.body = json.encode({
  "ServiceId": 10898,
  "ChangeType": 1,
  "Address": {
    "Street": "Rua Alto do Monte, nr 10",
    "City": "LX",
    "PostalCode": "1000-123",
    "Phone": "960000000"
  },
  "KiosCode": null,
  "RescheduleDate": null,
  "CreatedBy": "teste"
});
request.headers.addAll(headers);

http.StreamedResponse response = await request.send();

if (response.statusCode == 200) {
  print(await response.stream.bytesToString());
}
else {
  print(response.reasonPhrase);
}

```

#### Go
```go=
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://crmgateway-qua.vaspexpresso.pt/api/services/rescheduledelivery"
  method := "POST"

  payload := strings.NewReader(`{"ServiceId":10898,"ChangeType":1,"Address":{"Street":"Rua Alto do Monte, nr 10","City":"LX","PostalCode":"1000-123","Phone":"960000000"},"KiosCode":null,"RescheduleDate":null,"CreatedBy":"teste"}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTAzMTUxMDYsImV4cCI6MTY1MDMxODcwNiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTAzMTUxMDYsInNjb3BlIjpbInNlcnZpY2VzYXBpLmdldGJ5YmFyY29kZSJdfQ.YX__59ff1McgzG8c9o8jsJD4pP1ddbJLceBg3haFc16QTebU9Ot3Gy3FNb3P7_Np3uMuGwAwXTFIP8edhX826y3hzC_wV520EIrJBZBVHTwxGNguxMGLk5vbALDcV9SMSc8QtycvAR6lsnzFTxU78emVDkF8256KZz6OpiOXysxrGudxuGCX3QnDC3rC4_KxjRd3J_h6JAp3CoKufF1-Zqkpn7FFRu11aMHa6DPIHsrK-PB8Ck8qnUAuug3bs2Owx6bIq4J4peXmDpSZaCp6_yCHD-NZo8c4ZImx_LHIbmdSHqL52D9eywd535GQiq3wq85u87wzZGBjdb_LnzoyjQ")
  req.Header.Add("Content-Type", "application/json")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```

#### Java
```java=
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://crmgateway-qua.vaspexpresso.pt/api/services/rescheduledelivery")
  .header("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTAzMTUxMDYsImV4cCI6MTY1MDMxODcwNiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTAzMTUxMDYsInNjb3BlIjpbInNlcnZpY2VzYXBpLmdldGJ5YmFyY29kZSJdfQ.YX__59ff1McgzG8c9o8jsJD4pP1ddbJLceBg3haFc16QTebU9Ot3Gy3FNb3P7_Np3uMuGwAwXTFIP8edhX826y3hzC_wV520EIrJBZBVHTwxGNguxMGLk5vbALDcV9SMSc8QtycvAR6lsnzFTxU78emVDkF8256KZz6OpiOXysxrGudxuGCX3QnDC3rC4_KxjRd3J_h6JAp3CoKufF1-Zqkpn7FFRu11aMHa6DPIHsrK-PB8Ck8qnUAuug3bs2Owx6bIq4J4peXmDpSZaCp6_yCHD-NZo8c4ZImx_LHIbmdSHqL52D9eywd535GQiq3wq85u87wzZGBjdb_LnzoyjQ")
  .header("Content-Type", "application/json")
  .body("{\"ServiceId\":10898,\"ChangeType\":1,\"Address\":{\"Street\":\"Rua Alto do Monte, nr 10\",\"City\":\"LX\",\"PostalCode\":\"1000-123\",\"Phone\":\"960000000\"},\"KiosCode\":null,\"RescheduleDate\":null,\"CreatedBy\":\"teste\"}")
  .asString();

```

#### Javascript
```javascript=
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTAzMTUxMDYsImV4cCI6MTY1MDMxODcwNiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTAzMTUxMDYsInNjb3BlIjpbInNlcnZpY2VzYXBpLmdldGJ5YmFyY29kZSJdfQ.YX__59ff1McgzG8c9o8jsJD4pP1ddbJLceBg3haFc16QTebU9Ot3Gy3FNb3P7_Np3uMuGwAwXTFIP8edhX826y3hzC_wV520EIrJBZBVHTwxGNguxMGLk5vbALDcV9SMSc8QtycvAR6lsnzFTxU78emVDkF8256KZz6OpiOXysxrGudxuGCX3QnDC3rC4_KxjRd3J_h6JAp3CoKufF1-Zqkpn7FFRu11aMHa6DPIHsrK-PB8Ck8qnUAuug3bs2Owx6bIq4J4peXmDpSZaCp6_yCHD-NZo8c4ZImx_LHIbmdSHqL52D9eywd535GQiq3wq85u87wzZGBjdb_LnzoyjQ");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "ServiceId": 10898,
  "ChangeType": 1,
  "Address": {
    "Street": "Rua Alto do Monte, nr 10",
    "City": "LX",
    "PostalCode": "1000-123",
    "Phone": "960000000"
  },
  "KiosCode": null,
  "RescheduleDate": null,
  "CreatedBy": "teste"
});

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

fetch("https://crmgateway-qua.vaspexpresso.pt/api/services/rescheduledelivery", 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://crmgateway-qua.vaspexpresso.pt/api/services/rescheduledelivery',
  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 =>'{"ServiceId":10898,"ChangeType":1,"Address":{"Street":"Rua Alto do Monte, nr 10","City":"LX","PostalCode":"1000-123","Phone":"960000000"},"KiosCode":null,"RescheduleDate":null,"CreatedBy":"teste"}',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTAzMTUxMDYsImV4cCI6MTY1MDMxODcwNiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTAzMTUxMDYsInNjb3BlIjpbInNlcnZpY2VzYXBpLmdldGJ5YmFyY29kZSJdfQ.YX__59ff1McgzG8c9o8jsJD4pP1ddbJLceBg3haFc16QTebU9Ot3Gy3FNb3P7_Np3uMuGwAwXTFIP8edhX826y3hzC_wV520EIrJBZBVHTwxGNguxMGLk5vbALDcV9SMSc8QtycvAR6lsnzFTxU78emVDkF8256KZz6OpiOXysxrGudxuGCX3QnDC3rC4_KxjRd3J_h6JAp3CoKufF1-Zqkpn7FFRu11aMHa6DPIHsrK-PB8Ck8qnUAuug3bs2Owx6bIq4J4peXmDpSZaCp6_yCHD-NZo8c4ZImx_LHIbmdSHqL52D9eywd535GQiq3wq85u87wzZGBjdb_LnzoyjQ',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

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

conn = http.client.HTTPSConnection("crmgateway-qua.vaspexpresso.pt")
payload = json.dumps({
  "ServiceId": 10898,
  "ChangeType": 1,
  "Address": {
    "Street": "Rua Alto do Monte, nr 10",
    "City": "LX",
    "PostalCode": "1000-123",
    "Phone": "960000000"
  },
  "KiosCode": None,
  "RescheduleDate": None,
  "CreatedBy": "teste"
})
headers = {
  'Authorization': 'Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTAzMTUxMDYsImV4cCI6MTY1MDMxODcwNiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTAzMTUxMDYsInNjb3BlIjpbInNlcnZpY2VzYXBpLmdldGJ5YmFyY29kZSJdfQ.YX__59ff1McgzG8c9o8jsJD4pP1ddbJLceBg3haFc16QTebU9Ot3Gy3FNb3P7_Np3uMuGwAwXTFIP8edhX826y3hzC_wV520EIrJBZBVHTwxGNguxMGLk5vbALDcV9SMSc8QtycvAR6lsnzFTxU78emVDkF8256KZz6OpiOXysxrGudxuGCX3QnDC3rC4_KxjRd3J_h6JAp3CoKufF1-Zqkpn7FFRu11aMHa6DPIHsrK-PB8Ck8qnUAuug3bs2Owx6bIq4J4peXmDpSZaCp6_yCHD-NZo8c4ZImx_LHIbmdSHqL52D9eywd535GQiq3wq85u87wzZGBjdb_LnzoyjQ',
  'Content-Type': 'application/json'
}
conn.request("POST", "/api/services/rescheduledelivery", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```




## Reagendar recolha - alterar data de recolha
### Input
:::info
`POST https://crmgateway-qua.vaspexpresso.pt/api/services/reschedulepickup`

**Header**
|Campo|Descrição|Obrigatório|
|-|-|-|
|Authorization| Json web token | Sim |

**Body**
|Campo|Descrição|Obrigatório|Tamanho Máximo|
|-|-|-|-| 
|ServiceId | Id do serviço | Sim |-|
|ChangeType | Tipo de alteração `(ChangeDate = 3)`| Sim |Número|
|RescheduleDate|Data de recolha|Sim|Data|
|CreatedBy | Utilizador que processou alteração| Sim |100|

**OpenId**
|Scope|
|-|
| servicesapi.reschedulepickup |

**Exemplo:**

```
POST https://crmgateway-qua.vaspexpresso.pt/api/services/reschedulepickup HTTP/1.1
Host: crmgateway-qua.vaspexpresso.pt
Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTA1MzM0NzIsImV4cCI6MTY1MDUzNzA3MiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTA1MzM0NzIsInNjb3BlIjpbInNlcnZpY2VzYXBpLnJlc2NoZWR1bGVwaWNrdXAiXX0.FRiqU6hkJHZrHhfUC47HxMIF8K1OR2LRo5ItNrzg7yRMRwLKAC_eWR7EW23qpJeGnpc6u7axSSyRemr0unEvof6_wcGZbrnWAQjw9tWZXBgveIZHD9Tbh1MYuDeyZPkL5Bhk815n_zoe-1REYPcUl6dGCNTDAtCNNA4Gt8jmCd7E5X8QdUO_cNH06GOvAD-80rf2Xs1q-OU8Ola_RboBVt7kVlww7YJjAzQeJGwZDnQaKL3-GJnXHYqPjcwc1xGqN-0etVFqGpCdg4_KyUBydM6HTp8WQuaNQxx7LhCF1to-Fa8kAK2OEK7adPswlPv2yg3_e227r0yfRdkC5Um_sA
Accept-Encoding: gzip, deflate
Content-Type: application/json; charset=UTF-8
Content-Length: 138

{"ServiceId":10905,"ChangeType":3,"Address":null,"KiosCode":null,"RescheduleDate":"2022-04-23T10:31:12.8644404+01:00","CreatedBy":"teste"}
```
:::

### Output
:::success
**OK : 200**

**Body**
|Campo|Descrição|Tipo|
|-|-|-|
|Success|Se a operação foi feita com sucesso|boleano| 
|ErrorMessage|Mensagem de erro caso exista erro|Texto| 
|ErrorCode|Código do erro caso exista erro|Número| 

**Exemplo:**

```
HTTP/1.1 200 OK
Content-Length: 50
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/10.0
Request-Context: appId=cid-v1:43a95f72-78b8-4b70-82fd-c33600ccd399
Strict-Transport-Security: max-age=2592000
X-Powered-By: ASP.NET
X-Powered-By: ASP.NET
Date: Thu, 21 Apr 2022 09:31:14 GMT

{"success":true,"errorMessage":null,"errorCode":0}
```

**Códigos de erro**

|Código|Erro|
|-|-|
|0|null|
|1|Ignorar - Não deve ser considerado para esta operação.|
|2|Service has already been delivered.|
|3|Address has already been changed.|
|4|Date has already been changed.|
|5|Address has already been changed to kios.|
|6|The RescheduleDate field is required.|
|7|The RescheduleDate field cannot be in the past.|
|8|The KiosCode field is required.|
|9|The KiosCode field is not valid.|
|10|The service is already in delivery to Kios.|
|11|The Address field is required.|
|12|The Street field is mandatory.|
|13|The PostalCode field is required.|
|14|The City field is mandatory.|
|15|The Street field must have a maximum of 400 characters.|
|16|The PostalCode field does not exist.|
|17|The City field must have a maximum of 100 characters.|
|18|The service must be changed to a route in the same distribution center.|
|19|The Phone field must have a maximum of 100 characters.|
|20|Pickup does not allow changes to Kios.|
|22|The CreatedBy field is required.|
|24|The CreatedBy field must have a maximum of 100 characters.|

:::
:::warning
**Unauthorized : 401**
Credenciais incorrectas
:::


### Código Exemplo
#### cURL
```curl=
curl --location --request POST 'https://crmgateway-qua.vaspexpresso.pt/api/services/reschedulepickup' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTA1MzM0NzIsImV4cCI6MTY1MDUzNzA3MiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTA1MzM0NzIsInNjb3BlIjpbInNlcnZpY2VzYXBpLnJlc2NoZWR1bGVwaWNrdXAiXX0.FRiqU6hkJHZrHhfUC47HxMIF8K1OR2LRo5ItNrzg7yRMRwLKAC_eWR7EW23qpJeGnpc6u7axSSyRemr0unEvof6_wcGZbrnWAQjw9tWZXBgveIZHD9Tbh1MYuDeyZPkL5Bhk815n_zoe-1REYPcUl6dGCNTDAtCNNA4Gt8jmCd7E5X8QdUO_cNH06GOvAD-80rf2Xs1q-OU8Ola_RboBVt7kVlww7YJjAzQeJGwZDnQaKL3-GJnXHYqPjcwc1xGqN-0etVFqGpCdg4_KyUBydM6HTp8WQuaNQxx7LhCF1to-Fa8kAK2OEK7adPswlPv2yg3_e227r0yfRdkC5Um_sA' \
--header 'Content-Type: application/json' \
--data-raw '{"ServiceId":10905,"ChangeType":3,"Address":null,"KiosCode":null,"RescheduleDate":"2022-04-23T10:31:12.8644404+01:00","CreatedBy":"teste"}'
```

#### C#
```csharp=
var client = new RestClient("https://crmgateway-qua.vaspexpresso.pt/api/services/reschedulepickup");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTA1MzM0NzIsImV4cCI6MTY1MDUzNzA3MiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTA1MzM0NzIsInNjb3BlIjpbInNlcnZpY2VzYXBpLnJlc2NoZWR1bGVwaWNrdXAiXX0.FRiqU6hkJHZrHhfUC47HxMIF8K1OR2LRo5ItNrzg7yRMRwLKAC_eWR7EW23qpJeGnpc6u7axSSyRemr0unEvof6_wcGZbrnWAQjw9tWZXBgveIZHD9Tbh1MYuDeyZPkL5Bhk815n_zoe-1REYPcUl6dGCNTDAtCNNA4Gt8jmCd7E5X8QdUO_cNH06GOvAD-80rf2Xs1q-OU8Ola_RboBVt7kVlww7YJjAzQeJGwZDnQaKL3-GJnXHYqPjcwc1xGqN-0etVFqGpCdg4_KyUBydM6HTp8WQuaNQxx7LhCF1to-Fa8kAK2OEK7adPswlPv2yg3_e227r0yfRdkC5Um_sA");
request.AddHeader("Content-Type", "application/json");
var body = @"{""ServiceId"":10905,""ChangeType"":3,""Address"":null,""KiosCode"":null,""RescheduleDate"":""2022-04-23T10:31:12.8644404+01:00"",""CreatedBy"":""teste""}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
```

#### Dart
```dart=
var headers = {
  'Authorization': 'Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTA1MzM0NzIsImV4cCI6MTY1MDUzNzA3MiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTA1MzM0NzIsInNjb3BlIjpbInNlcnZpY2VzYXBpLnJlc2NoZWR1bGVwaWNrdXAiXX0.FRiqU6hkJHZrHhfUC47HxMIF8K1OR2LRo5ItNrzg7yRMRwLKAC_eWR7EW23qpJeGnpc6u7axSSyRemr0unEvof6_wcGZbrnWAQjw9tWZXBgveIZHD9Tbh1MYuDeyZPkL5Bhk815n_zoe-1REYPcUl6dGCNTDAtCNNA4Gt8jmCd7E5X8QdUO_cNH06GOvAD-80rf2Xs1q-OU8Ola_RboBVt7kVlww7YJjAzQeJGwZDnQaKL3-GJnXHYqPjcwc1xGqN-0etVFqGpCdg4_KyUBydM6HTp8WQuaNQxx7LhCF1to-Fa8kAK2OEK7adPswlPv2yg3_e227r0yfRdkC5Um_sA',
  'Content-Type': 'application/json'
};
var request = http.Request('POST', Uri.parse('https://crmgateway-qua.vaspexpresso.pt/api/services/reschedulepickup'));
request.body = json.encode({
  "ServiceId": 10905,
  "ChangeType": 3,
  "Address": null,
  "KiosCode": null,
  "RescheduleDate": "2022-04-23T10:31:12.8644404+01:00",
  "CreatedBy": "teste"
});
request.headers.addAll(headers);

http.StreamedResponse response = await request.send();

if (response.statusCode == 200) {
  print(await response.stream.bytesToString());
}
else {
  print(response.reasonPhrase);
}

```

#### Go
```go=
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://crmgateway-qua.vaspexpresso.pt/api/services/reschedulepickup"
  method := "POST"

  payload := strings.NewReader(`{"ServiceId":10905,"ChangeType":3,"Address":null,"KiosCode":null,"RescheduleDate":"2022-04-23T10:31:12.8644404+01:00","CreatedBy":"teste"}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTA1MzM0NzIsImV4cCI6MTY1MDUzNzA3MiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTA1MzM0NzIsInNjb3BlIjpbInNlcnZpY2VzYXBpLnJlc2NoZWR1bGVwaWNrdXAiXX0.FRiqU6hkJHZrHhfUC47HxMIF8K1OR2LRo5ItNrzg7yRMRwLKAC_eWR7EW23qpJeGnpc6u7axSSyRemr0unEvof6_wcGZbrnWAQjw9tWZXBgveIZHD9Tbh1MYuDeyZPkL5Bhk815n_zoe-1REYPcUl6dGCNTDAtCNNA4Gt8jmCd7E5X8QdUO_cNH06GOvAD-80rf2Xs1q-OU8Ola_RboBVt7kVlww7YJjAzQeJGwZDnQaKL3-GJnXHYqPjcwc1xGqN-0etVFqGpCdg4_KyUBydM6HTp8WQuaNQxx7LhCF1to-Fa8kAK2OEK7adPswlPv2yg3_e227r0yfRdkC5Um_sA")
  req.Header.Add("Content-Type", "application/json")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```

#### Java
```java=
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://crmgateway-qua.vaspexpresso.pt/api/services/reschedulepickup")
  .header("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTA1MzM0NzIsImV4cCI6MTY1MDUzNzA3MiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTA1MzM0NzIsInNjb3BlIjpbInNlcnZpY2VzYXBpLnJlc2NoZWR1bGVwaWNrdXAiXX0.FRiqU6hkJHZrHhfUC47HxMIF8K1OR2LRo5ItNrzg7yRMRwLKAC_eWR7EW23qpJeGnpc6u7axSSyRemr0unEvof6_wcGZbrnWAQjw9tWZXBgveIZHD9Tbh1MYuDeyZPkL5Bhk815n_zoe-1REYPcUl6dGCNTDAtCNNA4Gt8jmCd7E5X8QdUO_cNH06GOvAD-80rf2Xs1q-OU8Ola_RboBVt7kVlww7YJjAzQeJGwZDnQaKL3-GJnXHYqPjcwc1xGqN-0etVFqGpCdg4_KyUBydM6HTp8WQuaNQxx7LhCF1to-Fa8kAK2OEK7adPswlPv2yg3_e227r0yfRdkC5Um_sA")
  .header("Content-Type", "application/json")
  .body("{\"ServiceId\":10905,\"ChangeType\":3,\"Address\":null,\"KiosCode\":null,\"RescheduleDate\":\"2022-04-23T10:31:12.8644404+01:00\",\"CreatedBy\":\"teste\"}")
  .asString();

```

#### Javascript
```javascript=
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTA1MzM0NzIsImV4cCI6MTY1MDUzNzA3MiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTA1MzM0NzIsInNjb3BlIjpbInNlcnZpY2VzYXBpLnJlc2NoZWR1bGVwaWNrdXAiXX0.FRiqU6hkJHZrHhfUC47HxMIF8K1OR2LRo5ItNrzg7yRMRwLKAC_eWR7EW23qpJeGnpc6u7axSSyRemr0unEvof6_wcGZbrnWAQjw9tWZXBgveIZHD9Tbh1MYuDeyZPkL5Bhk815n_zoe-1REYPcUl6dGCNTDAtCNNA4Gt8jmCd7E5X8QdUO_cNH06GOvAD-80rf2Xs1q-OU8Ola_RboBVt7kVlww7YJjAzQeJGwZDnQaKL3-GJnXHYqPjcwc1xGqN-0etVFqGpCdg4_KyUBydM6HTp8WQuaNQxx7LhCF1to-Fa8kAK2OEK7adPswlPv2yg3_e227r0yfRdkC5Um_sA");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "ServiceId": 10905,
  "ChangeType": 3,
  "Address": null,
  "KiosCode": null,
  "RescheduleDate": "2022-04-23T10:31:12.8644404+01:00",
  "CreatedBy": "teste"
});

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

fetch("https://crmgateway-qua.vaspexpresso.pt/api/services/reschedulepickup", 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://crmgateway-qua.vaspexpresso.pt/api/services/reschedulepickup',
  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 =>'{"ServiceId":10905,"ChangeType":3,"Address":null,"KiosCode":null,"RescheduleDate":"2022-04-23T10:31:12.8644404+01:00","CreatedBy":"teste"}',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTA1MzM0NzIsImV4cCI6MTY1MDUzNzA3MiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTA1MzM0NzIsInNjb3BlIjpbInNlcnZpY2VzYXBpLnJlc2NoZWR1bGVwaWNrdXAiXX0.FRiqU6hkJHZrHhfUC47HxMIF8K1OR2LRo5ItNrzg7yRMRwLKAC_eWR7EW23qpJeGnpc6u7axSSyRemr0unEvof6_wcGZbrnWAQjw9tWZXBgveIZHD9Tbh1MYuDeyZPkL5Bhk815n_zoe-1REYPcUl6dGCNTDAtCNNA4Gt8jmCd7E5X8QdUO_cNH06GOvAD-80rf2Xs1q-OU8Ola_RboBVt7kVlww7YJjAzQeJGwZDnQaKL3-GJnXHYqPjcwc1xGqN-0etVFqGpCdg4_KyUBydM6HTp8WQuaNQxx7LhCF1to-Fa8kAK2OEK7adPswlPv2yg3_e227r0yfRdkC5Um_sA',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

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

conn = http.client.HTTPSConnection("crmgateway-qua.vaspexpresso.pt")
payload = json.dumps({
  "ServiceId": 10905,
  "ChangeType": 3,
  "Address": None,
  "KiosCode": None,
  "RescheduleDate": "2022-04-23T10:31:12.8644404+01:00",
  "CreatedBy": "teste"
})
headers = {
  'Authorization': 'Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTA1MzM0NzIsImV4cCI6MTY1MDUzNzA3MiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTA1MzM0NzIsInNjb3BlIjpbInNlcnZpY2VzYXBpLnJlc2NoZWR1bGVwaWNrdXAiXX0.FRiqU6hkJHZrHhfUC47HxMIF8K1OR2LRo5ItNrzg7yRMRwLKAC_eWR7EW23qpJeGnpc6u7axSSyRemr0unEvof6_wcGZbrnWAQjw9tWZXBgveIZHD9Tbh1MYuDeyZPkL5Bhk815n_zoe-1REYPcUl6dGCNTDAtCNNA4Gt8jmCd7E5X8QdUO_cNH06GOvAD-80rf2Xs1q-OU8Ola_RboBVt7kVlww7YJjAzQeJGwZDnQaKL3-GJnXHYqPjcwc1xGqN-0etVFqGpCdg4_KyUBydM6HTp8WQuaNQxx7LhCF1to-Fa8kAK2OEK7adPswlPv2yg3_e227r0yfRdkC5Um_sA',
  'Content-Type': 'application/json'
}
conn.request("POST", "/api/services/reschedulepickup", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```



## Reagendar recolha - alterar morada de recolha
### Input
:::info
`POST https://crmgateway-qua.vaspexpresso.pt/api/services/reschedulepickup`

**Header**
|Campo|Descrição|Obrigatório|
|-|-|-|
|Authorization| Json web token | Sim |

**Body**
|Campo|Descrição|Obrigatório|Tamanho Máximo|
|-|-|-|-| 
|ServiceId | Id do serviço | Sim |-|
|ChangeType | Tipo de alteração `(ChangeAddress = 1)`| Sim |Número|
|Address|Nova morada de recolha|Sim|Address|
|CreatedBy | Utilizador que processou alteração| Sim |100|

**Address**
|Campo|Descrição|Obrigatório|Tamanho Máximo|
|-|-|-|-| 
|Street|Morada|Sim|400|
|PostalCode|Código postal `(formato xxxx-yyy)`|Sim|8|
|City|Localidade|Sim|100|
|Phone|Número de contacto|Sim|100|

**OpenId**
|Scope|
|-|
| servicesapi.reschedulepickup |

**Exemplo:**

```
POST https://crmgateway-qua.vaspexpresso.pt/api/services/reschedulepickup HTTP/1.1
Host: crmgateway-qua.vaspexpresso.pt
Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTA1MzM4NzcsImV4cCI6MTY1MDUzNzQ3NywiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTA1MzM4NzcsInNjb3BlIjpbInNlcnZpY2VzYXBpLnJlc2NoZWR1bGVwaWNrdXAiXX0.pUbdATq7ZuChX-CGqryk-EE2dXU6WnId35lxhtoxzCwiz_epWmnRdqI2-n8RW9ccNhLJVHNEUQDD2FlEcDg8CDMgOryyQ3vsyM2M11yY0j-GlNBq25jpwQ2dy2kgSHnABw7151VQkm6y6dyG1UGatERQEmrE_Noo8T9e-j9M-wg4amohS_Y8KG_JTo4EWcu6ZtDHSBN2FbaIWElpM-ZbnGBVkKkbRdlXdiZ2JgF3kEWl0Vc_9RX8RXbwGMAMHaRSlnmHK0MQ3fj0BCJfiK4HeX21kJjmT73LFyJ0TW4LGpvg7YRD3MCnaMcVs16rCP1pOTszepeIyi9TT3Gc8MdbsA
Accept-Encoding: gzip, deflate
Content-Type: application/json; charset=UTF-8
Content-Length: 196

{"ServiceId":10905,"ChangeType":1,"Address":{"Street":"Rua Alto do Monte, nr 10","City":"LX","PostalCode":"1000-123","Phone":"960000000"},"KiosCode":null,"RescheduleDate":null,"CreatedBy":"teste"}

```
:::

### Output
:::success
**OK : 200**

**Body**
|Campo|Descrição|Tipo|
|-|-|-|
|Success|Se a operação foi feita com sucesso|boleano| 
|ErrorMessage|Mensagem de erro caso exista erro|Texto| 
|ErrorCode|Código do erro caso exista erro|Número| 

**Exemplo:**

```
HTTP/1.1 200 OK
Content-Length: 50
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/10.0
Request-Context: appId=
Strict-Transport-Security: max-age=2592000
X-Powered-By: ASP.NET
X-Powered-By: ASP.NET
Date: Thu, 21 Apr 2022 09:38:02 GMT

{"success":true,"errorMessage":null,"errorCode":0}
```

**Códigos de erro**

|Código|Erro|
|-|-|
|0|null|
|1|Ignorar - Não deve ser considerado para esta operação.|
|2|Service has already been delivered.|
|3|Address has already been changed.|
|4|Date has already been changed.|
|5|Address has already been changed to kios.|
|6|The RescheduleDate field is required.|
|7|The RescheduleDate field cannot be in the past.|
|8|The KiosCode field is required.|
|9|The KiosCode field is not valid.|
|10|The service is already in delivery to Kios.|
|11|The Address field is required.|
|12|The Street field is mandatory.|
|13|The PostalCode field is required.|
|14|The City field is mandatory.|
|15|The Street field must have a maximum of 400 characters.|
|16|The PostalCode field does not exist.|
|17|The City field must have a maximum of 100 characters.|
|18|The service must be changed to a route in the same distribution center.|
|19|The Phone field must have a maximum of 100 characters.|
|20|Pickup does not allow changes to Kios.|
|22|The CreatedBy field is required.|
|24|The CreatedBy field must have a maximum of 100 characters.|

:::
:::warning
**Unauthorized : 401**
Credenciais incorrectas
:::


### Código Exemplo
#### cURL
```curl=
curl --location --request POST 'https://crmgateway-qua.vaspexpresso.pt/api/services/reschedulepickup' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTA1MzM0NzIsImV4cCI6MTY1MDUzNzA3MiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTA1MzM0NzIsInNjb3BlIjpbInNlcnZpY2VzYXBpLnJlc2NoZWR1bGVwaWNrdXAiXX0.FRiqU6hkJHZrHhfUC47HxMIF8K1OR2LRo5ItNrzg7yRMRwLKAC_eWR7EW23qpJeGnpc6u7axSSyRemr0unEvof6_wcGZbrnWAQjw9tWZXBgveIZHD9Tbh1MYuDeyZPkL5Bhk815n_zoe-1REYPcUl6dGCNTDAtCNNA4Gt8jmCd7E5X8QdUO_cNH06GOvAD-80rf2Xs1q-OU8Ola_RboBVt7kVlww7YJjAzQeJGwZDnQaKL3-GJnXHYqPjcwc1xGqN-0etVFqGpCdg4_KyUBydM6HTp8WQuaNQxx7LhCF1to-Fa8kAK2OEK7adPswlPv2yg3_e227r0yfRdkC5Um_sA' \
--header 'Content-Type: application/json' \
--data-raw '{"ServiceId":10905,"ChangeType":1,"Address":{"Street":"Rua Alto do Monte, nr 10","City":"LX","PostalCode":"1000-123","Phone":"960000000"},"KiosCode":null,"RescheduleDate":null,"CreatedBy":"teste"}'
```

#### C#
```csharp=
var client = new RestClient("https://crmgateway-qua.vaspexpresso.pt/api/services/reschedulepickup");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTA1MzM0NzIsImV4cCI6MTY1MDUzNzA3MiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTA1MzM0NzIsInNjb3BlIjpbInNlcnZpY2VzYXBpLnJlc2NoZWR1bGVwaWNrdXAiXX0.FRiqU6hkJHZrHhfUC47HxMIF8K1OR2LRo5ItNrzg7yRMRwLKAC_eWR7EW23qpJeGnpc6u7axSSyRemr0unEvof6_wcGZbrnWAQjw9tWZXBgveIZHD9Tbh1MYuDeyZPkL5Bhk815n_zoe-1REYPcUl6dGCNTDAtCNNA4Gt8jmCd7E5X8QdUO_cNH06GOvAD-80rf2Xs1q-OU8Ola_RboBVt7kVlww7YJjAzQeJGwZDnQaKL3-GJnXHYqPjcwc1xGqN-0etVFqGpCdg4_KyUBydM6HTp8WQuaNQxx7LhCF1to-Fa8kAK2OEK7adPswlPv2yg3_e227r0yfRdkC5Um_sA");
request.AddHeader("Content-Type", "application/json");
var body = @"{""ServiceId"":10905,""ChangeType"":1,""Address"":{""Street"":""Rua Alto do Monte, nr 10"",""City"":""LX"",""PostalCode"":""1000-123"",""Phone"":""960000000""},""KiosCode"":null,""RescheduleDate"":null,""CreatedBy"":""teste""}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
```

#### Dart
```dart=
var headers = {
  'Authorization': 'Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTA1MzM0NzIsImV4cCI6MTY1MDUzNzA3MiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTA1MzM0NzIsInNjb3BlIjpbInNlcnZpY2VzYXBpLnJlc2NoZWR1bGVwaWNrdXAiXX0.FRiqU6hkJHZrHhfUC47HxMIF8K1OR2LRo5ItNrzg7yRMRwLKAC_eWR7EW23qpJeGnpc6u7axSSyRemr0unEvof6_wcGZbrnWAQjw9tWZXBgveIZHD9Tbh1MYuDeyZPkL5Bhk815n_zoe-1REYPcUl6dGCNTDAtCNNA4Gt8jmCd7E5X8QdUO_cNH06GOvAD-80rf2Xs1q-OU8Ola_RboBVt7kVlww7YJjAzQeJGwZDnQaKL3-GJnXHYqPjcwc1xGqN-0etVFqGpCdg4_KyUBydM6HTp8WQuaNQxx7LhCF1to-Fa8kAK2OEK7adPswlPv2yg3_e227r0yfRdkC5Um_sA',
  'Content-Type': 'application/json'
};
var request = http.Request('POST', Uri.parse('https://crmgateway-qua.vaspexpresso.pt/api/services/reschedulepickup'));
request.body = json.encode({
  "ServiceId": 10905,
  "ChangeType": 1,
  "Address": {
    "Street": "Rua Alto do Monte, nr 10",
    "City": "LX",
    "PostalCode": "1000-123",
    "Phone": "960000000"
  },
  "KiosCode": null,
  "RescheduleDate": null,
  "CreatedBy": "teste"
});
request.headers.addAll(headers);

http.StreamedResponse response = await request.send();

if (response.statusCode == 200) {
  print(await response.stream.bytesToString());
}
else {
  print(response.reasonPhrase);
}

```

#### Go
```go=
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://crmgateway-qua.vaspexpresso.pt/api/services/reschedulepickup"
  method := "POST"

  payload := strings.NewReader(`{"ServiceId":10905,"ChangeType":1,"Address":{"Street":"Rua Alto do Monte, nr 10","City":"LX","PostalCode":"1000-123","Phone":"960000000"},"KiosCode":null,"RescheduleDate":null,"CreatedBy":"teste"}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTA1MzM0NzIsImV4cCI6MTY1MDUzNzA3MiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTA1MzM0NzIsInNjb3BlIjpbInNlcnZpY2VzYXBpLnJlc2NoZWR1bGVwaWNrdXAiXX0.FRiqU6hkJHZrHhfUC47HxMIF8K1OR2LRo5ItNrzg7yRMRwLKAC_eWR7EW23qpJeGnpc6u7axSSyRemr0unEvof6_wcGZbrnWAQjw9tWZXBgveIZHD9Tbh1MYuDeyZPkL5Bhk815n_zoe-1REYPcUl6dGCNTDAtCNNA4Gt8jmCd7E5X8QdUO_cNH06GOvAD-80rf2Xs1q-OU8Ola_RboBVt7kVlww7YJjAzQeJGwZDnQaKL3-GJnXHYqPjcwc1xGqN-0etVFqGpCdg4_KyUBydM6HTp8WQuaNQxx7LhCF1to-Fa8kAK2OEK7adPswlPv2yg3_e227r0yfRdkC5Um_sA")
  req.Header.Add("Content-Type", "application/json")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```

#### Java
```java=
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://crmgateway-qua.vaspexpresso.pt/api/services/reschedulepickup")
  .header("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTA1MzM0NzIsImV4cCI6MTY1MDUzNzA3MiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTA1MzM0NzIsInNjb3BlIjpbInNlcnZpY2VzYXBpLnJlc2NoZWR1bGVwaWNrdXAiXX0.FRiqU6hkJHZrHhfUC47HxMIF8K1OR2LRo5ItNrzg7yRMRwLKAC_eWR7EW23qpJeGnpc6u7axSSyRemr0unEvof6_wcGZbrnWAQjw9tWZXBgveIZHD9Tbh1MYuDeyZPkL5Bhk815n_zoe-1REYPcUl6dGCNTDAtCNNA4Gt8jmCd7E5X8QdUO_cNH06GOvAD-80rf2Xs1q-OU8Ola_RboBVt7kVlww7YJjAzQeJGwZDnQaKL3-GJnXHYqPjcwc1xGqN-0etVFqGpCdg4_KyUBydM6HTp8WQuaNQxx7LhCF1to-Fa8kAK2OEK7adPswlPv2yg3_e227r0yfRdkC5Um_sA")
  .header("Content-Type", "application/json")
  .body("{\"ServiceId\":10905,\"ChangeType\":1,\"Address\":{\"Street\":\"Rua Alto do Monte, nr 10\",\"City\":\"LX\",\"PostalCode\":\"1000-123\",\"Phone\":\"960000000\"},\"KiosCode\":null,\"RescheduleDate\":null,\"CreatedBy\":\"teste\"}")
  .asString();

```

#### Javascript
```javascript=
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTA1MzM0NzIsImV4cCI6MTY1MDUzNzA3MiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTA1MzM0NzIsInNjb3BlIjpbInNlcnZpY2VzYXBpLnJlc2NoZWR1bGVwaWNrdXAiXX0.FRiqU6hkJHZrHhfUC47HxMIF8K1OR2LRo5ItNrzg7yRMRwLKAC_eWR7EW23qpJeGnpc6u7axSSyRemr0unEvof6_wcGZbrnWAQjw9tWZXBgveIZHD9Tbh1MYuDeyZPkL5Bhk815n_zoe-1REYPcUl6dGCNTDAtCNNA4Gt8jmCd7E5X8QdUO_cNH06GOvAD-80rf2Xs1q-OU8Ola_RboBVt7kVlww7YJjAzQeJGwZDnQaKL3-GJnXHYqPjcwc1xGqN-0etVFqGpCdg4_KyUBydM6HTp8WQuaNQxx7LhCF1to-Fa8kAK2OEK7adPswlPv2yg3_e227r0yfRdkC5Um_sA");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "ServiceId": 10905,
  "ChangeType": 1,
  "Address": {
    "Street": "Rua Alto do Monte, nr 10",
    "City": "LX",
    "PostalCode": "1000-123",
    "Phone": "960000000"
  },
  "KiosCode": null,
  "RescheduleDate": null,
  "CreatedBy": "teste"
});

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

fetch("https://crmgateway-qua.vaspexpresso.pt/api/services/reschedulepickup", 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://crmgateway-qua.vaspexpresso.pt/api/services/reschedulepickup',
  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 =>'{"ServiceId":10905,"ChangeType":1,"Address":{"Street":"Rua Alto do Monte, nr 10","City":"LX","PostalCode":"1000-123","Phone":"960000000"},"KiosCode":null,"RescheduleDate":null,"CreatedBy":"teste"}',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTA1MzM0NzIsImV4cCI6MTY1MDUzNzA3MiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTA1MzM0NzIsInNjb3BlIjpbInNlcnZpY2VzYXBpLnJlc2NoZWR1bGVwaWNrdXAiXX0.FRiqU6hkJHZrHhfUC47HxMIF8K1OR2LRo5ItNrzg7yRMRwLKAC_eWR7EW23qpJeGnpc6u7axSSyRemr0unEvof6_wcGZbrnWAQjw9tWZXBgveIZHD9Tbh1MYuDeyZPkL5Bhk815n_zoe-1REYPcUl6dGCNTDAtCNNA4Gt8jmCd7E5X8QdUO_cNH06GOvAD-80rf2Xs1q-OU8Ola_RboBVt7kVlww7YJjAzQeJGwZDnQaKL3-GJnXHYqPjcwc1xGqN-0etVFqGpCdg4_KyUBydM6HTp8WQuaNQxx7LhCF1to-Fa8kAK2OEK7adPswlPv2yg3_e227r0yfRdkC5Um_sA',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

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

conn = http.client.HTTPSConnection("crmgateway-qua.vaspexpresso.pt")
payload = json.dumps({
  "ServiceId": 10905,
  "ChangeType": 1,
  "Address": {
    "Street": "Rua Alto do Monte, nr 10",
    "City": "LX",
    "PostalCode": "1000-123",
    "Phone": "960000000"
  },
  "KiosCode": None,
  "RescheduleDate": None,
  "CreatedBy": "teste"
})
headers = {
  'Authorization': 'Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTA1MzM0NzIsImV4cCI6MTY1MDUzNzA3MiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTA1MzM0NzIsInNjb3BlIjpbInNlcnZpY2VzYXBpLnJlc2NoZWR1bGVwaWNrdXAiXX0.FRiqU6hkJHZrHhfUC47HxMIF8K1OR2LRo5ItNrzg7yRMRwLKAC_eWR7EW23qpJeGnpc6u7axSSyRemr0unEvof6_wcGZbrnWAQjw9tWZXBgveIZHD9Tbh1MYuDeyZPkL5Bhk815n_zoe-1REYPcUl6dGCNTDAtCNNA4Gt8jmCd7E5X8QdUO_cNH06GOvAD-80rf2Xs1q-OU8Ola_RboBVt7kVlww7YJjAzQeJGwZDnQaKL3-GJnXHYqPjcwc1xGqN-0etVFqGpCdg4_KyUBydM6HTp8WQuaNQxx7LhCF1to-Fa8kAK2OEK7adPswlPv2yg3_e227r0yfRdkC5Um_sA',
  'Content-Type': 'application/json'
}
conn.request("POST", "/api/services/reschedulepickup", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```




## Obter lista de serviços paginados por morada
### Input
:::info
`GET https://crmgateway-qua.vaspexpresso.pt/api/services/address/MLP%20-%20Quinta%20do%20Grajal%20Venda%20Seca/1/10`

**Header**
|Campo|Descrição|Obrigatório|
|-|-|-|
|Authorization| Json web token | Sim |

**Url**
|Campo|Descrição|Obrigatório|
|-|-|-|
|address | Morada | Sim |
|page | Número da página pretendida| Sim |
|pageSize | Número de registos por página (não devolve mais de 20)| Sim |

**OpenId**
|Scope|
|-|
| servicesapi.getbyaddress |

**Exemplo:**

```
GET https://crmgateway-qua.vaspexpresso.pt/api/services/address/MLP%20-%20Quinta%20do%20Grajal%20Venda%20Seca/1/10 HTTP/1.1
Host: crmgateway-qua.vaspexpresso.pt
Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTExNjA2MzIsImV4cCI6MTY1MTE2NDIzMiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTExNjA2MzIsInNjb3BlIjpbInNlcnZpY2VzYXBpLmdldGJ5YWRkcmVzcyJdfQ.NGTVEgIGV_dDLx2tM9I2oqIFlCeNBM0E65X9QUIBEJwqQFAJH03EV_GT9805H2KwZk9ma4m5_o9nr8BPSbYDwr96VmqtlxZybuWIWGLcph_QHnWg6g7CwbcGJBbmxuDBL5krWFwmGSjMKr6YWrV4DE5KLFcxPb2IgtCWY05QRC8oTTwF2CXTeScL4IzBVX-1eFxfCpRDNpGVwObcQUO0yKwy1IHW7xQ-RsDL7HtlSaGj84gq-jZhH-fYQtNVdGWFBZKh3p2Yg9qVWIuSj4sUiOfmeVx85fScIgMzA8Rvou-j4rM5o9KQSu4PvKH1bqD2ysUXCa3xu72bqSdPhQLbHw
Accept-Encoding: gzip, deflate
```
:::


### Output
:::success
**OK : 200**

**Body**
|Campo|Descrição|Tipo|
|-|-|-|
|Services|Listagem de serviços|Lista de services| 
|totalCount|Número total de resultados da pesquisa|Número| 

**Service**
|Campo|Descrição|Tipo|
|-|-|-|
|ServiceId|Id do serviço|Número| 
|ClientId|Id do cliente|Número| 
|ServiceBarCode|Código de barras|Texto| 
|ClientReference|Referência do Cliente|Texto|
|NumberOfVolumes|Número de volumes|Número|
|TotalWeightOfVolumes|Peso total de volumes|Decimal|
|Amount|Montante|Decimal| 
|Instructions|Instruções|Texto| 
|DeliveryDate|Data de entrega|Data| 
|PickingDate|Data de recolha|Data| 
|PreferentialPeriod|Período preferencial de entrega|Texto| 
|SenderClientCode|Código do Cliente Remetente|Texto| 
|SenderName|Nome do remetente|Texto| 
|SenderContactName|Nome do contato do remetente|Texto| 
|SenderContactPhoneNumber|Número de telefone de contato do remetente|Texto| 
|SenderContactEmail|E-mail de contato do remetente|Texto| 
|SenderAddress|Morada do remetente|Texto| 
|SenderAddressPlace |Localidade da morada do remetente|Texto| 
|SenderAddressZipCode|Código postal da morada do remetente|Texto| 
|SenderAddressZipCodePlace|Localidade postal do remetente |Texto|
|SenderAddressCountryCode|Código do país da morada do remetente|Texto| 
|ReceiverClientCode|Código do Cliente destinatário|Texto| 
|ReceiverName|Nome do destinatário|Texto| 
|ReceiverContactName|Nome do contato do destinatário|Texto| 
|ReceiverContactPhoneNumber|Número de telefone de contato do destinatário|Texto| 
|ReceiverContactEmail|E-mail de contato do destinatário|Texto| 
|ReceiverAddress|Morada do destinatário|Texto| 
|ReceiverAddressPlace |Localidade da morada do destinatário|Texto| 
|ReceiverAddressZipCode|Código postal da morada do destinatário|Texto| 
|ReceiverAddressZipCodePlace|Localidade postal do destinatário |Texto|
|ReceiverAddressCountryCode|Código do país da morada do destinatário|Texto| 
|ReceiverFixedInstructions|Instruções fixas do destinatário|Texto| 
|PinNumber|Nr do pin para envio para Kios|Texto|
|ETA|Data estimada de chegada|Texto|
|CreatedBy|Nome de quem fez a operação|Texto| 
|CreatedDateUtc|Data de criação|Data| 
|UpdatedBy|Nome de quem fez a operação|Texto| 
|UpdatedDateUtc|Data de alteração|Data| 
|Volumes|Volumes|Volume| 
|ServiceTypes|Tipos de serviço|Lista de Objectos|
|ServiceAttributes|Atributos de serviço|Lista de Objectos |
|ServicePayments|Tipos de pagamento|Lista de Objectos|
|PickUpType|Tipo de recolha|Objecto|
|ClientType|Tipo de cliente `(B2B, B2C)`|Objecto|
|Fleet|Tipo de frota `(Frota VASP Expresso, Frota Same Day)`|Objecto|
|Client|Cliente expedidor|Objecto| 
<!--- |ClientAddress|Morada do cliente Vasp Expresso associada ao serviço|--->


**Volume**
|Campo|Descrição|Tipo|
|-|-|-|
|VolumeId|Id do volume|Número| 
|ServiceId|Id do serviço|Número| 
|VolumeBarCode|Código de barras do volume|String| 
|VolumeBarCode2|Código de barras do volume 2|String| 
|VolumeNumber|Número do volume|Número|
|Weight|Peso|Decimal| 
|Width|Largura|Decimal|
|Length|Comprimento|Decimal|
|Height|Altura|Decimal| 
|IsToReprint|Etiqueta vai ser reimpressa|boleano|
|RemovedFromService|Volume removido do serviço|boleano|
|CreatedBy|Nome de quem fez a operação|Texto| 
|CreatedDateUtc|Data de criação|Data| 
|UpdatedBy|Nome de quem fez a operação|Texto| 
|UpdatedDateUtc|Data de alteração|Data| 

**ServiceType**
|Campo|Descrição|Tipo|
|-|-|-|
|ServiceTypeId|Id do tipo de serviço|Número| 
|ServiceTypeENG, ServiceTypePT, ServiceTypeES|Tipo de serviço `(Forward: Entrega; Reverse: Recolha e Entrega; Rto - Return To Origin: Devolução)`|Texto|
|CreatedBy|Nome de quem fez a operação|Texto| 
|CreatedDateUtc|Data de criação|Data| 
|UpdatedBy|Nome de quem fez a operação|Texto| 
|UpdatedDateUtc|Data de alteração|Data| 

**ServiceAttribute**
|Campo|Descrição|Tipo|
|-|-|-|
|ServiceTypeId|Id do tipo de serviço|Número| 
|ServiceAttributeENG, ServiceAttributeES, ServiceAttributePT|Atributo do serviço `(Pod, Sms, Palete, Aéreo, Marítimo, Sábado, Domingo, Mesmo dia, Pré-Pago, Cobrança, Internacional, Envio Kios, Entrega Kios, Adhoc, Manhã, Dedicado, Báscula, Palete Americana, Id do Documento, Meia Palete, Noite, Serviço de Frio, Feriado)`|Texto|
|CreatedBy|Nome de quem fez a operação|Texto| 
|CreatedDateUtc|Data de criação|Data| 
|UpdatedBy|Nome de quem fez a operação|Texto| 
|UpdatedDateUtc|Data de alteração|Data| 

**ServicePayment**
|Campo|Descrição|Tipo|
|-|-|-|
|ServicePaymentId|Id do tipo de pagamento|Número| 
|ServicePaymentENG, ServicePaymentES, ServicePaymentPT|Atributo do serviço `(ATM, Cheque, Dinheiro)`|Texto|
|CreatedBy|Nome de quem fez a operação|Texto| 
|CreatedDateUtc|Data de criação|Data| 
|UpdatedBy|Nome de quem fez a operação|Texto| 
|UpdatedDateUtc|Data de alteração|Data| 

**PickUpType**
|Campo|Descrição|Tipo|
|-|-|-|
|PickUpTypeId|Id do tipo de recolha|Número| 
|PickUpTypeENG, PickUpTypeES, PickUpTypePT|Tipo de recolha `(Field	: Levantado no local; DropOff: Entregue nas instalações)`|Texto|
|CreatedBy|Nome de quem fez a operação|Texto| 
|CreatedDateUtc|Data de criação|Data| 
|UpdatedBy|Nome de quem fez a operação|Texto| 
|UpdatedDateUtc|Data de alteração|Data| 

**ClientType**
|Campo|Descrição|Tipo|
|-|-|-|
|ClientTypeId|Id do tipo de cliente|Número| 
|Type| `B2B, B2C` |Texto|
|CreatedBy|Nome de quem fez a operação|Texto| 
|CreatedDateUtc|Data de criação|Data| 
|UpdatedBy|Nome de quem fez a operação|Texto| 
|UpdatedDateUtc|Data de alteração|Data| 

**Fleet**
|Campo|Descrição|Tipo|
|-|-|-|
|FleetId|Id do tipo de frota|Número| 
|Type| `Frota VASP Expresso, Frota Same Day` |Texto|
|CreatedBy|Nome de quem fez a operação|Texto| 
|CreatedDateUtc|Data de criação|Data| 
|UpdatedBy|Nome de quem fez a operação|Texto| 
|UpdatedDateUtc|Data de alteração|Data| 

**Client**
|Campo|Descrição|Tipo|
|-|-|-|
|ClientId|Id do cliente|Número| 
|ClientCode|Código do cliente|Texto|
|Name|Nome da empresa|Texto|
|ContactName|Nome de contacto da empresa|Texto| 
|ContactPhoneNumber|Número de contacto|Texto| 
|ContactEmail|E-mail de contacto|Texto| 
|ClientAddresses|Moradas associadas|Lista de Objectos| 
|ClientTypeId|Id do tipo de cliente|Número| 
|CreatedBy|Nome de quem fez a operação|Texto| 
|CreatedDateUtc|Data de criação|Data| 
|UpdatedBy|Nome de quem fez a operação|Texto| 
|UpdatedDateUtc|Data de alteração|Data| 
|Active|Cliente está activo|Boleano| 
<!--- 
**ClientAddress**
|Campo|Descrição|Tipo|
|-|-|-|
|ClientAddressId|Id da morada do cliente|Número| 
|ClientId|Id do cliente|Número| 
|ContactName|Nome de contacto da empresa|Texto| 
|ContactPhoneNumber|Número de contacto|Texto| 
|AddressCode|Código da morada|Texto|
|Address|Morada|Texto| 
|AddressPlace |Localidade|Texto| 
|AddressZipCode|Código postal|Texto| 
|AddressZipCodePlace|Localidade postal|Texto|
|AddressCountryCode|Código do país|Texto| 
|Latitude|Latitude|Decimal| 
|Longitude|Longitude|Decimal| 
|CreatedBy|Nome de quem fez a operação|Texto| 
|CreatedDateUtc|Data de criação|Data| 
|UpdatedBy|Nome de quem fez a operação|Texto| 
|UpdatedDateUtc|Data de alteração|Data| 
|Active|Cliente está activo|Boleano| 
--->
**Exemplo:**

```
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/10.0
Request-Context: appId=cid-v1:43a95f72-78b8-4b70-82fd-c33600ccd399
Strict-Transport-Security: max-age=2592000
X-Powered-By: ASP.NET
X-Powered-By: ASP.NET
Date: Wed, 20 Apr 2022 13:57:17 GMT
Content-Length: 4143

{
   "services":[
      {
         "volumes":[
            {
               "volumeId":2534690,
               "serviceId":1423963,
               "volumeBarCode":"DEL0289221001351001_15574074",
               "volumeNumber":1,
               "weight":2.000,
               "createdBy":"VASP\\servicelogon",
               "createdDateUtc":"2021-05-03T11:26:01.6566667",
               "updatedBy":"teste",
               "updatedDateUtc":"2022-03-30T20:16:51.280578",
               "height":0.000,
               "length":0.000,
               "width":0.000,
               "sinchronizationOrigin":"DMS",
               "isToReprint":null,
               "eyepeakServiceId":8864970,
               "eyepeakVolumeId":15574074,
               "volumeBarCode2":null,
               "removedFromService":false
            },
            {
               "volumeId":2534691,
               "serviceId":1423963,
               "volumeBarCode":"DEL0289221001351002_15574075",
               "volumeNumber":2,
               "weight":1.575,
               "createdBy":"VASP\\servicelogon",
               "createdDateUtc":"2021-05-03T11:26:01.6566667",
               "updatedBy":null,
               "updatedDateUtc":null,
               "height":null,
               "length":null,
               "width":null,
               "sinchronizationOrigin":"DMS",
               "isToReprint":null,
               "eyepeakServiceId":8864970,
               "eyepeakVolumeId":15574075,
               "volumeBarCode2":null,
               "removedFromService":false
            }
         ],
         "serviceTypes":[
            {
               "serviceTypeId":1,
               "createdBy":"vasp\\flacerda",
               "createdDateUtc":"2020-06-26T14:56:33.4804786",
               "updatedBy":"vasp\\flacerda",
               "updatedDateUtc":"2021-06-22T08:46:50.0969714",
               "serviceTypeENG":"Forward",
               "serviceTypeES":"Entrega",
               "serviceTypePT":"Entrega"
            }
         ],
         "serviceAttributes":[
            {
               "serviceAttributeId":9,
               "createdBy":"vasp\\flacerda",
               "createdDateUtc":"2020-06-26T14:56:33.4804786",
               "updatedBy":"vasp\\flacerda",
               "updatedDateUtc":"2021-06-21T22:09:35.7823606",
               "serviceAttributeENG":"PrePaid",
               "serviceAttributeES":"Pagado por Adelantado",
               "serviceAttributePT":"Pré-Pago",
               "serviceAttributeCategoryId":5
            },
            {
               "serviceAttributeId":13,
               "createdBy":"vasp\\flacerda",
               "createdDateUtc":"2020-06-26T14:56:33.4804786",
               "updatedBy":"vasp\\flacerda",
               "updatedDateUtc":"2021-06-21T22:09:35.7823606",
               "serviceAttributeENG":"Pudo Delivery",
               "serviceAttributeES":"Entrega Pudo",
               "serviceAttributePT":"Entrega Kios",
               "serviceAttributeCategoryId":6
            }
         ],
         "servicePayments":[
            
         ],
         "client":{
            "clientId":1393,
            "clientCode":"C1285",
            "name":"ARTERO INSPIRING STYLE, S.A.",
            "contactName":"S/ Contacto",
            "contactPhoneNumber":"0034670 052 440",
            "contactEmail":"daviddeviguri@artero.com;artero.portugal@artero.com;soniamanguillot@artero.com",
            "clientTypeId":1,
            "addressCode":null,
            "createdBy":"VASP\\jpaulo",
            "createdDateUtc":"2020-11-12T18:29:12.48",
            "updatedBy":"pmalmeida@vasp.pt",
            "updatedDateUtc":"2021-09-15T12:58:58.3",
            "active":true
         },
         "pickUpType":{
            "pickUpTypeId":2,
            "pickUpTypeENG":"DropOff",
            "pickUpTypePT":"Entregue nas instalações",
            "pickUpTypeES":"Entregado a las instalaciones",
            "createdBy":"vasp\\flacerda",
            "createdDateUtc":"2020-06-26T14:56:33.4804786",
            "updatedBy":"vasp\\flacerda",
            "updatedDateUtc":"2020-09-25T09:40:01.2905405"
         },
         "clientType":{
            "clientTypeId":1,
            "type":"B2B",
            "createdBy":"vasp\\flacerda",
            "createdDateUtc":"2020-06-09T11:24:33.8277235",
            "updatedBy":"vasp\\flacerda",
            "updatedDateUtc":"2020-06-09T11:24:33.8277235"
         },
         "fleet":null,
         "serviceId":1423963,
         "clientId":1393,
         "clientReference":"21130532",
         "numberOfVolumes":2,
         "totalWeightOfVolumes":1.000,
         "amount":0.00,
         "instructions":"POSSÃ\u008DVEL LOJA",
         "preferentialPeriod":null,
         "senderClientCode":"01",
         "senderName":"ARTERO",
         "senderContactName":"",
         "senderContactPhoneNumber":"",
         "senderContactEmail":"",
         "senderAddressPlace":"DALT",
         "senderAddressZipCode":"0034-000",
         "senderAddressZipCodePlace":"Espanha",
         "senderAddressCountryCode":"PT",
         "receiverClientCode":"",
         "receiverName":"CRISAN, ANIELA",
         "receiverContactName":"VASP24",
         "receiverContactPhoneNumber":"960000000",
         "receiverContactEmail":"aniela.crisan@gmail.com",
         "receiverAddressPlace":"LX",
         "receiverAddressZipCode":"1000-123",
         "receiverAddressZipCodePlace":"LX",
         "receiverAddressCountryCode":"PT",
         "receiverFixedInstructions":"",
         "createdBy":"VASP\\servicelogon",
         "createdDateUtc":"2021-05-03T11:21:00",
         "updatedBy":"TrackMyParcel",
         "updatedDateUtc":"2022-04-05T16:21:46.9531638",
         "serviceBarCode":"0289221001351",
         "receiverAddress":"Rua Alto do Monte, nr 10",
         "senderAddress":"NARCIS MONTURIOL, 2-4 VILASSAR DE",
         "sinchronizationOrigin":"DMS",
         "pinNumber":"8736",
         "clientAddressId":4280,
         "clientTypeId":1,
         "pickUpTypeId":2,
         "fleetId":1,
         "eta":null,
         "eyepeakServiceId":8864970,
         "bookStoreId":null,
         "pickingDate":null,
         "deliveryDate":"2022-04-07T17:21:46.8821023"
      }
   ],
   "totalCount":367
}
```
:::
:::warning
**Unauthorized : 401**
Credenciais incorrectas
:::


### Código Exemplo
#### cURL
```curl=
curl --location --request GET 'https://crmgateway-qua.vaspexpresso.pt/api/services/address/MLP%20-%20Quinta%20do%20Grajal%20Venda%20Seca/1/10' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTA1MzM0NzIsImV4cCI6MTY1MDUzNzA3MiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTA1MzM0NzIsInNjb3BlIjpbInNlcnZpY2VzYXBpLnJlc2NoZWR1bGVwaWNrdXAiXX0.FRiqU6hkJHZrHhfUC47HxMIF8K1OR2LRo5ItNrzg7yRMRwLKAC_eWR7EW23qpJeGnpc6u7axSSyRemr0unEvof6_wcGZbrnWAQjw9tWZXBgveIZHD9Tbh1MYuDeyZPkL5Bhk815n_zoe-1REYPcUl6dGCNTDAtCNNA4Gt8jmCd7E5X8QdUO_cNH06GOvAD-80rf2Xs1q-OU8Ola_RboBVt7kVlww7YJjAzQeJGwZDnQaKL3-GJnXHYqPjcwc1xGqN-0etVFqGpCdg4_KyUBydM6HTp8WQuaNQxx7LhCF1to-Fa8kAK2OEK7adPswlPv2yg3_e227r0yfRdkC5Um_sA'
```


#### C#
```csharp=
var client = new RestClient("https://crmgateway-qua.vaspexpresso.pt/api/services/address/MLP%20-%20Quinta%20do%20Grajal%20Venda%20Seca/1/10");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTA1MzM0NzIsImV4cCI6MTY1MDUzNzA3MiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTA1MzM0NzIsInNjb3BlIjpbInNlcnZpY2VzYXBpLnJlc2NoZWR1bGVwaWNrdXAiXX0.FRiqU6hkJHZrHhfUC47HxMIF8K1OR2LRo5ItNrzg7yRMRwLKAC_eWR7EW23qpJeGnpc6u7axSSyRemr0unEvof6_wcGZbrnWAQjw9tWZXBgveIZHD9Tbh1MYuDeyZPkL5Bhk815n_zoe-1REYPcUl6dGCNTDAtCNNA4Gt8jmCd7E5X8QdUO_cNH06GOvAD-80rf2Xs1q-OU8Ola_RboBVt7kVlww7YJjAzQeJGwZDnQaKL3-GJnXHYqPjcwc1xGqN-0etVFqGpCdg4_KyUBydM6HTp8WQuaNQxx7LhCF1to-Fa8kAK2OEK7adPswlPv2yg3_e227r0yfRdkC5Um_sA");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
```

#### Dart
```dart=
var headers = {
  'Authorization': 'Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTA1MzM0NzIsImV4cCI6MTY1MDUzNzA3MiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTA1MzM0NzIsInNjb3BlIjpbInNlcnZpY2VzYXBpLnJlc2NoZWR1bGVwaWNrdXAiXX0.FRiqU6hkJHZrHhfUC47HxMIF8K1OR2LRo5ItNrzg7yRMRwLKAC_eWR7EW23qpJeGnpc6u7axSSyRemr0unEvof6_wcGZbrnWAQjw9tWZXBgveIZHD9Tbh1MYuDeyZPkL5Bhk815n_zoe-1REYPcUl6dGCNTDAtCNNA4Gt8jmCd7E5X8QdUO_cNH06GOvAD-80rf2Xs1q-OU8Ola_RboBVt7kVlww7YJjAzQeJGwZDnQaKL3-GJnXHYqPjcwc1xGqN-0etVFqGpCdg4_KyUBydM6HTp8WQuaNQxx7LhCF1to-Fa8kAK2OEK7adPswlPv2yg3_e227r0yfRdkC5Um_sA'
};
var request = http.Request('GET', Uri.parse('https://crmgateway-qua.vaspexpresso.pt/api/services/address/MLP%20-%20Quinta%20do%20Grajal%20Venda%20Seca/1/10'));

request.headers.addAll(headers);

http.StreamedResponse response = await request.send();

if (response.statusCode == 200) {
  print(await response.stream.bytesToString());
}
else {
  print(response.reasonPhrase);
}

```

#### Go
```go=
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://crmgateway-qua.vaspexpresso.pt/api/services/address/MLP%2520-%2520Quinta%2520do%2520Grajal%2520Venda%2520Seca/1/10"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTA1MzM0NzIsImV4cCI6MTY1MDUzNzA3MiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTA1MzM0NzIsInNjb3BlIjpbInNlcnZpY2VzYXBpLnJlc2NoZWR1bGVwaWNrdXAiXX0.FRiqU6hkJHZrHhfUC47HxMIF8K1OR2LRo5ItNrzg7yRMRwLKAC_eWR7EW23qpJeGnpc6u7axSSyRemr0unEvof6_wcGZbrnWAQjw9tWZXBgveIZHD9Tbh1MYuDeyZPkL5Bhk815n_zoe-1REYPcUl6dGCNTDAtCNNA4Gt8jmCd7E5X8QdUO_cNH06GOvAD-80rf2Xs1q-OU8Ola_RboBVt7kVlww7YJjAzQeJGwZDnQaKL3-GJnXHYqPjcwc1xGqN-0etVFqGpCdg4_KyUBydM6HTp8WQuaNQxx7LhCF1to-Fa8kAK2OEK7adPswlPv2yg3_e227r0yfRdkC5Um_sA")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```

#### Java
```java=
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get("https://crmgateway-qua.vaspexpresso.pt/api/services/address/MLP%20-%20Quinta%20do%20Grajal%20Venda%20Seca/1/10")
  .header("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTA1MzM0NzIsImV4cCI6MTY1MDUzNzA3MiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTA1MzM0NzIsInNjb3BlIjpbInNlcnZpY2VzYXBpLnJlc2NoZWR1bGVwaWNrdXAiXX0.FRiqU6hkJHZrHhfUC47HxMIF8K1OR2LRo5ItNrzg7yRMRwLKAC_eWR7EW23qpJeGnpc6u7axSSyRemr0unEvof6_wcGZbrnWAQjw9tWZXBgveIZHD9Tbh1MYuDeyZPkL5Bhk815n_zoe-1REYPcUl6dGCNTDAtCNNA4Gt8jmCd7E5X8QdUO_cNH06GOvAD-80rf2Xs1q-OU8Ola_RboBVt7kVlww7YJjAzQeJGwZDnQaKL3-GJnXHYqPjcwc1xGqN-0etVFqGpCdg4_KyUBydM6HTp8WQuaNQxx7LhCF1to-Fa8kAK2OEK7adPswlPv2yg3_e227r0yfRdkC5Um_sA")
  .asString();
```

#### Javascript
```javascript=
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTA1MzM0NzIsImV4cCI6MTY1MDUzNzA3MiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTA1MzM0NzIsInNjb3BlIjpbInNlcnZpY2VzYXBpLnJlc2NoZWR1bGVwaWNrdXAiXX0.FRiqU6hkJHZrHhfUC47HxMIF8K1OR2LRo5ItNrzg7yRMRwLKAC_eWR7EW23qpJeGnpc6u7axSSyRemr0unEvof6_wcGZbrnWAQjw9tWZXBgveIZHD9Tbh1MYuDeyZPkL5Bhk815n_zoe-1REYPcUl6dGCNTDAtCNNA4Gt8jmCd7E5X8QdUO_cNH06GOvAD-80rf2Xs1q-OU8Ola_RboBVt7kVlww7YJjAzQeJGwZDnQaKL3-GJnXHYqPjcwc1xGqN-0etVFqGpCdg4_KyUBydM6HTp8WQuaNQxx7LhCF1to-Fa8kAK2OEK7adPswlPv2yg3_e227r0yfRdkC5Um_sA");

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

fetch("https://crmgateway-qua.vaspexpresso.pt/api/services/address/MLP%20-%20Quinta%20do%20Grajal%20Venda%20Seca/1/10", 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://crmgateway-qua.vaspexpresso.pt/api/services/address/MLP%2520-%2520Quinta%2520do%2520Grajal%2520Venda%2520Seca/1/10',
  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 eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTA1MzM0NzIsImV4cCI6MTY1MDUzNzA3MiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTA1MzM0NzIsInNjb3BlIjpbInNlcnZpY2VzYXBpLnJlc2NoZWR1bGVwaWNrdXAiXX0.FRiqU6hkJHZrHhfUC47HxMIF8K1OR2LRo5ItNrzg7yRMRwLKAC_eWR7EW23qpJeGnpc6u7axSSyRemr0unEvof6_wcGZbrnWAQjw9tWZXBgveIZHD9Tbh1MYuDeyZPkL5Bhk815n_zoe-1REYPcUl6dGCNTDAtCNNA4Gt8jmCd7E5X8QdUO_cNH06GOvAD-80rf2Xs1q-OU8Ola_RboBVt7kVlww7YJjAzQeJGwZDnQaKL3-GJnXHYqPjcwc1xGqN-0etVFqGpCdg4_KyUBydM6HTp8WQuaNQxx7LhCF1to-Fa8kAK2OEK7adPswlPv2yg3_e227r0yfRdkC5Um_sA'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```


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

conn = http.client.HTTPSConnection("crmgateway-qua.vaspexpresso.pt")
payload = ''
headers = {
  'Authorization': 'Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkNEQTY3QUUxMUY2M0UwODA4RTdFOTAyMzMxRkRBMTExIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NTA1MzM0NzIsImV4cCI6MTY1MDUzNzA3MiwiaXNzIjoiaHR0cHM6Ly9haXAtcXVhLnZhc3AucHQiLCJhdWQiOiJTZXJ2aWNlc0FwaSIsImNsaWVudF9pZCI6IkNSTUdhdGV3YXkiLCJpYXQiOjE2NTA1MzM0NzIsInNjb3BlIjpbInNlcnZpY2VzYXBpLnJlc2NoZWR1bGVwaWNrdXAiXX0.FRiqU6hkJHZrHhfUC47HxMIF8K1OR2LRo5ItNrzg7yRMRwLKAC_eWR7EW23qpJeGnpc6u7axSSyRemr0unEvof6_wcGZbrnWAQjw9tWZXBgveIZHD9Tbh1MYuDeyZPkL5Bhk815n_zoe-1REYPcUl6dGCNTDAtCNNA4Gt8jmCd7E5X8QdUO_cNH06GOvAD-80rf2Xs1q-OU8Ola_RboBVt7kVlww7YJjAzQeJGwZDnQaKL3-GJnXHYqPjcwc1xGqN-0etVFqGpCdg4_KyUBydM6HTp8WQuaNQxx7LhCF1to-Fa8kAK2OEK7adPswlPv2yg3_e227r0yfRdkC5Um_sA'
}
conn.request("GET", "/api/services/address/MLP%20-%20Quinta%20do%20Grajal%20Venda%20Seca/1/10", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```

