You are viewing an old version of the API
Create timecard
V1

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.

Required permissions TIMECARDS_WRITE

Request Body

Name Description
id
string

The timecard's unique ID.

employee_id
string

Required

The ID of the employee the timecard is associated with.

clockin_location_id
string

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
string

The clock-in time for the timecard, in ISO 8601 format.

clockout_location_id
string

The ID of the location the employee clocked out from. Provide this value only if importing timecard information from another system.

clockout_time
string

The clock-out time for the timecard, in ISO 8601 format. Provide this value only if importing timecard information from another system.

created_at
string

The time when the timecard was created, in ISO 8601 format.

deleted
boolean

If true, the timecard was deleted by the merchant, and it is no longer valid.

doubletime_seconds_worked
number

The total number of doubletime seconds worked in the timecard.

overtime_seconds_worked
number

The total number of overtime seconds worked in the timecard.

regular_seconds_worked
number

The total number of regular (non-overtime) seconds worked in the timecard.

updated_at
string

The time when the timecard was most recently updated, in ISO 8601 format.

Response Fields

Name Description
id
string

The timecard's unique ID.

employee_id
string

Required

The ID of the employee the timecard is associated with.

clockin_location_id
string

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
string

The clock-in time for the timecard, in ISO 8601 format.

clockout_location_id
string

The ID of the location the employee clocked out from. Provide this value only if importing timecard information from another system.

clockout_time
string

The clock-out time for the timecard, in ISO 8601 format. Provide this value only if importing timecard information from another system.

created_at
string

The time when the timecard was created, in ISO 8601 format.

deleted
boolean

If true, the timecard was deleted by the merchant, and it is no longer valid.

doubletime_seconds_worked
number

The total number of doubletime seconds worked in the timecard.

overtime_seconds_worked
number

The total number of overtime seconds worked in the timecard.

regular_seconds_worked
number

The total number of regular (non-overtime) seconds worked in the timecard.

updated_at
string

The time when the timecard was most recently updated, in ISO 8601 format.

Examples

You are viewing an old version of the API
POST /v1/me/timecards
cURL
  • cURL
curl https://connect.squareup.com/v1/me/timecards \
  -X POST \
  -H 'Authorization: Bearer ACCESS_TOKEN'

Share Feedback

Thanks for visiting the Square API documentation. What's on your mind?