Locations
GET /external/v1/locations
Returns all branches/locations for your company.
Query Parameters
None.
Response
[
{
"id": "branch-uuid-1",
"name": "Downtown Office",
"city": "Lagos",
"state": "Lagos",
"latitude": 6.5244,
"longitude": 3.3792,
"hexcode": "#00AD57",
"symbol": "DO",
"locationDetectionEnabled": true
},
{
"id": "branch-uuid-2",
"name": "Airport Terminal",
"city": "Ikeja",
"state": "Lagos",
"latitude": 6.5774,
"longitude": 3.3211,
"hexcode": "#FF6B35",
"symbol": "AT",
"locationDetectionEnabled": false
}
]
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique branch ID |
name | string | Branch display name |
city | string | null | City name |
state | string | null | State/region name |
latitude | number | null | Geographic latitude |
longitude | number | null | Geographic longitude |
hexcode | string | Color code for UI display |
symbol | string | Short abbreviation (typically 2 characters) |
locationDetectionEnabled | boolean | Whether GPS-based clock-in is enabled |
Example
curl -X GET "https://api.suprsync.com/external/v1/locations" \
-H "x-api-key: api_your_client_id" \
-H "x-api-secret: sec_your_client_secret"
Create Location
POST /external/v1/locations
Creates a new branch/location for your company.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Location name |
address | string | No | Street address |
countryId | string | No | Country ID |
stateId | string | No | State/region ID |
cityId | string | No | City ID |
zipCode | string | No | Postal code |
hexcode | string | No | Color hex code |
symbol | string | No | Short abbreviation |
latitude | number | No | Geographic latitude |
longitude | number | No | Geographic longitude |
curl -X POST "https://api.suprsync.com/external/v1/locations" \
-H "x-api-key: api_your_client_id" \
-H "x-api-secret: sec_your_client_secret" \
-H "Content-Type: application/json" \
-d '{ "name": "Uptown Office", "hexcode": "#FF6B35", "symbol": "UO" }'
Response (201 Created)
{
"id": "branch-uuid-new",
"name": "Uptown Office",
"address": "",
"latitude": null,
"longitude": null,
"hexcode": "#FF6B35",
"symbol": "UO"
}
Update Location
PATCH /external/v1/locations/:id
Updates an existing location. Send only the fields you want to change.
curl -X PATCH "https://api.suprsync.com/external/v1/locations/branch-uuid-1" \
-H "x-api-key: api_your_client_id" \
-H "x-api-secret: sec_your_client_secret" \
-H "Content-Type: application/json" \
-d '{ "name": "Uptown Office - Renamed" }'
Response (200 OK)
{
"id": "branch-uuid-1",
"name": "Uptown Office - Renamed"
}
Notes
- Results are ordered alphabetically by name.
- Sensitive fields (address, zip code) are not included in the GET response.
- Plan limits on locations are bypassed for external API clients.