Skip to content

Work shifts

Returns list of worked shifts in the system. Returned data can be limited with start and end query parameters.

Download work shifts as JSON

Request

GET https://api.zoined.com/v2/download/workShifts.json?limit=1000&offset=0&start=2017-01-01&end=2017-01-31

Security
bearerAuth
Query
limitnumber

How many entries to return

Example:limit=1000
offsetnumber

Which offset to return data from

Example:offset=0
startstring

Return data starting from given date

Example:start=2017-01-01
endstring

Return data ending to given date

Example:end=2017-01-31
curl -i -X GET \
  'https://zapi-api.zoined.com/_mock/v2/download/workShifts.json?limit=1000&offset=0&start=2017-01-01&end=2017-01-31' \
  -H 'Authorization: Bearer <YOUR_token_HERE>'

Responses

Request has been processed successfully.

Headers

  • Content-Type: application/json
Bodyapplication/json
organisation_idstringrequired

Organisation unit where shift will take place

Example:"234"
department_idstring

Store department ID

Example:"5401"
salesperson_idstring

Identifier of sales person / employee working. Required for punched shifts

Example:"345"
shift_idstringrequired

Unique identifier for the workshift

Example:"123"
start_datestringrequired

Shift start date (yyyy-mm-dd)

Example:"2016-01-01"
start_timestringrequired

Shift start time (HH:mm:ss)

Example:"15:00:00"
durationnumberrequired

Duration of the shift in hours.

Example:8.15
shift_typestring

Type of the shift. Freeform, will be available as dimension in portal.

Example:"Chef"
salary_typestring

Type of compensation for the shift.

Example:"Evening compensation"
staff_costnumber

Cost associated with this shift

Example:500
breaks_durationnumber

Total hours of breaks during this shift

Example:0.5
breaks_costnumber

Total salary cost associated for paid breaks during this shift

Example:40
overtime_durationnumber

Total overtime hours during this shift

Example:2
overtime_costnumber

Total salary cost associated for overtime hours

Example:120
absence_codestring

Code for the absense if this entry describes absence.

Example:"BREAK"
productiveboolean

Whether this is productive or administrative work, default is true

Example:true
active_work_timeboolean

Whether this shift is calculated in active work time, default is true

Example:true
scheduledboolean

Whether this is scheduled or punched shift, default is false

Example:false
currencystring

Currency for the purchase price as ISO 4217 currency code. Required if multiple currencies are used.

Example:"EUR"
custom_field_1string

Field that can be used for custom dimensions

Example:"XYZ"
custom_field_2string

Field that can be used for custom dimensions

Example:"XYZ"
custom_field_3string

Field that can be used for custom dimensions

Example:"XYZ"
custom_field_4string

Field that can be used for custom dimensions

Example:"XYZ"
custom_field_5string

Field that can be used for custom dimensions

Example:"XYZ"
custom_metric_1number

Custom metric 1

Example:1
custom_metric_2number

Custom metric 2

Example:100
custom_metric_3number

Custom metric 3

Example:2.2
custom_metric_4number

Custom metric 4

Example:1.05
custom_metric_5number

Custom metric 5

Example:10000
Response
{ "organisation_id": "234", "department_id": "5401", "salesperson_id": "345", "shift_id": "123", "start_date": "2016-01-01", "start_time": "15:00:00", "duration": 8.15, "shift_type": "Chef", "salary_type": "Evening compensation", "staff_cost": 500, "breaks_duration": 0.5, "breaks_cost": 40, "overtime_duration": 2, "overtime_cost": 120, "absence_code": "BREAK", "productive": true, "active_work_time": true, "scheduled": false, "currency": "EUR", "custom_field_1": "XYZ", "custom_field_2": "XYZ", "custom_field_3": "XYZ", "custom_field_4": "XYZ", "custom_field_5": "XYZ", "custom_metric_1": 1, "custom_metric_2": 100, "custom_metric_3": 2.2, "custom_metric_4": 1.05, "custom_metric_5": 10000 }