POST /bookings/company/{companySlug}/book

Create new booking

Headers

  • Authorization string Required

    Bearer {EASYWEEK_PARTNER_TOKEN}

Body

  • user_id number Required

    Employee id

  • reserved_on string(date-time) Required

    Booked date

  • branch_id number Required

    Company branch date booked in

  • product_id number Required

    Booked service id

  • related_ids array

    Booked related services ids

  • customer_phone string Required

    Booked customer phone

  • customer_first_name string Required

    Booked customer first name

  • customer_email string(email)

    Booked customer email

  • booking_comment string

    Booking additional description

  • booking_callback boolean

    Is callback needed

Responses

  • 200

    OK

    Hide response attributes Show response attributes object
    • hashid string(uuid) Required
    • ical string(uri) Required
POST /bookings/company/{companySlug}/book
curl \
 -X POST https://widget.easyweek.io/api/v1/bookings/company/{companySlug}/book \
 -H "Authorization: string" \
 -d '{"user_id":42.0,"reserved_on":"2021-01-16T11:15:00.000","branch_id":42.0,"product_id":42.0,"related_ids":[],"customer_phone":"string","customer_first_name":"string","customer_email":"hello@example.com","booking_comment":"string","booking_callback":true}'
Request example
# Headers
Authorization: string

# Payload
{
  "user_id": 42.0,
  "reserved_on": "2021-01-16T11:15:00.000",
  "branch_id": 42.0,
  "product_id": 42.0,
  "related_ids": [],
  "customer_phone": "string",
  "customer_first_name": "string",
  "customer_email": "hello@example.com",
  "booking_comment": "string",
  "booking_callback": true
}
Request examples
# Headers
Authorization: string

# Payload
{
  "user_id": 42.0,
  "reserved_on": "2021-01-16T11:15:00.000",
  "branch_id": 42.0,
  "product_id": 42.0,
  "related_ids": [],
  "customer_phone": "string",
  "customer_first_name": "string",
  "customer_email": "hello@example.com",
  "booking_comment": "string",
  "booking_callback": true
}
Response examples (200)
{
  "hashid": "string",
  "ical": "https://example.com"
}
Response examples (200)
{
  "hashid": "string",
  "ical": "https://example.com"
}