Pike13 For Developers
Get Started
Authentication
Core API
Reporting API
Webhooks API
Announcements

Core API Documentation

Appointment Availability Slots

Returns the availability for a given appointment.

Front

GET /api/v2/front/appointments/:service_id/available_slots

Lists all available times for the given appointment for the given date, or for a date range with from and to. When the available staff member is configured to be hidden in client mode, the staff member object won't be returned. When the appointment is configured to be hidden for the current user, a 404 status will be returned. When the service is configured to have a deadline for registering online, any availabilities after the deadline will be hidden. Availabilities in the past are not included.

Parameters

datedateDate filter. Defaults to today. Ignored when from and to are given.
fromdateStart of a date range, inclusive. Must be given together with to.
todateEnd of a date range, inclusive. Must be given together with from. The range is limited to 90 days; a longer range returns an error.
staff_member_idscomma delimited stringFilters availability by staff member id.
location_idscomma delimited stringFilters availability by location id.

Show curl example

REQUEST
$ curl "https://mybiz.pike13.com/api/v2/front/appointments/1/available_slots?date=2015-09-01&location_ids=1,2&staff_member_ids=1,2&client_id=XXXXXXXXXXXXXX"

RESPONSE
{
  "available_slots": [
    {
      "duration_in_minutes": 60,
      "start_at": "2015-09-09T15:00:00Z",
      "end_at": "2015-09-09T16:00:00Z",
      "date": "2015-09-09",
      "service": {
        "id": 1,
        "name": "Personal Training"
      },
      "location": {
        "id": 1,
        "name": "West Side"
      },
      "staff_member": {
        "id": 1,
        "name": "Jane Staff"
      }
    },
    {
      "duration_in_minutes": 60,
      "start_at": "2015-09-09T15:30:00Z",
      "end_at": "2015-09-09T16:30:00Z",
      "date": "2015-09-09",
      "service": {
        "id": 1,
        "name": "Personal Training"
      },
      "location": {
        "id": 2,
        "name": "East Side"
      },
      "staff_member": {
        "id": 2,
        "name": "John Staff"
      }
    }
  ]
}

GET /api/v2/front/appointments/:service_id/available_slots/summary

Returns availability "heat map" scores for the given appointment for the given date range - the parameters from and to. The score for each day is the percentage of availability relative to the day with the most availability. Days with a score of 1 have the most availability while days with a score closer to 0 have less. Scores are not returned for days in the past. Date range is limited to 90 days - the parameters from and to are inclusive. If you give a date range that is more than 90 days, it returns an error.

Parameters

fromdateDate filter. Defaults to today.
todateDate filter. Defaults to the last day of the current month.
staff_member_idscomma delimited stringFilters availability by staff member id.
location_idscomma delimited stringFilters availability by location id.

Show curl example

REQUEST
$ curl "https://mybiz.pike13.com/api/v2/front/appointments/1/available_slots/summary?from=2020-01-01&to=2020-02-10&staff_member_ids=56&location_ids=2,8&client_id=XXXXXXXXXXXXXX"

RESPONSE
{
  "2020-01-17": 1.0,
  "2020-01-18": 0,
  "2020-01-19": 0,
  "2020-01-20": 1.0,
  "2020-01-21": 1.0,
  "2020-01-22": 1.0,
  "2020-01-23": 1.0,
  "2020-01-24": 1.0,
  "2020-01-25": 0,
  "2020-01-26": 0,
  "2020-01-27": 1.0,
  "2020-01-28": 1.0,
  "2020-01-29": 1.0,
  "2020-01-30": 1.0,
  "2020-01-31": 1.0,
  "2020-02-01": 0,
  "2020-02-02": 0,
  "2020-02-03": 1.0,
  "2020-02-04": 1.0,
  "2020-02-05": 1.0,
  "2020-02-06": 1.0,
  "2020-02-07": 1.0,
  "2020-02-08": 0,
  "2020-02-09": 0,
  "2020-02-10": 1.0
}

REQUEST
$ curl "https://mybiz.pike13.com/api/v2/front/appointments/1/available_slots/summary?from=2020-01-20&to=2021-01-20&staff_member_ids=56&location_ids=2,8&client_id=XXXXXXXXXXXXXX"

RESPONSE
{
  "errors": [
    "Range exceeds allowed limit (90 days)"
  ]
}

Desk

GET /api/v2/desk/appointments/:service_id/available_slots

Lists all available times for the given appointment for the given date, or for a date range with from and to.

Parameters

datedateDate filter. Defaults to today. Ignored when from and to are given.
fromdateStart of a date range, inclusive. Must be given together with to.
todateEnd of a date range, inclusive. Must be given together with from. The range is limited to 90 days; a longer range returns an error.
staff_member_idscomma delimited stringFilters availability by staff member id.
location_idscomma delimited stringFilters availability by location id.

Show curl example

REQUEST
$ curl "https://mybiz.pike13.com/api/v2/desk/appointments/1/available_slots?date=2015-09-01&location_ids=1,2&staff_member_ids=1,2&client_id=XXXXXXXXXXXXXX"

RESPONSE
{
  "available_slots": [
    {
      "duration_in_minutes": 60,
      "start_at": "2015-09-09T15:00:00Z",
      "end_at": "2015-09-09T16:00:00Z",
      "date": "2015-09-09",
      "service": {
        "id": 1,
        "name": "Personal Training"
      },
      "location": {
        "id": 1,
        "name": "West Side"
      },
      "staff_member": {
        "id": 1,
        "name": "Jane Staff"
      }
    },
    {
      "duration_in_minutes": 60,
      "start_at": "2015-09-09T15:30:00Z",
      "end_at": "2015-09-09T16:30:00Z",
      "date": "2015-09-09",
      "service": {
        "id": 1,
        "name": "Personal Training"
      },
      "location": {
        "id": 2,
        "name": "East Side"
      },
      "staff_member": {
        "id": 2,
        "name": "John Staff"
      }
    }
  ]
}

GET /api/v2/desk/appointments/:service_id/available_slots/summary

Returns availability "heat map" scores for the given appointment for the given date range - the parameters from and to. The score for each day is the percentage of availability relative to the day with the most availability. Days with a score of 1 have the most availability while days with a score closer to 0 have less. Scores are not returned for days in the past. Date range is limited to 90 days - the parameters from and to are inclusive. If you give a date range that is more than 90 days, it returns an error.

Parameters

fromdateDate filter. Defaults to today.
todateDate filter. Defaults to the last day of the current month.
staff_member_idscomma delimited stringFilters availability by staff member id.
location_idscomma delimited stringFilters availability by location id.

Show curl example

REQUEST
$ curl "https://mybiz.pike13.com/api/v2/desk/appointments/1/available_slots/summary?from=2015-09-09&to=2015-09-30&location_ids=1,2&staff_member_ids=1,2&client_id=XXXXXXXXXXXXXX"

RESPONSE
{
  "2015-09-09": 1.0,
  "2015-09-10": 1.0,
  "2015-09-11": 0.7294117647058823,
  "2015-09-12": 0,
  "2015-09-13": 0,
  "2015-09-14": 1.0,
  "2015-09-15": 1.0,
  "2015-09-16": 1.0,
  "2015-09-17": 0.7941176470588235,
  "2015-09-18": 1.0,
  "2015-09-19": 0,
  "2015-09-20": 0,
  "2015-09-21": 1.0,
  "2015-09-22": 0.4411764705882353,
  "2015-09-23": 1.0,
  "2015-09-24": 1.0,
  "2015-09-25": 0.7823529411764706,
  "2015-09-26": 0,
  "2015-09-27": 0,
  "2015-09-28": 1.0,
  "2015-09-29": 1.0,
  "2015-09-30": 1.0
}

REQUEST
$ curl "https://mybiz.pike13.com/api/v2/front/appointments/1/available_slots/summary?from=2020-01-20&to=2021-01-20&staff_member_ids=56&location_ids=2,8&client_id=XXXXXXXXXXXXXX"

RESPONSE
{
  "errors": [
    "Range exceeds allowed limit (90 days)"
  ]
}