Update a person allocation
PATCH/api/people-allocations/:id
Required permissions:
- planning.modify: to create allocation for a project where the user is PM or Account
- planning.modify_other: to create allocation for a project where the user is not PM nor Account
- planning.modify_past: to create allocation on today or in a date in the past
Here the dedicated support page.
Request
Path Parameters
id integerrequired
The ID of the allocation to update
Header Parameters
Wethod-Company stringrequired
The company you want to interact with
Wethod-Version stringrequired
The API version you want to use
- application/json
Body
hours integer
Possible values: >= 1
and <= 8
Allocation total hours
Responses
- 200
- 400
- 401
Returns the updated allocation.
- application/json
- Schema
- Example (from schema)
Schema
id integerrequired
Possible values: >= 1
created_at date-timerequired
updated_at date-timerequired
date daterequired
hours integerrequired
Possible values: <= 8
project_id integerrequired
Possible values: >= 1
ID of the project related to this allocation
person_id integerrequired
Possible values: >= 1
ID of the person related to this allocation
deleted_at date-time
{
"id": 1,
"created_at": "2024-12-20T14:44:08.270Z",
"updated_at": "2024-12-20T14:44:08.270Z",
"date": "2024-12-20",
"hours": 4,
"project_id": 1,
"person_id": 1,
"deleted_at": "2024-12-20T14:44:08.270Z"
}
Validation failed
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
key string
Error unique key
message string
Human-readable message describing the error
failures
object[]
List of validation errors
field string
Name of the field causing the error
message string
Human-readable description of the error
{
"key": "invalid_data",
"message": "You provided invalid data. Check 'failures' for details.",
"failures": [
{
"field": "string",
"message": "string"
}
]
}
Unauthorized
- application/json
- Schema
- Example (from schema)
Schema
key string
Error unique key
message string
Human-readable message describing the error
{
"key": "string",
"message": "string"
}
Loading...