• Example searches: “transaction”, “CreateOrder”, “/v2/locations”, “inventory”, “delete customer”

You are viewing an old version of the API
Search availability BETA

POST /v2/bookings/availability/search

Searches for availabilities for booking.


Permissions
APPOINTMENTS_READ
Try in API Explorer
Name Description
query
SearchAvailabilityQuery

Required

Query conditions used to filter results.

Response Fields

Name Description
availabilities
Availability [ ]

List of slots available for booking.

errors
Error [ ]

Any errors that occurred during the request.

Examples

You are viewing an old version of the API
POST /v2/bookings/availability/search
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
  • Node.js
curl https://connect.squareup.com/v2/bookings/availability/search \
  -X POST \
  -H 'Square-Version: 2021-03-17' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "query": {
      "filter": {
        "start_at_range": {
          "start_at": "2020-11-26T13:00:00Z",
          "end_at": "2020-11-27T13:00:00Z"
        },
        "location_id": "LEQHH0YY8B42M",
        "segment_filters": [
          {
            "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC",
            "team_member_id_filter": {
              "any": [
                "TMXUrsBWWcHTt79t",
                "TMaJcbiRqPIGZuS9"
              ]
            }
          }
        ]
      }
    }
  }'
Response JSON
{
  "availabilities": [
    {
      "start_at": "2020-11-26T13:00:00Z",
      "location_id": "LEQHH0YY8B42M",
      "appointment_segments": [
        {
          "duration_minutes": 60,
          "team_member_id": "TMXUrsBWWcHTt79t",
          "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC",
          "service_variation_version": 1599775456731
        }
      ]
    },
    {
      "start_at": "2020-11-26T13:30:00Z",
      "location_id": "LEQHH0YY8B42M",
      "appointment_segments": [
        {
          "duration_minutes": 60,
          "team_member_id": "TMXUrsBWWcHTt79t",
          "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC",
          "service_variation_version": 1599775456731
        }
      ]
    },
    {
      "start_at": "2020-11-26T14:00:00Z",
      "location_id": "LEQHH0YY8B42M",
      "appointment_segments": [
        {
          "duration_minutes": 60,
          "team_member_id": "TMaJcbiRqPIGZuS9",
          "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC",
          "service_variation_version": 1599775456731
        }
      ]
    },
    {
      "start_at": "2020-11-26T14:30:00Z",
      "location_id": "LEQHH0YY8B42M",
      "appointment_segments": [
        {
          "duration_minutes": 60,
          "team_member_id": "TMaJcbiRqPIGZuS9",
          "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC",
          "service_variation_version": 1599775456731
        }
      ]
    },
    {
      "start_at": "2020-11-26T15:00:00Z",
      "location_id": "LEQHH0YY8B42M",
      "appointment_segments": [
        {
          "duration_minutes": 60,
          "team_member_id": "TMaJcbiRqPIGZuS9",
          "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC",
          "service_variation_version": 1599775456731
        }
      ]
    },
    {
      "start_at": "2020-11-26T15:30:00Z",
      "location_id": "LEQHH0YY8B42M",
      "appointment_segments": [
        {
          "duration_minutes": 60,
          "team_member_id": "TMaJcbiRqPIGZuS9",
          "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC",
          "service_variation_version": 1599775456731
        }
      ]
    },
    {
      "start_at": "2020-11-26T16:00:00Z",
      "location_id": "LEQHH0YY8B42M",
      "appointment_segments": [
        {
          "duration_minutes": 60,
          "team_member_id": "TMaJcbiRqPIGZuS9",
          "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC",
          "service_variation_version": 1599775456731
        }
      ]
    },
    {
      "start_at": "2020-11-27T09:00:00Z",
      "location_id": "LEQHH0YY8B42M",
      "appointment_segments": [
        {
          "duration_minutes": 60,
          "team_member_id": "TMXUrsBWWcHTt79t",
          "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC",
          "service_variation_version": 1599775456731
        }
      ]
    },
    {
      "start_at": "2020-11-27T09:30:00Z",
      "location_id": "LEQHH0YY8B42M",
      "appointment_segments": [
        {
          "duration_minutes": 60,
          "team_member_id": "TMaJcbiRqPIGZuS9",
          "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC",
          "service_variation_version": 1599775456731
        }
      ]
    },
    {
      "start_at": "2020-11-27T10:00:00Z",
      "location_id": "LEQHH0YY8B42M",
      "appointment_segments": [
        {
          "duration_minutes": 60,
          "team_member_id": "TMXUrsBWWcHTt79t",
          "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC",
          "service_variation_version": 1599775456731
        }
      ]
    },
    {
      "start_at": "2020-11-27T10:30:00Z",
      "location_id": "LEQHH0YY8B42M",
      "appointment_segments": [
        {
          "duration_minutes": 60,
          "team_member_id": "TMXUrsBWWcHTt79t",
          "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC",
          "service_variation_version": 1599775456731
        }
      ]
    },
    {
      "start_at": "2020-11-27T11:00:00Z",
      "location_id": "LEQHH0YY8B42M",
      "appointment_segments": [
        {
          "duration_minutes": 60,
          "team_member_id": "TMXUrsBWWcHTt79t",
          "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC",
          "service_variation_version": 1599775456731
        }
      ]
    },
    {
      "start_at": "2020-11-27T11:30:00Z",
      "location_id": "LEQHH0YY8B42M",
      "appointment_segments": [
        {
          "duration_minutes": 60,
          "team_member_id": "TMaJcbiRqPIGZuS9",
          "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC",
          "service_variation_version": 1599775456731
        }
      ]
    },
    {
      "start_at": "2020-11-27T12:00:00Z",
      "location_id": "LEQHH0YY8B42M",
      "appointment_segments": [
        {
          "duration_minutes": 60,
          "team_member_id": "TMaJcbiRqPIGZuS9",
          "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC",
          "service_variation_version": 1599775456731
        }
      ]
    },
    {
      "start_at": "2020-11-27T12:30:00Z",
      "location_id": "LEQHH0YY8B42M",
      "appointment_segments": [
        {
          "duration_minutes": 60,
          "team_member_id": "TMaJcbiRqPIGZuS9",
          "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC",
          "service_variation_version": 1599775456731
        }
      ]
    },
    {
      "start_at": "2020-11-27T13:00:00Z",
      "location_id": "LEQHH0YY8B42M",
      "appointment_segments": [
        {
          "duration_minutes": 60,
          "team_member_id": "TMXUrsBWWcHTt79t",
          "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC",
          "service_variation_version": 1599775456731
        }
      ]
    },
    {
      "start_at": "2020-11-27T13:30:00Z",
      "location_id": "LEQHH0YY8B42M",
      "appointment_segments": [
        {
          "duration_minutes": 60,
          "team_member_id": "TMXUrsBWWcHTt79t",
          "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC",
          "service_variation_version": 1599775456731
        }
      ]
    },
    {
      "start_at": "2020-11-27T14:00:00Z",
      "location_id": "LEQHH0YY8B42M",
      "appointment_segments": [
        {
          "duration_minutes": 60,
          "team_member_id": "TMaJcbiRqPIGZuS9",
          "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC",
          "service_variation_version": 1599775456731
        }
      ]
    }
  ],
  "errors": []
}

Share Feedback

Thanks for visiting the Square API documentation. What's on your mind?