AlphaAlpha Docs

H R Employee Location

Employee location tracking API

Upload a batch of GPS locations

POST
/hr/location/batch
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/hr/location/batch" \  -H "Content-Type: application/json" \  -d '{    "locations": [      {        "latitude": 0.1,        "longitude": 0.1,        "timestamp": "2019-08-24T14:15:22Z"      }    ]  }'
Empty
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get location history for an employee (admin)

GET
/hr/location/history/{employeeId}
AuthorizationBearer <token>

In: header

Path Parameters

employeeId*string

Query Parameters

start*string
Formatdate-time
end*string
Formatdate-time

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/hr/location/history/string?start=2019-08-24T14%3A15%3A22Z&end=2019-08-24T14%3A15%3A22Z"
[
  {
    "accuracy": 0.1,
    "employeeId": "string",
    "employeeName": "string",
    "latitude": 0.1,
    "longitude": 0.1,
    "timestamp": "2019-08-24T14:15:22Z"
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get latest location for all tracked employees (admin)

GET
/hr/location/latest
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/hr/location/latest"
[
  {
    "accuracy": 0.1,
    "employeeId": "string",
    "employeeName": "string",
    "latitude": 0.1,
    "longitude": 0.1,
    "timestamp": "2019-08-24T14:15:22Z"
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get all employee location tracking settings (admin)

GET
/hr/location/settings
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/hr/location/settings"
[
  {
    "employeeId": "string",
    "id": "string",
    "locationTrackingEnabled": true
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get current employee's location tracking settings

GET
/hr/location/settings/me
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/hr/location/settings/me"
{
  "employeeId": "string",
  "id": "string",
  "locationTrackingEnabled": true
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Update current employee's location tracking settings

PUT
/hr/location/settings/me
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

locationTrackingEnabled*boolean

Response Body

application/json

application/json

application/json

application/json

curl -X PUT "http://localhost:18080/api/v1/hr/location/settings/me" \  -H "Content-Type: application/json" \  -d '{    "locationTrackingEnabled": true  }'
{
  "employeeId": "string",
  "id": "string",
  "locationTrackingEnabled": true
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}