Skip to main content

PATCH - Batch patch update point

Batch patch update location points

Request

  • Method: PATCH
  • Endpoint: /locations/points/batch
  • Base URL: https://api.targpatrol.com/api/v1
  • Operation ID: batch-patch-update-point

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<PointBatchPatchRequest>

Schema
{
"type": "array",
"items": {
"$ref": "#/components/schemas/PointBatchPatchRequest"
}
}

Example: example-1

[
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "P002"
}
]

Responses

200 OK

Content-Type: application/json Schema: Array<PointResponse>

Schema
{
"type": "array",
"items": {
"$ref": "#/components/schemas/PointResponse"
}
}

Example: example-1

[
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"locationId": "12a8af51-52f6-409b-82c2-08bbd5df18c2",
"name": "P002",
"type": "VIRTUAL",
"address": null,
"latitude": null,
"longitude": null,
"graphicPlans": [],
"rfidCode": null,
"qrCode": null,
"tags": [
"tag1"
],
"allowOnDemandCheckIn": false,
"onDemandCheckInDefaults": [],
"onDemandCheckInUserOverrides": []
}
]

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": "requestPoints[0].graphicPlans[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"
}