GENERAL INFORMATION
Purpose
This endpoint is used for creating Locations and updating them if they have been modified.
How the data is used
All the transactional data like sales and stock is connected to a location. Also the AI model generates transfers/stock targets on a location level, making it a mandatory dataset. In general all locations that either have stock and/or create revenue is determined as a location.
Best practices
It is needed to create your warehouse(s) as a location. Mostly the warehouse(s) that are involved in the replenishment/redistribution/initial distribution process.
It is also needed to create the brick and mortar store as a location and for the brick and mortar store the address of the location is mandatory if you need the AI model to generate predictions for these locations. We use the address data to establish the weather data which is crucial for the model, but the model also relies additional data that can be determined by the address, like demographic data.
If you also have online channels like webshops or apps, we recommend to create a location for each of these channels. This way you can connect these locationId’s in the POST /Sales endpoint to share the sales per channel. This is valuable especially if you want the AI model to generate predictions for these sales channels.
When you have B2B customers in your process, for example resellers of your product where you manage their inventory (VMI) and do the replenishment yourself, we also advise to create a location for each of your customer’s locations, so you are able to link the sales coming from their EDI sales reports to the correct location in the POST /Sales endpoint.
If you heavily depend on the GLN number of your locations/B2B customers, we recommend to share this GLN in this endpoint, because we can generate output using this GLN, like in the GET /Recommendations/transfers endpoint.
We can support multiple methods of sharing the address of the location, you can pick 1:
a. Sharing the address in multiple fields called streetName + houseNo + houseNoAddition + postalCode + city
b. Sharing the entire address string in 1 field called address
c. Using the latitude and longitude
For our redistribution functionality we can use the email field on the location to send an email to locations who have goods to redistribute, where we attach a PDF file with all the information. So if you already manage the email addresses of you location and you want to use the redistribution functionality it is recommended to implement this. You can also manage the email addresses of the locations in our portal, so it is not required.
Common pitfalls
Not aligning correctly with the business which types of locations needs to be created at Wair.
Location names must be clear and unique. Example:
❌ “H&M”
✅ “H&M Amsterdam”, “H&M Rotterdam”
This helps users easily identify and manage their stores.
TECHNICAL INFORMATION
Authentication
Bearer token, information on page POST /Token
Headers
Name | Description | Example |
|---|---|---|
X-Tenant | Tenant code supplied by Wair | “TENANT” |
QueryParameters:
Name | Description | Example |
|---|---|---|
fullLoad | See documentation: Integration core principles | true |
Body example:
{
"locations": [
{
"locationId": "1b935f00-dbf6-47eb-9e39-b3be667d44c3",
"code": "0001",
"name": "Store Amsterdam",
"gln": "5449000009067",
"postalCode": "0000AA",
"address": "Locationstreet 1",
"houseNo": "1",
"houseNoAddition": "a",
"streetName": "Locationstreet",
"city": "Amsterdam",
"country": "NLD",
"email": "0001@location.com",
"latitude": 26.357896,
"longitude": 127.783809,
"dateOpened": "2001-09-08T00:00:00.908Z",
"dateClosed": "2024-09-08T08:21:02.908Z"
}
]
}Additional information:
Fieldname | Context | Mandatory | Type / max field length |
|---|---|---|---|
locationId | Unique identifier for this location, for example a uuid, needs to be unique across all locations. If you want to update a location, send the location again using this id. | Yes | string / 80 characters max |
code | A business key of the brand, often recognizable to users | Yes | string / 60 characters max |
name | Name of the location, please check common pitfalls for this. | Yes | string / 75 characters max |
gln | This is the GS1 Global Location Number | No, but can be highly preferred, read best practices for this | string / 13 characters max |
postalCode | Read best practices how to correctly implement the address data of locations. Note that for brick and mortar stores address data is mandatory. | See context | string / 20 characters max |
address | Read best practices how to correctly implement the address data of locations. Note that for brick and mortar stores address data is mandatory. | See context | string / 125 characters max |
houseNo | Read best practices how to correctly implement the address data of locations. Note that for brick and mortar stores address data is mandatory. | See context | string / 50 characters max |
houseNoAddition | Read best practices how to correctly implement the address data of locations. Note that for brick and mortar stores address data is mandatory. | See context | string / 20 characters max |
streetName | Read best practices how to correctly implement the address data of locations. Note that for brick and mortar stores address data is mandatory. | See context | string / 125 characters max |
city | Read best practices how to correctly implement the address data of locations. Note that for brick and mortar stores address data is mandatory. | See context | string / 50 characters max |
country | Read best practices how to correctly implement the address data of locations. Note that for brick and mortar stores address data is mandatory. | See context | string / 100 characters max |
The email address of this location | No, but can be highly preferred, read best practices for this | string / 100 characters max | |
latitude | Read best practices how to correctly implement the address data of locations. Note that for brick and mortar stores address data is mandatory. | See context | decimal / coordinates |
longitude | Read best practices how to correctly implement the address data of locations. Note that for brick and mortar stores address data is mandatory. | See context | decimal / coordinates |
dateOpened | When the location was opened. | No | datetime |
dateClosed | When the location was closed, or will be closed. | No | datetime |
RESPONSE
StatusCodes:
200 = OK.
401 = Unauthorized, which means an expired/missing/invalid token.
400 = Bad request, see body of the response to check which validation errors have occured.
500 = System error, see body of the response to check which error has occured or contact integration support.
Body Example:
No body in the response.