# Upload list of work shifts

**POST** `https://api.zoined.com/workShifts?dryRun=false&separator=%3B&encoding=utf-8`

Endpoint: POST /workShifts
Security: bearerAuth

## Security:

  - `bearerAuth` (unknown)
    http bearer token

## Query parameters:

  - `dryRun` (boolean, required)
    Only validate the request without storing the data

  - `separator` (string, required)
    Column separator used when loading CSV data

  - `encoding` (string, required)
    Character encoding used in the CSV data (default is utf-8)

## Request fields (application/json):

  - `shift_id` (string, required)
    Unique identifier for the workshift
    Example: 123

  - `organisation_id` (string, required)
    Organisation unit where shift will take place
    Example: 234

  - `salesperson_id` (string)
    Identifier of sales person / employee working. Required for punched shifts
    Example: 345

  - `department_id` (string)
    Store department ID
    Example: 5401

  - `scheduled` (boolean)
    Whether this is scheduled or punched shift, default is false
    Example: false

  - `productive` (boolean)
    Whether this is productive or administrative work, default is true
    Example: true

  - `active_work_time` (boolean)
    Whether this shift is calculated in active work time, default is true
    Example: true

  - `start_date` (string, required)
    Shift date (yyyy-mm-dd)
    Example: 2016-01-01

  - `start_time` (string, required)
    Shift starting time (HH:mm:ss)
    Example: 15:00:00

  - `shift_type` (string)
    Type of the shift. Freeform, will be available as dimension in portal.
    Example: Chef

  - `salary_type` (string)
    Type of compensation for the shift.
    Example: Evening compensation

  - `staff_cost` (number)
    Cost associated with this shift
    Example: 500

  - `breaks_duration` (number)
    Total hours of breaks during this shift
    Example: 0.5

  - `breaks_cost` (number)
    Total salary cost associated for paid breaks during this shift
    Example: 40

  - `overtime_duration` (number)
    Total overtime hours during this shift
    Example: 2

  - `overtime_cost` (number)
    Total salary cost associated for overtime hours
    Example: 120

  - `absence_code` (string)
    Code for the absence if this entry describes absence.
    Example: BREAK

  - `currency` (string)
    Currency for the purchase price as ISO 4217 currency code. Required if multiple currencies are used.
    Example: EUR

  - `custom_field_1` (string)
    Field that can be used for custom dimensions
    Example: XYZ

  - `custom_field_2` (string)
    Field that can be used for custom dimensions
    Example: XYZ

  - `custom_field_3` (string)
    Field that can be used for custom dimensions
    Example: XYZ

  - `custom_field_4` (string)
    Field that can be used for custom dimensions
    Example: XYZ

  - `custom_field_5` (string)
    Field that can be used for custom dimensions
    Example: XYZ

  - `custom_metric_1` (number)
    Custom metric 1
    Example: 1

  - `custom_metric_2` (number)
    Custom metric 2
    Example: 100

  - `custom_metric_3` (number)
    Custom metric 3
    Example: 2.2

  - `custom_metric_4` (number)
    Custom metric 4
    Example: 1.05

  - `custom_metric_5` (number)
    Custom metric 5
    Example: 10000

  - `source_system` (string)
    Identifier of the source system this data is from. Needed when mapping between source system identifiers and master identifiers are used.
    Example: ABCDEF

  - `duration` (number, required)
    Duration of the shift in hours.
    Example: 8.15

  - `end_date` (string, required)
    Shift ending date (yyyy-mm-dd)
    Example: 2016-01-01

  - `end_time` (string, required)
    Shift ending time (HH:mm:ss)
    Example: 20:00:00

  - `absence_code` (string)
    Code for the absense if this entry describes absence.
    Example: BREAK

## Response 200:

  - `200` (unknown)
    Request has been processed successfully.
**Headers**
- `Content-Type: application/json`

## Response 200 fields (application/json):

  - `status` (string, required)
    Status of the operation OK / Not OK
    Example: OK

  - `msg` (string, required)
    Message describing result of operation
    Example: 1 entity added

## Response 400:

  - `400` (unknown)
    Invalid, malformed or missing JSON-data in request
**Headers**
- `Content-Type: application/json`

## Response 400 fields (application/json):

  - `status` (string, required)
    Status of the operation OK / Not OK
    Example: Not OK

  - `msg` (string, required)
    Message describing result of operation
    Example: Reason for error

## Response 401:

  - `401` (unknown)
    Missing or invalid authorization token in header
**Headers**
- `Content-Type: application/json`

## Response 401 fields (application/json):

  - `status` (string, required)
    Status of the operation OK / Not OK
    Example: Not OK

  - `msg` (string, required)
    Message describing result of operation
    Example: Unauthorized

## Response 500:

  - `500` (unknown)
    Internal error or exception
**Headers**
- `Content-Type: application/json`

## Response 500 fields (application/json):

  - `status` (string, required)
    Status of the operation OK / Not OK
    Example: Not OK

  - `msg` (string, required)
    Message describing result of operation
    Example: Reason for error

## Response 200 examples:

  - `response` (unknown)

## Response 400 examples:

  - `response` (unknown)

## Response 401 examples:

  - `response` (unknown)

## Response 500 examples:

  - `response` (unknown)

