v1
latestOpenAPI 3.0.02026-07-24189145350.1 KBPois
Add 1 or more Pois
GEOLOCALIZATION
New Pois can be geocoded when being created. There are some considerations to take into account:
- If latitude and longitude are present, it won't geocode based on the address, longAddress or geocodeByCep object. BUT will try to fetch an address with that coordinates and if it's a valid one, it will be replace as the Poi address. IE: if latitude:0 and longitude:0, it will not geocode and will try to fetch an address from [0,0] but won't get any result, so the address will not change.
- If latitude and longitude are not present, it will prioritize the addresses in this order
- geocodeByCep: if this objects is present and is valid, address and longAddress will be ignored
- address: if this objects is present, longAddress will be ignored. IE If you dont't want to use address object, remove it entirely so that longAddress can be used
- longAddress: if this string is present, it will try to gecode based on this string.
post/pois
Request body
Example request
[
{
"visitingDaysDevice1": [
1,
2
],
"visitingDaysDevice2": [
1,
2
],
"visitingDaysDevice3": [
1,
2
],
"visitingDaysDevice4": [
1,
2
],
"timeWindow": [
{
"from": "08:00",
"to": "13:00"
}
]
}
]Response
On Error, meta object will contain an error array with these posible values
Error codes:
| Code | Description | Field |
|---|---|---|
| 1001 | Wrong time window object | timeWindow |
| 2002 | Wrong time window values, must be string | timeWindow |
| 2003 | Wrong time window, 'from' must be less than 'to' | timeWindow |
| 2004 | Wrong time window, times are overlapped | timeWindow |
| 2010 | Poi type not found or not allowed for this user | poiType |
| 2020 | Poi code already present for this user | code |
| 2021 | Poi code not found or not allowed for this user | code |
| 2023 | Nothing to update | |
| 2024 | Visiting frequency invalid | visitingFrequency |
| 2025 | Visiting days invalid | visitingDays |
| 5001 | Area code not present or not allowed for this user | salesAreaCode, deliveryAreaCode |
Example response
{
"data": [
{
"visitingDaysDevice1": [
1,
2
],
"visitingDaysDevice2": [
1,
2
],
"visitingDaysDevice3": [
1,
2
],
"visitingDaysDevice4": [
1,
2
],
"timeWindow": [
{
"from": "08:00",
"to": "13:00"
}
]
}
]
}