GET - List of locations
List of locations
Request
- Method:
GET - Endpoint:
/locations - Base URL:
https://api.targpatrol.com/api/v1 - Operation ID:
list-of-locations
Authorization
This endpoint requires an external API key.
x-api-key: {your_external_api_key}
Parameters
| Name | In | Required | Schema | Description |
|---|---|---|---|---|
limit | query | no | integer | include first N items of a resource collection |
offset | query | no | number | exclude first N items of a resource collection |
sort | query | no | string | sort items in a resource collection |
q | query | no | string | This parameter is used for quick search across text fields. |
name | query | no | string | filter by name |
address | query | no | string | filter by address |
withGraphicPlan | query | no | boolean | filter by graphic plan existence |
tags | query | no | string | filter by tags |
Responses
200 OK
Content-Type: application/json
Schema: object
Schema
{
"allOf": [
{
"$ref": "#/components/schemas/PageResponse"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/LocationResponse"
}
}
}
}
]
}
Example: example-1
{
"data": [
{
"id": "638b90c5-7965-49ae-a02b-1b190cb216db",
"name": "W001",
"address": "Walmart 11,197",
"latitude": 51.0966229,
"longitude": -138.491986,
"tags": [
"tag1"
],
"graphicPlanIds": [
"3a1da1c9-0873-4bdc-b1f1-7343b29fdc27",
"14b8ec6b-8ee2-4533-aedd-b82691f19af2"
]
}
],
"meta": {
"offset": 0,
"limit": 20,
"count": 1000,
"sort": [
{
"property": "id",
"direction": "asc"
}
],
"filter": [
{
"property": "name",
"value": "W001"
}
]
}
}
401 Unauthorized
500 Internal Server Error
Content-Type: application/json
Schema: ErrorResponse
Schema
{
"$ref": "#/components/schemas/ErrorResponse"
}
Example: example-1
{
"message": "internal server error",
"code": "internal.server.error",
"timestamp": "2023-03-07T05:57:59.315Z"
}