Bookings
Creates a new Booking.
Create Booking
Creates a new Booking.
POST
https://api.piggy.eu/api//bookingsHeaders
Authorization
Bearer {{ api_key }}
Accept
application/json
Body
contact_uuid string
REQUIRED
The UUID of the Contact who made the booking
external_id string
OPTIONAL
An external identifier for the Booking
source string
OPTIONAL
Source from where the Booking was created
starts_at string
OPTIONAL
The start date and time of the Booking in ISO 8601 format
ends_at string
OPTIONAL
The end date and time of the Booking in ISO 8601 format
checked_in_at string
OPTIONAL
The date and time when the party checked into the booking in ISO 8601 format
number_of_people integer
OPTIONAL
The size of the party in the booking
company_name string
OPTIONAL
The name of the company for which the booking was made
status string
OPTIONAL
Status of the booking (e.g. created, in progress, canceled, completed)
prepaid_amount integer
OPTIONAL
(in cents) The amount that was paid prior to the start of the booking
Response Example
{
"data": {
"uuid": "bfada889-6a69-4fcf-aed6-42933ae9084d",
"contact": {
"uuid": "15ead936-0d0a-40ed-877b-39f22b34be53",
"email": "spongebob@bikinibottom.sea"
},
"external_id": "ee33d7e5-6cf8-445a-abd8-81e70bf4c8ad",
"source": "Website",
"starts_at": "2024-05-01T20:00:00+00:00",
"ends_at": "2024-05-01T22:30:00+00:00",
"created_at": "2024-04-25T13:35:09+00:00"
},
"meta": []
}Code
Message
1003
Invalid input.
55031
Contact not found.
1008
Shop not found.
Update Booking
Updates the attributes of a Booking. Shop and contact cannot be updated.
PUT
https://api.piggy.eu/api//bookings/{{uuid}}Headers
Authorization
Bearer {{ api_key }}
Accept
application/json
Body
external_id string
OPTIONAL
An external identifier for the Booking
source string
OPTIONAL
Source from where the Booking was created
starts_at string
OPTIONAL
The start date and time of the Booking in ISO 8601 format
ends_at string
OPTIONAL
The end date and time of the Booking in ISO 8601 format
checked_in_at string
OPTIONAL
The date and time when the party checked into the booking in ISO 8601 format
number_of_people integer
OPTIONAL
The size of the party in the booking
company_name string
OPTIONAL
The name of the company for which the booking was made
status string
OPTIONAL
Status of the booking (e.g. created, in progress, canceled, completed)
prepaid_amount integer
OPTIONAL
(in cents) The amount that was paid prior to the start of the booking
Response Example
{
"data": {
"uuid": "bfada889-6a69-4fcf-aed6-42933ae9084d",
"contact": {
"uuid": "12345-abcdefg-6789-yuiop",
"email": "spongebob@bikinibottom.sea"
},
"external_id": "V-0012",
"source": "Widget",
"starts_at": "2024-05-01T20:00:00+00:00",
"ends_at": "2024-05-01T22:30:00+00:00",
"checked_in_at": "2024-05-01T20:14:46+00:00",
"created_at": "2024-04-25T13:35:09+00:00"
},
"meta": []
}Code
Message
1003
Invalid input.