Labor
CreateBreakType
Creates a new BreakType.
A BreakType is a template for creating Break objects. You must provide the following values in your request to this endpoint:
- location_id
- break_name
- expected_duration
- is_paid
You can only have three BreakType instances per location. If you attempt to add a fourth BreakType for a location, an INVALID_REQUEST_ERROR "Exceeded limit of 3 breaks per location." is returned.
post/v2/labor/break-types
Request body
Example request
{
"break_type": {
"break_name": "Lunch Break",
"expected_duration": "PT30M",
"is_paid": true,
"location_id": "CGJN03P1D08GF"
},
"idempotency_key": "PAD3NG5KSN2GL"
}Response
Success
Example response
{
"break_type": {
"break_name": "Lunch Break",
"created_at": "2019-02-26T22:42:54Z",
"expected_duration": "PT30M",
"id": "49SSVDJG76WF3",
"is_paid": true,
"location_id": "CGJN03P1D08GF",
"updated_at": "2019-02-26T22:42:54Z",
"version": 1
}
}