V1EmployeesApi

March 13, 2019 ยท View on GitHub

squareconnect.apis.v1_employees_api

All endpoints are relative to Square Connect V2 Documentation

MethodHTTP request
create_employeePOST /v1/me/employees
create_employee_rolePOST /v1/me/roles
create_timecardPOST /v1/me/timecards
delete_timecardDELETE /v1/me/timecards/{timecard_id}
list_cash_drawer_shiftsGET /v1/{location_id}/cash-drawer-shifts
list_employee_rolesGET /v1/me/roles
list_employeesGET /v1/me/employees
list_timecard_eventsGET /v1/me/timecards/{timecard_id}/events
list_timecardsGET /v1/me/timecards
retrieve_cash_drawer_shiftGET /v1/{location_id}/cash-drawer-shifts/{shift_id}
retrieve_employeeGET /v1/me/employees/{employee_id}
retrieve_employee_roleGET /v1/me/roles/{role_id}
retrieve_timecardGET /v1/me/timecards/{timecard_id}
update_employeePUT /v1/me/employees/{employee_id}
update_employee_rolePUT /v1/me/roles/{role_id}
update_timecardPUT /v1/me/timecards/{timecard_id}

create_employee

V1Employee create_employee(body)

Description

Use the CreateEmployee endpoint to add an employee to a Square account. Employees created with the Connect API have an initial status of INACTIVE. Inactive employees cannot sign in to Square Point of Sale until they are activated from the Square Dashboard. Employee status cannot be changed with the Connect API. <aside class="important"> Employee entities cannot be deleted. To disable employee profiles, set the employee's status to INACTIVE

Parameters

NameTypeNotesDefault Value
bodyV1Employee

Return type

V1Employee

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_employee_role

V1EmployeeRole create_employee_role(employee_role)

Description

Creates an employee role you can then assign to employees. Square accounts can include any number of roles that can be assigned to employees. These roles define the actions and permissions granted to an employee with that role. For example, an employee with a "Shift Manager" role might be able to issue refunds in Square Point of Sale, whereas an employee with a "Clerk" role might not. Roles are assigned with the V1UpdateEmployee endpoint. An employee can have only one role at a time. If an employee has no role, they have none of the permissions associated with roles. All employees can accept payments with Square Point of Sale.

Parameters

NameTypeNotesDefault Value
employee_roleV1EmployeeRole

Return type

V1EmployeeRole

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_timecard

V1Timecard create_timecard(body)

Description

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.

Parameters

NameTypeNotesDefault Value
bodyV1Timecard

Return type

V1Timecard

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_timecard

object delete_timecard(timecard_id)

Description

Deletes a timecard. Timecards can also be deleted through the Square Dashboard. Deleted timecards are still accessible through Connect API endpoints, but cannot be modified. The deleted field of the Timecard object indicates whether the timecard has been deleted. Note*: By default, deleted timecards appear alongside valid timecards in results returned by the ListTimecards endpoint. To filter deleted timecards, include the deleted query parameter in the list request.

Parameters

NameTypeNotesDefault Value
timecard_idstr

Return type

object

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_cash_drawer_shifts

list[V1CashDrawerShift] list_cash_drawer_shifts(location_id, order=order, begin_time=begin_time, end_time=end_time)

Description

Provides the details for all of a location's cash drawer shifts during a date range. The date range you specify cannot exceed 90 days.

Parameters

NameTypeNotesDefault Value
location_idstr
orderstr[optional]
begin_timestr[optional]
end_timestr[optional]

Return type

list[V1CashDrawerShift]

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_employee_roles

list[V1EmployeeRole] list_employee_roles(order=order, limit=limit, batch_token=batch_token)

Description

Provides summary information for all of a business's employee roles.

Parameters

NameTypeNotesDefault Value
orderstr[optional]
limitint[optional]
batch_tokenstr[optional]

Return type

list[V1EmployeeRole]

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_employees

list[V1Employee] list_employees(order=order, begin_updated_at=begin_updated_at, end_updated_at=end_updated_at, begin_created_at=begin_created_at, end_created_at=end_created_at, status=status, external_id=external_id, limit=limit, batch_token=batch_token)

Description

Provides summary information for all of a business's employees.

Parameters

NameTypeNotesDefault Value
orderstr[optional]
begin_updated_atstr[optional]
end_updated_atstr[optional]
begin_created_atstr[optional]
end_created_atstr[optional]
statusstr[optional]
external_idstr[optional]
limitint[optional]
batch_tokenstr[optional]

Return type

list[V1Employee]

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_timecard_events

list[V1TimecardEvent] list_timecard_events(timecard_id)

Description

Provides summary information for all events associated with a particular timecard.

Parameters

NameTypeNotesDefault Value
timecard_idstr

Return type

list[V1TimecardEvent]

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_timecards

list[V1Timecard] list_timecards(order=order, employee_id=employee_id, begin_clockin_time=begin_clockin_time, end_clockin_time=end_clockin_time, begin_clockout_time=begin_clockout_time, end_clockout_time=end_clockout_time, begin_updated_at=begin_updated_at, end_updated_at=end_updated_at, deleted=deleted, limit=limit, batch_token=batch_token)

Description

Provides summary information for all of a business's employee timecards.

Parameters

NameTypeNotesDefault Value
orderstr[optional]
employee_idstr[optional]
begin_clockin_timestr[optional]
end_clockin_timestr[optional]
begin_clockout_timestr[optional]
end_clockout_timestr[optional]
begin_updated_atstr[optional]
end_updated_atstr[optional]
deletedbool[optional]
limitint[optional]
batch_tokenstr[optional]

Return type

list[V1Timecard]

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

retrieve_cash_drawer_shift

V1CashDrawerShift retrieve_cash_drawer_shift(location_id, shift_id)

Description

Provides the details for a single cash drawer shift, including all events that occurred during the shift.

Parameters

NameTypeNotesDefault Value
location_idstr
shift_idstr

Return type

V1CashDrawerShift

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

retrieve_employee

V1Employee retrieve_employee(employee_id)

Description

Provides the details for a single employee.

Parameters

NameTypeNotesDefault Value
employee_idstr

Return type

V1Employee

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

retrieve_employee_role

V1EmployeeRole retrieve_employee_role(role_id)

Description

Provides the details for a single employee role.

Parameters

NameTypeNotesDefault Value
role_idstr

Return type

V1EmployeeRole

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

retrieve_timecard

V1Timecard retrieve_timecard(timecard_id)

Description

Provides the details for a single timecard.

Parameters

NameTypeNotesDefault Value
timecard_idstr

Return type

V1Timecard

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_employee

V1Employee update_employee(employee_id, body)

Description

Parameters

NameTypeNotesDefault Value
employee_idstr
bodyV1Employee

Return type

V1Employee

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_employee_role

V1EmployeeRole update_employee_role(role_id, body)

Description

Modifies the details of an employee role.

Parameters

NameTypeNotesDefault Value
role_idstr
bodyV1EmployeeRole

Return type

V1EmployeeRole

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_timecard

V1Timecard update_timecard(timecard_id, body)

Description

Modifies the details of a timecard with an API_EDIT event for the timecard. Updating an active timecard with a clockout_time clocks the employee out.

Parameters

NameTypeNotesDefault Value
timecard_idstr
bodyV1Timecard

Return type

V1Timecard

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]