# Download bookings as JSON

**GET** `https://api.zoined.com/v2/download/bookings.json?limit=1000&offset=0&start=2021-01-01&end=2021-01-31`

Endpoint: GET /v2/download/bookings.json
Security: bearerAuth

## Security:

  - `bearerAuth` (unknown)
    http bearer token

## Query parameters:

  - `limit` (number)
    How many entries to return

  - `offset` (number)
    Which offset to return data from

  - `start` (string)
    Return data starting from given date

  - `end` (string)
    Return data ending to given date

## Response 200:

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

## Response 200 fields (application/json):

  - `booking_id` (string, required)
    Unique ID for the booking
    Example: er/232/f31

  - `booking_line_id` (string, required)
    Secondary booking identifier
    Example: 1

  - `customer_id` (string)
    Customer ID for identified customer
    Example: 32

  - `product_id` (string, required)
    Product ID
    Example: XYZ

  - `event_id` (string)
    A (string, optional) - Optional ID for the event this booking is done for.
    Example: 123

  - `organisation_id` (string, required)
    Organisation unit ID
    Example: 540

  - `department_id` (string)
    Department ID
    Example: 54011

  - `salesperson_id` (string)
    Sales person ID
    Example: 5402101

  - `booked_quantity` (number, required)
    Booked quantity
    Example: 2

  - `number_of_guests` (number)
    Number of guests booked
    Example: 2

  - `number_of_visits` (number)
    Number of visits allowed per guest within start and end dates.
    Example: 2

  - `sales_value` (number, required)
    Total booking sales amount including tax
    Example: 20

  - `sales_value_wo_vat` (number)
    Total booking sales amount without tax
    Example: 20

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

  - `canceled` (boolean)
    True when this booking has been cancelled.
    Example: false

  - `booking_date` (string, required)
    Booking date (yyyy-mm-dd)
    Example: 2020-03-01

  - `booking_time` (string)
    Booking time (HH:mm:ss)
    Example: 15:00:00

  - `event_start_date` (string, required)
    Event start date (yyyy-mm-dd)
    Example: 2020-03-10

  - `event_start_time` (string)
    Event start time (HH:mm:ss)
    Example: 15:00:00

  - `event_end_date` (string)
    Event end date (yyyy-mm-dd)
    Example: 2020-03-11

  - `event_end_time` (string)
    Event end time (HH:mm:ss)
    Example: 15:00:00

  - `booking_type` (string, required)
    Booking type. Must be either event, ticket or room.
    Example: event

  - `custom_field_1` (string)
    Custom field 1
    Example: EU only

  - `custom_field_2` (string)
    Custom field 2
    Example: EU only

  - `custom_field_3` (string)
    Custom field 3
    Example: EU only

  - `custom_field_4` (string)
    Custom field 4
    Example: EU only

  - `custom_field_5` (string)
    Custom field 5
    Example: EU only

  - `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

## Response 400:

  - `400` (unknown)
    Invalid or malformed 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)

