PATCH
/
milestone
/
{milestone_id}
curl --request PATCH \
  --url https://api.pathstack.io/milestone/{milestone_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "device_id": "<string>",
  "status": "trip_not_started",
  "start_point": {
    "latitude": 0,
    "longitude": 0
  },
  "end_point": {
    "latitude": 0,
    "longitude": 0
  },
  "start_time": "2023-11-07T05:31:56Z",
  "end_time": "2023-11-07T05:31:56Z",
  "webhook_url": "<string>",
  "webhook_enabled": true
}'
{
  "data": {
    "device_id": "<string>",
    "status": "trip_not_started",
    "start_point": {
      "latitude": 0,
      "longitude": 0
    },
    "end_point": {
      "latitude": 0,
      "longitude": 0
    },
    "start_time": "<string>",
    "end_time": "<string>",
    "webhook_url": "<string>",
    "id": "<string>",
    "tenant_id": "<string>",
    "webhook_error_count": 0,
    "last_webhook_error": "<string>",
    "last_webhook_error_at": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "webhook_enabled": true
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-api-version
string
default:2024-03-26
Example:

"2024-03-26"

Path Parameters

milestone_id
string
required

ID of the Milestone to be updated

Body

application/json

Details for Milestone Update

device_id
string | null
status
enum<string> | null
Available options:
trip_not_started,
trip_in_progress,
trip_ended
start_point
end_point
object | null
start_time
string | null
end_time
string | null
webhook_url
string | null
Required string length: 1 - 2083
webhook_enabled
boolean | null

Response

200
application/json
Successful Response
data
object
required

Successful response payload