PATCH - Batch patch update location
Batch patch update location by id
Request
- Method:
PATCH - Endpoint:
/locations/batch - Base URL:
https://api.targpatrol.com/api/v1 - Operation ID:
batch-patch-update-location
Authorization
This endpoint requires an external API key.
x-api-key: {your_external_api_key}
Request Body
Required: no
Content-Type: application/json
Schema: Array<LocationBatchPatchRequest>
Schema
{
"type": "array",
"items": {
"$ref": "#/components/schemas/LocationBatchPatchRequest"
}
}
Example: example-1
[
{
"id": "638b90c5-7965-49ae-a02b-1b190cb216db",
"name": "W002"
}
]
Responses
200 OK
Content-Type: application/json
Schema: Array<LocationResponse>
Schema
{
"type": "array",
"items": {
"$ref": "#/components/schemas/LocationResponse"
}
}
Example: example-1
[
{
"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"
]
}
]
400 Bad Request
Content-Type: application/json
Schema: ErrorResponse
Schema
{
"$ref": "#/components/schemas/ErrorResponse"
}
Example: example-1
{
"message": "invalid input data",
"code": "input.data.invalid",
"timestamp": "2023-03-07T05:57:59.315Z",
"details": [
{
"message": "must not be null",
"code": "input.data.invalid",
"identifier": "locationRequests[0].id"
}
]
}
401 Unauthorized
404 Not Found
Content-Type: application/json
Schema: ErrorResponse
Schema
{
"$ref": "#/components/schemas/ErrorResponse"
}
Example: example-1
{
"message": "resource wasn't found",
"code": "not.found",
"timestamp": "2023-03-07T05:57:59.315Z"
}
406 Not Acceptable
Content-Type: application/json
Schema: ErrorResponse
Schema
{
"$ref": "#/components/schemas/ErrorResponse"
}
Example: example-1
{
"message": "mismatch in the types of content",
"code": "not.acceptable",
"timestamp": "2023-03-07T05:57:59.315Z"
}
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"
}