---
title: "Update point of interest by code"
method: PUT
path: "/pois/{code}"
tags: ["Pois"]
---

# Update point of interest by code

`PUT /pois/{code}`

># 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.

## Path parameters

- `code` string, required

## Request body

- object
  - `name` string — Poi name
  - `address` object — Address componentes, If these properties are not filled we will geocode with longAddress value
    - `street` string — Street name
    - `number` string — address number
    - `locality` string — Locality
    - `state` string — State
    - `country` string — Country
  - `longAddress` string — Poi address
  - `longitude` number — Poi longitude coordinate
  - `latitude` number — Poi latitude coordinate
  - `geocodeByCep` object — Object to geocode by CEP
    - `cep` string — CEP Number
    - `doorNumber` string — Door Number
  - `enabled` boolean — Poi status
  - `deliveryAreaCode` string — Poi delivery area code
  - `salesAreaCode` string — Poi sale area code
  - `poiType` string — Poi type code from /poi/types
  - `originalAddress` string — Poi first address entered
  - `phoneNumber` string — Poi phone
  - `taxId` string — Poi taxId
  - `radius` integer — Poi radius (meters)
  - `grouping` string — Poi grouping
  - `visitingFrequency` 'weekly' | 'biweekly' | 'monthly' — Poi frequency
  - `deviceId1` string — ERP code - DEPRECATED
  - `visitingDaysDevice1` integer[] — Poi visiting day for deviceId1 "Monday -> 1, Sunday -> 7" - DEPRECATED
  - `deviceId2` string — ERP code - DEPRECATED
  - `visitingDaysDevice2` integer[] — Poi visiting day for deviceId2 "Monday -> 1, Sunday -> 7" - DEPRECATED
  - `deviceId3` string — ERP code - DEPRECATED
  - `visitingDaysDevice3` integer[] — Poi visiting day for deviceId3 "Monday -> 1, Sunday -> 7" - DEPRECATED
  - `deviceId4` string — ERP code - DEPRECATED
  - `visitingDaysDevice4` integer[] — Poi visiting day for deviceId4 "Monday -> 1, Sunday -> 7" - DEPRECATED
  - `visitingOrder` integer — Poi visiting order - DEPRECATED
  - `comments` string — comments/observations
  - `email` string — Poi Email (More than one separated by commas)
  - `timeWindow` object[] — Poi visiting time windows (use User TimeZone)
    - `from` string — Window Start time
    - `to` string — Window End time
  - `poiDelay` string — delay time in Poi
  - `poiDeliveryComments` string — Additional Comments when delivering to this Poi
  - `notificationConfig` object — Notifications configuration
    - `order` object
      - `planned` string[]
      - `routeStarted` string[]
      - `arriving` string[]
      - `delivered` string[]
      - `failed` string[]

## Response `200`

updated point of interest

- object
  - `meta` object
    - `error` number — Error number
    - `message` string — Error message
  - `data` object
    - `code` string — Poi code
    - `name` string — Poi name
    - `address` string — Poi address
    - `longitude` number — Poi longitude coordinate
    - `latitude` number — Poi latitude coordinate
    - `enabled` boolean — Poi status
    - `deliveryAreaCode` string — Poi delivery area code
    - `salesAreaCode` string — Poi sale area code
    - `poiType` string — Poi type code from /poi/types
    - `originalAddress` string — Poi first address entered
    - `phoneNumber` string — Poi phone
    - `taxId` string — Poi taxId
    - `radius` integer — Poi radius (meters)
    - `grouping` string — Poi grouping
    - `visitingFrequency` 'weekly' | 'biweekly' | 'monthly' — Poi frequency
    - `deviceId1` string — ERP code - DEPRECATED
    - `visitingDaysDevice1` integer[] — Poi visiting day for deviceId1 "Monday -> 1, Sunday -> 7" - DEPRECATED
    - `deviceId2` string — ERP code - DEPRECATED
    - `visitingDaysDevice2` integer[] — Poi visiting day for deviceId2 "Monday -> 1, Sunday -> 7" - DEPRECATED
    - `deviceId3` string — ERP code - DEPRECATED
    - `visitingDaysDevice3` integer[] — Poi visiting day for deviceId3 "Monday -> 1, Sunday -> 7" - DEPRECATED
    - `deviceId4` string — ERP code - DEPRECATED
    - `visitingDaysDevice4` integer[] — Poi visiting day for deviceId4 "Monday -> 1, Sunday -> 7" - DEPRECATED
    - `visitingOrder` integer — Poi visiting order - DEPRECATED
    - `comments` string — comments/observations
    - `email` string — Poi Email (More than one separated by commas)
    - `timeWindow` object[] — Poi visiting time windows (use User TimeZone)
      - `from` string — Window Start time
      - `to` string — Window End time
    - `poiDelay` string — delay time in Poi
    - `poiDeliveryComments` string — Additional Comments when delivering to this Poi
    - `notificationConfig` object — Notifications configuration
      - `order` object
        - `planned` string[]
        - `routeStarted` string[]
        - `arriving` string[]
        - `delivered` string[]
        - `failed` string[]
    - `lastVisitedAt` string, date-time — Poi last time visited
    - `updatedAt` string, date-time — Poi last updated time
    - `skippedGeocodeAt` string, date-time
    - `area` object — GeoJSon geometry
      - `type` 'Polygon' | 'MultiPolygon', required — the geometry type
      - `coordinates` array[]
        - array[]
          - number[] — lng, lat
    - `geocodedByAppAt` string, date-time — Time in which was geocoded by App

## Other responses

- `400` — On Error, response will contain an error and message 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
- `403` — Not authorized access

---

[API](https://skmtc.net/quadminds/apis/quadminds-api-v2.md) · [All operations](https://skmtc.net/quadminds/apis/quadminds-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/quadminds/quadminds-api-v2/revisions/e0ab56dece05/schema)
