post https://api.timeero.app/api/public/breaks
Endpoint: POST /breaks
Description: Create a new time break.
Request Body:
Parameter | Type | Description |
---|---|---|
timesheet_id required | integer | The ID of the timesheet. |
break_rule_id required | integer | The ID of the break rule. |
start required | datetime | Start time of the timesheet in ISO 8601 format: YYYY-MM-DDTHH:MM:SS±HH:MM. |
end required | datetime | End time of the timesheet in ISO 8601 format: YYYY-MM-DDTHH:MM:SS±HH:MM |
Request Body Sample:
{
"timesheet_id": 3017841,
"break_rule_id": 1,
"start": "2024-10-31T08:10:48-08:00",
"end": "2024-10-31T09:10:48-08:00"
}
Response:
{
"items": {
"id": 123621,
"start": "2024-10-31T08:10:48-08:00",
"end": "2024-10-31T09:10:48-08:00",
"break_rule_id": 1,
"timesheet_id": 3017841,
"duration": 3600,
"created_at": "2024-12-02T15:32:02",
"updated_at": "2024-12-02T15:32:02"
},
"message": "Break added successfully."
}