Create timecard
Note We recommend using the Square API (V2) for all new development when possible.
Creates a timecard for an employee and clocks them in with an
API_CREATE
event and a clockin_time
set to the current time unless
the request provides a different value
To import timecards from another
system (rather than clocking someone in). Specify the clockin_time
and* clockout_time
in the request.
Timecards correspond to exactly one shift for a given employee, bounded
by the clockin_time
and clockout_time
fields. An employee is
considered clocked in if they have a timecard that doesn't have a
clockout_time
set. An employee that is currently clocked in cannot
be clocked in a second time.
Request Body
Name | Description |
---|---|
id
|
The timecard's unique ID. |
employee_id
Required
|
The ID of the employee the timecard is associated with. |
clockin_location_id
|
The ID of the location the employee clocked in from. We strongly reccomend providing a clockinlocationid. Square uses the clockinlocationid to determine a timecard’s timezone and overtime rules. |
clockin_time
|
The clock-in time for the timecard, in ISO 8601 format. |
clockout_location_id
|
The ID of the location the employee clocked out from. Provide this value only if importing timecard information from another system. |
clockout_time
|
The clock-out time for the timecard, in ISO 8601 format. Provide this value only if importing timecard information from another system. |
created_at
|
The time when the timecard was created, in ISO 8601 format. |
deleted
|
If true, the timecard was deleted by the merchant, and it is no longer valid. |
doubletime_seconds_worked
|
The total number of doubletime seconds worked in the timecard. |
overtime_seconds_worked
|
The total number of overtime seconds worked in the timecard. |
regular_seconds_worked
|
The total number of regular (non-overtime) seconds worked in the timecard. |
updated_at
|
The time when the timecard was most recently updated, in ISO 8601 format. |
Response Fields
Name | Description |
---|---|
id
|
The timecard's unique ID. |
employee_id
Required
|
The ID of the employee the timecard is associated with. |
clockin_location_id
|
The ID of the location the employee clocked in from. We strongly reccomend providing a clockinlocationid. Square uses the clockinlocationid to determine a timecard’s timezone and overtime rules. |
clockin_time
|
The clock-in time for the timecard, in ISO 8601 format. |
clockout_location_id
|
The ID of the location the employee clocked out from. Provide this value only if importing timecard information from another system. |
clockout_time
|
The clock-out time for the timecard, in ISO 8601 format. Provide this value only if importing timecard information from another system. |
created_at
|
The time when the timecard was created, in ISO 8601 format. |
deleted
|
If true, the timecard was deleted by the merchant, and it is no longer valid. |
doubletime_seconds_worked
|
The total number of doubletime seconds worked in the timecard. |
overtime_seconds_worked
|
The total number of overtime seconds worked in the timecard. |
regular_seconds_worked
|
The total number of regular (non-overtime) seconds worked in the timecard. |
updated_at
|
The time when the timecard was most recently updated, in ISO 8601 format. |
Examples
- cURL
curl https://connect.squareup.com/v1/me/timecards \
-X POST \
-H 'Authorization: Bearer ACCESS_TOKEN'