GPS Ping

From docs
Revision as of 15:03, 21 July 2026 by Ashley DeBon (talk | contribs) (Created page with "== Store GPS Ping == === Base URL === https://apimobile.callproof.com === Endpoint === /api/gps-ping === Purpose === Stores one or more GPS location pings for the authentic...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Store GPS Ping

Base URL

https://apimobile.callproof.com

Endpoint

/api/gps-ping

Purpose

Stores one or more GPS location pings for the authenticated user. If address/city/state/ZIP are missing on a saved location, reverse geocoding may be attempted to fill them in.

HTTP Method

POST

Headers

Header Required Description
Authorization Yes Bearer access token (user ID is read from the token payload)

Security

  • Yes – Requires a Bearer Token. The user is identified from the token’s sub claim (this route is not behind the standard auth middleware group, but still expects a valid Bearer token).

Parameters

Path Parameters

None.

Query Parameters

None.

Request Body

Parameter Type Required Description
data array Yes Array of GPS location objects to store

data[]

Parameter Type Required Description
latitude string/number No Latitude (truncated if longer than 11 characters)
longitude string/number No Longitude (truncated if longer than 11 characters)
altitude string/number No Altitude (non-digits removed; set to 0 if longer than 6 digits)
accuracy string/number No Accuracy (non-digits removed)
speed string/number No Speed
bearing string/number No Bearing/heading
address string No Street address
city string No City
state string No State name or abbreviation (resolved to a state ID when possible)
zip string No ZIP/postal code (normalized to expected length)
provider string No Location provider name (for example, GPS/network)
flag_state string No Location/geo-track type (defaults to regular)
created string/datetime No Location timestamp (defaults to current time when omitted)

Successful Response (200)

Indicates that the location ping(s) were saved successfully.

Field Type Description
clientStatusCode integer Status indicator for the client (for example, 200)
user_id integer Identifier of the user from the Bearer token
company_id integer Identifier of that user’s company
message string Confirmation message (for example, "Location saved.")
uri string Requested resource URI

Error Responses

Status Code Meaning
400 Bad Request – the GPS ping could not be stored
401 Unauthorized – missing/invalid Bearer token (when auth middleware applies) or invalid token payload
  • 400 – Invalid token ("Invalid Token"), or an error while storing location details (for example, "Error while retriving the places list").
  • 401 – Authentication failed or the access token is missing/expired.