Locations are known places, such as a warehouse or a terminal, that shipments can refer to by their code. Locations can be managed in the QuayConnect web application, and they can also be created with the API.
Shipments refer to a location by its code, so the code has to be unique within your organization. A commonly used code is the postal code combined with the house number, which is unique in the Netherlands. If a location with the same code already exists, a status code 409 (Conflict) is returned.
The code and an address with a 2-letter country code are required. The name, the other address fields and the service configuration (serviceBinding) are optional. On success a status code 201 (Created) is returned together with the created location.
You can create a location for a client organization by adding its domain in the onBehalf field. This is only possible for Intermediary organizations and for service providers that have a relation with the client. Otherwise a status code 401 (Unauthorized) is returned.
Here is an example API request for creating a location:
POST https://api.quayconnect.io/v2/shipments/locations
Headers:
Authorization: Bearer your-access-token
Content-Type: application/json
Body:
{
"code": "3011AA1",
"name": "Rotterdam warehouse",
"address": {
"street": "Erasmusbrug",
"houseNumber": "1",
"postalCode": "3011AA",
"city": "Rotterdam",
"country": "NL"
}
}