Create break type
POST
/v2/labor/break-types
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 3 BreakType
instances per location. If you attempt to add a 4th
BreakType
for a location, an INVALID_REQUEST_ERROR
"Exceeded limit of 3 breaks per location."
is returned.
Permissions
TIMECARDS_SETTINGS_WRITE
Try in API Explorer
Name | Description |
---|---|
idempotency_
|
Unique string value to insure idempotency of the operation |
break_
Required
|
The |
Response Fields
Name | Description |
---|---|
break_
|
The |
errors
|
Any errors that occurred during the request. |
Examples
POST
/v2/labor/break-types
cURL
- cURL
- Ruby
- Python
- C#
- Java
- PHP
- Node.js
curl https://connect.squareup.com/v2/labor/break-types \
-X POST \
-H 'Square-Version: 2021-02-26' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"idempotency_key": "PAD3NG5KSN2GL",
"break_type": {
"location_id": "CGJN03P1D08GF",
"break_name": "Lunch Break",
"expected_duration": "PT30M",
"is_paid": true
}
}'
Response JSON
{
"break_type": {
"id": "49SSVDJG76WF3",
"location_id": "CGJN03P1D08GF",
"break_name": "Lunch Break",
"expected_duration": "PT30M",
"is_paid": true,
"version": 1,
"created_at": "2019-02-26T22:42:54Z",
"updated_at": "2019-02-26T22:42:54Z"
}
}