---
title: "Update waypoint by id"
method: PATCH
path: "/waypoints/{id}"
tags: ["Waypoints"]
---

# Update waypoint by id

`PATCH /waypoints/{id}`

## Request

- Base URL: `https://flash-api.quadminds.com/api/v2`
- URL: `https://flash-api.quadminds.com/api/v2/waypoints/{id}`
- Auth: API key in header `x-saas-apikey`

Update waypoint by id

## Path parameters

- `id` integer, required

## Request body

- object
  - `scheduledDate` string, date-time: Waypoint scheduled date
  - `poiId` number: Poi id processed on waypoint
  - `visited` boolean: Waypoint visited
  - `longitude` number: Waypoint visited exact location longitude
  - `latitude` number: Waypoint visited exact location latitude
  - `vehicleId` number: Waypoint vehicle assigned
  - `visitedAt` string, date-time: Waypoint visit date
  - `visitDuration` integer: Waypoint visit duration
  - `totalValue` number: Waypoint total amount
  - `pallets` number: Waypoint pallets
  - `createdAt` string, date-time: Waypoint created date
  - `departedAt` string, date-time: Waypoint departure date
  - `comments` string: Waypoint comments
  - `scheduledArrivalTimestamp` string, date-time: Waypoint scheduled visit arrival
  - `scheduledDepartureTimestamp` string, date-time: Waypoint scheduled visit departure
  - `visitOrder` integer: Waypoint visit order
  - `activities` object
    - `orders` object[]
      - `_id` union: Order ID
        - string
        - integer
    - `tasks` object[]
      - `_id` union: Task ID
        - string
        - integer

## Response `200`

Updated waypoint

- object
  - `meta` object
    - `error` number: Error number
    - `message` string: Error message
  - `data` object
    - `scheduledDate` string, date-time: Waypoint scheduled date
    - `poiId` number: Poi id processed on waypoint
    - `visited` boolean: Waypoint visited
    - `longitude` number: Waypoint visited exact location longitude
    - `latitude` number: Waypoint visited exact location latitude
    - `vehicleId` number: Waypoint vehicle assigned
    - `visitedAt` string, date-time: Waypoint visit date
    - `visitDuration` integer: Waypoint visit duration
    - `totalValue` number: Waypoint total amount
    - `pallets` number: Waypoint pallets
    - `createdAt` string, date-time: Waypoint created date
    - `departedAt` string, date-time: Waypoint departure date
    - `comments` string: Waypoint comments
    - `scheduledArrivalTimestamp` string, date-time: Waypoint scheduled visit arrival
    - `scheduledDepartureTimestamp` string, date-time: Waypoint scheduled visit departure
    - `visitOrder` integer: Waypoint visit order
    - `activities` object
      - `orders` object[]
        - `_id` union: Order ID
          - string
          - integer
      - `tasks` object[]
        - `_id` union: Task ID
          - string
          - integer

## Other responses

- `400`: On Error, response will contain an error and message with these posible values ### Error codes: Code | Description | Field ----------------|-------------|------------- 2027 | Order id not found or not allowed for this user | orderId 2045 | Waypoint id not found or not allowed for this user | _id 2046 | Route id not found or not allowed for this user | _id 2047 | Poi id not found or not allowed for this user | _id 2048 | Vehicle id not found or not allowed for this user |
- `403`: Not authorized access

---

[API](https://skmtc.dev/quadminds/apis/cloudflash-api.md) - [All operations](https://skmtc.dev/quadminds/apis/cloudflash-api/llms.txt) - [OpenAPI document](https://skmtc.dev/quadminds/apis/cloudflash-api/revisions/7731f1076b80?raw)
