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

You are viewing an old version of the API
Create booking BETA

POST /v2/bookings

Creates a booking.


Permissions
APPOINTMENTS_WRITE
Try in API Explorer
Name Description
idempotency_key
string

A unique key to make this request an idempotent operation.

Max Length 255
booking
Booking

Required

The details of the booking to be created.

Response Fields

Name Description
booking
Booking

The booking that was created.

errors
Error [ ]

Any errors that occurred during the request.

Examples

You are viewing an old version of the API
POST /v2/bookings
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
  • Node.js
curl https://connect.squareup.com/v2/bookings \
  -X POST \
  -H 'Square-Version: 2021-03-17' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "booking": {
      "customer_id": "EX2QSVGTZN4K1E5QE1CBFNVQ8M",
      "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
        }
      ]
    }
  }'
Response JSON
{
  "booking": {
    "id": "zkras0xv0xwswx",
    "version": 0,
    "status": "ACCEPTED",
    "created_at": "2020-10-28T15:47:41Z",
    "updated_at": "2020-10-28T15:47:41Z",
    "location_id": "LEQHH0YY8B42M",
    "customer_id": "EX2QSVGTZN4K1E5QE1CBFNVQ8M",
    "customer_note": "",
    "seller_note": "",
    "start_at": "2020-11-26T13:00:00Z",
    "appointment_segments": [
      {
        "duration_minutes": 60,
        "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC",
        "team_member_id": "TMXUrsBWWcHTt79t",
        "service_variation_version": 1599775456731
      }
    ]
  },
  "errors": []
}

Share Feedback

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