PATCH - Patch update list of users
Patch update list of users
Request
- Method:
PATCH - Endpoint:
/users/batch - Base URL:
https://api.targpatrol.com/api/v1 - Operation ID:
patch-update-user-list
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<UserBatchPatchRequest>
Schema
{
"type": "array",
"items": {
"$ref": "#/components/schemas/UserBatchPatchRequest"
}
}
Example: example-1
[
{
"id": "be63c536-6cf3-4866-8970-37a956e3f403",
"locale": "en-US",
"role": "ADMIN"
},
{
"id": "53262fe0-adf9-4a64-8040-e1eb9db72213",
"locale": "en-US",
"employeePin": "1111"
}
]
Responses
200 OK
Content-Type: application/json
Schema: Array<UserResponse>
Schema
{
"type": "array",
"items": {
"$ref": "#/components/schemas/UserResponse"
}
}
Example: example-1
[
{
"id": "be63c536-6cf3-4866-8970-37a956e3f403",
"firstName": "John",
"middleName": "Lee",
"lastName": "Fox",
"employeeNo": "1234",
"employeePin": "4321",
"email": "fox.john@gmail.com",
"phone": "80291110099",
"locale": "en-US",
"role": "ADMIN",
"status": "ACTIVE",
"photoId": "a7c6f740-2a42-449c-a03b-b8d36aa4709a",
"locationIds": [
"99b770c0-2396-43d3-b109-85a9d73df7b1",
"e1dfeaba-4318-4411-be91-f8af5214dd02"
],
"tags": [
"tag1",
"tag2"
],
"userLinked": true,
"externalId": "external-user-1",
"gpsTracking": true
},
{
"id": "53262fe0-adf9-4a64-8040-e1eb9db72213",
"firstName": "Robbert",
"middleName": "Lee",
"lastName": "Jenkins",
"employeeNo": "4444",
"employeePin": "1122",
"email": "lee@email.com",
"phone": "80291110099",
"locale": "en-US",
"role": "MANAGER",
"status": "ACTIVE",
"photoId": "b1f81506-b327-4420-bbc6-44a5d062fbf4",
"locationIds": [
"99b770c0-2396-43d3-b109-85a9d73df7b1"
],
"tags": [
"tag1",
"tag2"
],
"userLinked": true,
"externalId": "external-user-2",
"gpsTracking": false
}
]
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"
}