Update a work-contract by its ID.
curl --request PATCH \
--url https://{host}/directory/api/4.0/work-contracts/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"endsOn": "2022-02-10",
"terminationReasonId": 27
}'
{
"id": 514,
"ownerId": 416,
"startsOn": "2021-01-01",
"endsOn": null,
"isApplicable": true,
"establishmentId": 13,
"spcId": 1,
"typeId": 1,
"hiringTypeId": 3,
"terminationReasonId": null,
"trialPeriodDays": 120,
"renewedTrialPeriodDays": null,
"trialPeriodEndDate": "2021-05-01",
"trialPeriodEndDate2": null,
"authorId": 45,
"lastModifierId": 45,
"createdAt": "2021-11-08T17:48:18.12",
"lastModifiedAt": "2024-01-10T12:27:02.22"
}
API key. Value must be formatted like so: lucca application={api_key}
.
Identifier of the work-contract to retrieve.
x >= 1
OK
The response is of type object
.
Was this page helpful?
curl --request PATCH \
--url https://{host}/directory/api/4.0/work-contracts/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"endsOn": "2022-02-10",
"terminationReasonId": 27
}'
{
"id": 514,
"ownerId": 416,
"startsOn": "2021-01-01",
"endsOn": null,
"isApplicable": true,
"establishmentId": 13,
"spcId": 1,
"typeId": 1,
"hiringTypeId": 3,
"terminationReasonId": null,
"trialPeriodDays": 120,
"renewedTrialPeriodDays": null,
"trialPeriodEndDate": "2021-05-01",
"trialPeriodEndDate2": null,
"authorId": 45,
"lastModifierId": 45,
"createdAt": "2021-11-08T17:48:18.12",
"lastModifiedAt": "2024-01-10T12:27:02.22"
}