curl --request PUT \
--url https://api.example.com/api/v1/employees/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"roles": [
{}
],
"email": "<string>",
"phone": "<string>",
"meta": {},
"end_date": "<string>",
"termination_reason": "<string>",
"branch_id": 123,
"start_date": "<string>"
}
'{
"404": {},
"422": {},
"status": 123,
"data": {}
}Update employee details and manage employment status
curl --request PUT \
--url https://api.example.com/api/v1/employees/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"roles": [
{}
],
"email": "<string>",
"phone": "<string>",
"meta": {},
"end_date": "<string>",
"termination_reason": "<string>",
"branch_id": 123,
"start_date": "<string>"
}
'{
"404": {},
"422": {},
"status": 123,
"data": {}
}"01JKXYZ1234567890ABCDEFGH""Juan""Pérez"manager, cook, kitchen-assistant, delivery-driver, acting-manager, adminSuper-admin only: super-admin role can only be assigned by users with the super-admin roleExample: ["manager", "cook"]null to remove email (as long as phone is present).Format: Valid email address (max 255 characters) or nullExample: "[email protected]"null to remove phone (as long as email is present).Format: 10-digit national phone number without country code or nullExample: "5512345678" or nullnull to clear existing metadata.Example: {"notes": "Updated shift preferences"}curl -X PUT "https://api.sushigo.local/api/v1/employees/01JKXYZ1234567890ABCDEFGH" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"first_name": "Juan Carlos",
"last_name": "Pérez López"
}'
curl -X PUT "https://api.sushigo.local/api/v1/employees/01JKXYZ1234567890ABCDEFGH" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"roles": ["manager", "acting-manager"]
}'
curl -X PUT "https://api.sushigo.local/api/v1/employees/01JKXYZ1234567890ABCDEFGH" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"phone": "5599887766"
}'
curl -X PUT "https://api.sushigo.local/api/v1/employees/01JKXYZ1234567890ABCDEFGH" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"meta": {
"shift_preference": "evening",
"certifications": ["food_handler", "first_aid"]
}
}'
{
"status": 200,
"data": {
"id": "01JKXYZ1234567890ABCDEFGH",
"code": "EMP-001",
"first_name": "Juan Carlos",
"last_name": "Pérez López",
"is_active": true,
"email": "[email protected]",
"phone": "5512345678",
"roles": ["manager", "acting-manager"],
"employment_periods": [
{
"id": "01JKXYZ9876543210ZYXWVUTS",
"branch_id": 1,
"branch": {
"id": 1,
"name": "SushiGo Centro",
"code": "CENTRO"
},
"start_date": "2026-01-15",
"end_date": null,
"is_active": true
}
],
"meta": null,
"created_at": "2026-01-15T14:30:00+00:00",
"updated_at": "2026-02-20T10:15:00+00:00"
}
}
PATCH /api/v1/employees/{id}/toggle-active
is_active flag from true to false or vice versacurl -X PATCH "https://api.sushigo.local/api/v1/employees/01JKXYZ1234567890ABCDEFGH/toggle-active" \
-H "Authorization: Bearer YOUR_TOKEN"
is_active toggled.
POST /api/v1/employees/{id}/deactivate
"2026-12-31""Voluntary resignation - relocated to another city"is_active to falseend_date and termination_reasonis_active to falsecurl -X POST "https://api.sushigo.local/api/v1/employees/01JKXYZ1234567890ABCDEFGH/deactivate" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"end_date": "2026-12-31",
"termination_reason": "Voluntary resignation"
}'
POST /api/v1/employees/{id}/rehire
1"2027-01-15"is_active to truecurl -X POST "https://api.sushigo.local/api/v1/employees/01JKXYZ1234567890ABCDEFGH/rehire" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"branch_id": 2,
"start_date": "2027-01-15"
}'