v1

latestOpenAPI 3.0.02026-07-24189145350.1 KB
Pois

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
    1. geocodeByCep: if this objects is present and is valid, address and longAddress will be ignored
    2. 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
    3. longAddress: if this string is present, it will try to gecode based on this string.
post/pois

Request body

codestring required

Poi code

namestring required

Poi name

longAddressstring

Poi address

longitudenumber

Poi longitude coordinate

latitudenumber

Poi latitude coordinate

enabledboolean

Poi status

deliveryAreaCodestring

Poi delivery area code

salesAreaCodestring

Poi sale area code

poiTypestring

Poi type code from /poi/types

originalAddressstring

Poi first address entered

phoneNumberstring

Poi phone

taxIdstring

Poi taxId

radiusinteger

Poi radius (meters)

groupingstring

Poi grouping

visitingFrequency'weekly' | 'biweekly' | 'monthly'

Poi frequency

deviceId1string

ERP code - DEPRECATED

visitingDaysDevice1integer[]

Poi visiting day for deviceId1 "Monday -> 1, Sunday -> 7" - DEPRECATED

deviceId2string

ERP code - DEPRECATED

visitingDaysDevice2integer[]

Poi visiting day for deviceId2 "Monday -> 1, Sunday -> 7" - DEPRECATED

deviceId3string

ERP code - DEPRECATED

visitingDaysDevice3integer[]

Poi visiting day for deviceId3 "Monday -> 1, Sunday -> 7" - DEPRECATED

deviceId4string

ERP code - DEPRECATED

visitingDaysDevice4integer[]

Poi visiting day for deviceId4 "Monday -> 1, Sunday -> 7" - DEPRECATED

visitingOrderinteger

Poi visiting order - DEPRECATED

commentsstring

comments/observations

emailstring

Poi Email (More than one separated by commas)

poiDelaystring

delay time in Poi

poiDeliveryCommentsstring

Additional Comments when delivering to this Poi

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:

CodeDescriptionField
1001Wrong time window objecttimeWindow
2002Wrong time window values, must be stringtimeWindow
2003Wrong time window, 'from' must be less than 'to'timeWindow
2004Wrong time window, times are overlappedtimeWindow
2010Poi type not found or not allowed for this userpoiType
2020Poi code already present for this usercode
2021Poi code not found or not allowed for this usercode
2023Nothing to update
2024Visiting frequency invalidvisitingFrequency
2025Visiting days invalidvisitingDays
5001Area code not present or not allowed for this usersalesAreaCode, deliveryAreaCode

Example response

{
  "data": [
    {
      "visitingDaysDevice1": [
        1,
        2
      ],
      "visitingDaysDevice2": [
        1,
        2
      ],
      "visitingDaysDevice3": [
        1,
        2
      ],
      "visitingDaysDevice4": [
        1,
        2
      ],
      "timeWindow": [
        {
          "from": "08:00",
          "to": "13:00"
        }
      ]
    }
  ]
}