Labor
CreateTimecard
Creates a new Timecard.
A Timecard represents a complete workday for a single team member. You must provide the following values in your request to this endpoint:
- location_id
- team_member_id
- start_at
An attempt to create a new Timecard can result in a BAD_REQUEST error when:
- The status of the new Timecard is OPEN and the team member has another timecard with an OPEN status.
- The start_at date is in the future.
- The start_at or end_at date overlaps another timecard for the same team member.
- The Break instances are set in the request and a break start_at is before the Timecard.start_at, a break end_at is after the Timecard.end_at, or both.
post/v2/labor/timecards
Request body
Example request
{
"idempotency_key": "HIDSNG5KS478L",
"timecard": {
"breaks": [
{
"break_type_id": "REGS1EQR1TPZ5",
"end_at": "2019-01-25T06:16:00-05:00",
"expected_duration": "PT5M",
"is_paid": true,
"name": "Tea Break",
"start_at": "2019-01-25T06:11:00-05:00"
}
],
"declared_cash_tip_money": {
"amount": 500,
"currency": "USD"
},
"end_at": "2019-01-25T13:11:00-05:00",
"location_id": "PAA1RJZZKXBFG",
"start_at": "2019-01-25T03:11:00-05:00",
"team_member_id": "ormj0jJJZ5OZIzxrZYJI",
"wage": {
"hourly_rate": {
"amount": 1100,
"currency": "USD"
},
"tip_eligible": true,
"title": "Barista"
}
}
}Response
Success
Example response
{
"timecard": {
"breaks": [
{
"break_type_id": "REGS1EQR1TPZ5",
"end_at": "2019-01-25T06:16:00-05:00",
"expected_duration": "PT5M",
"id": "X7GAQYVVRRG6P",
"is_paid": true,
"name": "Tea Break",
"start_at": "2019-01-25T06:11:00-05:00"
}
],
"created_at": "2019-02-28T00:39:02Z",
"declared_cash_tip_money": {
"amount": 500,
"currency": "USD"
},
"end_at": "2019-01-25T13:11:00-05:00",
"id": "K0YH4CV5462JB",
"location_id": "PAA1RJZZKXBFG",
"start_at": "2019-01-25T03:11:00-05:00",
"status": "CLOSED",
"team_member_id": "ormj0jJJZ5OZIzxrZYJI",
"timezone": "America/New_York",
"updated_at": "2019-02-28T00:39:02Z",
"version": 1,
"wage": {
"hourly_rate": {
"amount": 1100,
"currency": "USD"
},
"job_id": "FzbJAtt9qEWncK1BWgVCxQ6M",
"tip_eligible": true,
"title": "Barista"
}
}
}