The Location Object
Object Property | Required | Object Type | Description | Max Character Length |
---|
AccountLocation | Yes | String | Location Name of Location | 50 |
AccountLocationId | No | Integer | Id of Location | 11 |
IsDisabled | No | Boolean | Disabled Status of Location | 1 |
List All Locations
Returns a list of your all Locations in your UNItekTIME account.
GET /API/Locations
Example Request
curl "https://demo.unitektime.com/api/Locations" \
-H "APIKey: {Your API Key}" \
-H "AuthToken: {Your Authentication Token}" \
-H "Content-Type: application/json" \
-H "User-Agent: MyApp (yourname@example.com)"
Example Response
[
{
"AccountLocationId": 0001,
"AccountLocation": "Default Location",
"IsDisabled": "No"
},
{
"AccountLocationId": 0002,
"AccountLocation": "Other",
"IsDisabled": "No"
}
]
Retrieve a Location
Retrieves the Location with the given ID. Returns a Location object and a 200 OK response code if a valid identifier was provided.
GET /API/Locations/{Location_ID}
Example Request
curl "https://demo.unitektime.com/api/Locations/0001" \
-H "APIKey: {Your API Key}" \
-H "AuthToken: {Your Authentication Token}" \
-H "Content-Type: application/json" \
-H "User-Agent: MyApp (yourname@example.com)"
Example Response
[
{
"AccountLocationId": 0001,
"AccountLocation": "Default Location",
"IsDisabled": "No"
}
]
Create a Location
Creates a Location in your UNItekTIME account and returns the Response Message.
POST /API/Locations
Object Property | Required | Object Type | Description | Max Character Length |
---|
AccountLocation | Yes | String | Location Name of Location | 50 |
Example Request
curl "https://demo.unitektime.com/api/Locations" \
-H "APIKey: {Your API Key}" \
-H "AuthToken: {Your Authentication Token}" \
-H "User-Agent: MyApp (yourname@example.com)" \
-X POST \
-H "Content-Type: application/json" \
-d "{'AccountLocation': 'Sample'}"
Example Response
[
{
"id": "0001",
"message": "Location Added Successfully"
}
]
Update a Location
Update an Location in your UNItekTIME account and returns the Response Message.
POST /API/Locations/{Location_ID}
Example Request
curl "https://demo.unitektime.com/api/Locations/0001" \
-H "APIKey: {Your API Key}" \
-H "AuthToken: {Your Authentication Token}" \
-H "User-Agent: MyApp (yourname@example.com)" \
-X POST \
-H "Content-Type: application/json" \
-d "{'AccountLocation': 'Sample'}"
Example Response
[
{
"id": "0001",
"message": "Location Update Successfully"
}
]
Delete a Location
Delete a Location. Returns a 200 OK response code if the call succeeded.
DELETE /API/Location/{Location_ID}
Example Request
curl "https://demo.unitektime.com/api/Locations/0001" \
-H "APIKey: {Your API Key}" \
-H "AuthToken: {Your Authentication Token}" \
-H "User-Agent: MyApp (yourname@example.com)" \
-X DELETE \
-H "Content-Type: application/json"
Example Response
[
{
"id": "0001",
"message": "Location Deleted successfully"
}
]