action squareup_create_booking { label: "CreateBooking" description: "Creates a booking." provider: squareup method: POST path: "/v2/bookings" encoding: json input: { type: "object" required: ["booking"] properties: { booking: { type: "object" description: "Represents a booking as a time-bound service contract for a seller's staff member to provide a specified service\nat a given location to a requesting customer in one or more appointment segments." properties: { appointment_segments: { type: "array" description: "A list of appointment segments for this booking." items: { type: "object" description: "Defines an appointment segment of a booking." required: ["duration_minutes", "service_variation_id", "team_member_id", "service_variation_version"] properties: { duration_minutes: { type: "integer" description: "The time span in minutes of an appointment segment." } service_variation_id: { type: "string" description: "The ID of the [CatalogItemVariation](https://developer.squareup.com/reference/square_2021-08-18/objects/CatalogItemVariation) object representing the service booked in this segment." } service_variation_version: { type: "integer" format: "int64" description: "The current version of the item variation representing the service booked in this segment." } team_member_id: { type: "string" description: "The ID of the [TeamMember](https://developer.squareup.com/reference/square_2021-08-18/objects/TeamMember) object representing the team member booked in this segment." } } } } created_at: { type: "string" description: "The timestamp specifying the creation time of this booking, in RFC 3339 format." } customer_id: { type: "string" description: "The ID of the [Customer](https://developer.squareup.com/reference/square_2021-08-18/objects/Customer) object representing the customer attending this booking" } customer_note: { type: "string" description: "The free-text field for the customer to supply notes about the booking. For example, the note can be preferences that cannot be expressed by supported attributes of a relevant [CatalogObject](https://developer.squareup.com/reference/square_2021-08-18/objects/CatalogObject) instance." } id: { type: "string" description: "A unique ID of this object representing a booking." } location_id: { type: "string" description: "The ID of the [Location](https://developer.squareup.com/reference/square_2021-08-18/objects/Location) object representing the location where the booked service is provided." } seller_note: { type: "string" description: "The free-text field for the seller to supply notes about the booking. For example, the note can be preferences that cannot be expressed by supported attributes of a specific [CatalogObject](https://developer.squareup.com/reference/square_2021-08-18/objects/CatalogObject) instance.\nThis field should not be visible to customers." } start_at: { type: "string" description: "The timestamp specifying the starting time of this booking, in RFC 3339 format." } status: { type: "string" description: "The status of the booking, describing where the booking stands with respect to the booking state machine." } updated_at: { type: "string" description: "The timestamp specifying the most recent update time of this booking, in RFC 3339 format." } version: { type: "integer" description: "The revision number for the booking used for optimistic concurrency." } } } idempotency_key: { type: "string" description: "A unique key to make this request an idempotent operation." } } } output: { type: "object" properties: { booking: { type: "object" description: "Represents a booking as a time-bound service contract for a seller's staff member to provide a specified service\nat a given location to a requesting customer in one or more appointment segments." properties: { appointment_segments: { type: "array" description: "A list of appointment segments for this booking." items: { type: "object" description: "Defines an appointment segment of a booking." required: ["duration_minutes", "service_variation_id", "team_member_id", "service_variation_version"] properties: { duration_minutes: { type: "integer" description: "The time span in minutes of an appointment segment." } service_variation_id: { type: "string" description: "The ID of the [CatalogItemVariation](https://developer.squareup.com/reference/square_2021-08-18/objects/CatalogItemVariation) object representing the service booked in this segment." } service_variation_version: { type: "integer" format: "int64" description: "The current version of the item variation representing the service booked in this segment." } team_member_id: { type: "string" description: "The ID of the [TeamMember](https://developer.squareup.com/reference/square_2021-08-18/objects/TeamMember) object representing the team member booked in this segment." } } } } created_at: { type: "string" description: "The timestamp specifying the creation time of this booking, in RFC 3339 format." } customer_id: { type: "string" description: "The ID of the [Customer](https://developer.squareup.com/reference/square_2021-08-18/objects/Customer) object representing the customer attending this booking" } customer_note: { type: "string" description: "The free-text field for the customer to supply notes about the booking. For example, the note can be preferences that cannot be expressed by supported attributes of a relevant [CatalogObject](https://developer.squareup.com/reference/square_2021-08-18/objects/CatalogObject) instance." } id: { type: "string" description: "A unique ID of this object representing a booking." } location_id: { type: "string" description: "The ID of the [Location](https://developer.squareup.com/reference/square_2021-08-18/objects/Location) object representing the location where the booked service is provided." } seller_note: { type: "string" description: "The free-text field for the seller to supply notes about the booking. For example, the note can be preferences that cannot be expressed by supported attributes of a specific [CatalogObject](https://developer.squareup.com/reference/square_2021-08-18/objects/CatalogObject) instance.\nThis field should not be visible to customers." } start_at: { type: "string" description: "The timestamp specifying the starting time of this booking, in RFC 3339 format." } status: { type: "string" description: "The status of the booking, describing where the booking stands with respect to the booking state machine." } updated_at: { type: "string" description: "The timestamp specifying the most recent update time of this booking, in RFC 3339 format." } version: { type: "integer" description: "The revision number for the booking used for optimistic concurrency." } } } errors: { type: "array" description: "Any errors that occurred during the request." items: { type: "object" description: "Represents an error encountered during a request to the Connect API.\n\nSee [Handling errors](https://developer.squareup.com/docs/build-basics/handling-errors) for more information." required: ["category", "code"] properties: { category: { type: "string" description: "The high-level category for the error." } code: { type: "string" description: "The specific code of the error." } detail: { type: "string" description: "A human-readable description of the error for debugging purposes." } field: { type: "string" description: "The name of the field provided in the original request (if any) that\nthe error pertains to." } } } } } } }