Update properties of a Worker
PATCH
workers/{workerId}
Modifies only the specified attributes in the request body for the identified Worker. Attributes not included in the request remain unchanged.
Resource Information
| Method and URI | PATCH https://api.aps.autodesk.com/fusion-operations/v2/workers/{workerId} |
| Authentication Context | No security required |
| Required OAuth Scopes | data:read data:write |
| Data Format | JSON |
Request
Headers
| Authorization* string | JWT Access Token |
| Content-Type* string | Must be application/json |
* Required
Request
URI Parameters
| workerId int | Unique identifier of the Worker to update. |
Request
Body Structure
The Worker attributes to be updated, conforming to the specified schema. Only the provided fields will be modified.
Expand all
| number int | The number assigned to the worker |
| name string | Max length: 255 |
| disabled boolean | |
| shift | The current active shift for the worker |
| id int | Unique identifier of the referenced entity. |
| code string | Code of the referenced entity.
Max length: 255 |
| anyOf | The current active shift for the worker |
| 0 | |
| 1 | |
| customCode string | NFC/RFId/SmartCard/Barcode for login
Max length: 255 |
| costPerHour number | The value assigned to each hour of labor |
| language enum:string | Possible values: PT, EN, DE, ES, PL, ZH, FR, IT, JP, KR, TR, PT_BR, BG |
| sections array: object | |
| id int | Unique identifier of the referenced entity. |
| name string | Name of the referenced entity.
Max length: 255 |
| anyOf | |
| 0 | |
| 1 |
Response
HTTP Status Code Summary
| 200 OK | Worker updated successfully. |
| 400 Bad Request | Bad request due to invalid data. |
| 401 Unauthorized | The access token is invalid. It may have either expired or may not be a three-legged access token. Please verify the token and retry the request. |
| 403 Forbidden | The request was successfully validated but lacked required permission. Please verify your token permissions and retry the request. |
| 404 Not Found | The resource in the path does not exist. |
| 429 Too Many Requests | Rate limit exceeded; wait some time before retrying. |
| 500 Internal Server Error | An unknown server-side error occurred. Please try again later. If the problem persists, please contact support. |
Response
Header (429)
| Retry-After integer | The number of seconds to wait before retrying the request. |
Response
Body Structure (200)
Expand all
| id int | Unique identifier of the worker. |
| number int | The number assigned to the worker |
| name string | Max length: 255 |
| disabled boolean | |
| shift | The current active shift for the worker |
| id int | Unique identifier of the referenced entity. |
| code string | Code of the referenced entity.
Max length: 255 |
| anyOf | The current active shift for the worker |
| 0 | |
| 1 | |
| customCode string | NFC/RFId/SmartCard/Barcode for login
Max length: 255 |
| costPerHour number | The value assigned to each hour of labor |
| language enum:string | Possible values: PT, EN, DE, ES, PL, ZH, FR, IT, JP, KR, TR, PT_BR, BG |
| sections array: object | |
| id int | Unique identifier of the referenced entity. |
| name string | Name of the referenced entity.
Max length: 255 |
| anyOf | |
| 0 | |
| 1 |
Example
Worker updated successfully.
Request
curl -v 'https://developer.api.autodesk.com/fusion-operations/v2/workers/:workerId' \
-X 'PATCH' \
-H 'Authorization: ' \
-H 'Content-Type: application/json' \
-d '{
"name": "John Smith"
}'
Response
{
"id": 382,
"number": 66,
"name": "John Smith",
"disabled": false,
"shift": {
"id": 3,
"code": "Morning"
},
"customCode": "null",
"costPerHour": 25.5,
"language": "EN",
"sections": [
{
"id": 2,
"code": "Assembly",
"name": "Assembly Section"
},
{
"id": 4,
"code": "Packaging",
"name": "Packaging Section"
}
]
}
Show More