Difference between revisions of "GPS Ping"
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...") |
Ashley DeBon (talk | contribs) (→Store GPS Ping) |
||
| Line 1: | Line 1: | ||
| − | == Store GPS Ping == | + | == [[Mobile_API]] »Store GPS Ping == |
=== Base URL === | === Base URL === | ||
Revision as of 15:03, 21 July 2026
Contents
Mobile_API »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
subclaim (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.