Other features
Invoice the booking
Use payment: {charge: TODAY}
to invoice the booking with a positive payment.total
. This will create a new invoice with a single line item due today.
Alternatively, set payment: {charge: NOW}
to charge this invoice immediately using the default payment method associated with the given account.
Add invitees to the booking
For existing users, please provide either user_id
, or email
. If you enter an email address for which an existing user is not found, one will be created using the given email.
When you edit a booking, existing invitees will be preserved, along with their invitation status. Set invitees: []
to remove them from a booking.
query {
bookingsDraft(
input: {
account: { member_id: MEMBER_ID }
owner_user_id: USER_ID
bookings: [{
resource_id: RESOURCE_ID
invitees: [
{ user_id: USER_ID }
{ email: "EMAIL" }
{ email: "EMAIL", name: "NAME SURNAME" }
]
}]
}
) {
booking_session_id
bookings {
booking_id
invitees {
user {
user_id
fullname
}
status
}
}
}
}
Get the alternative bookings
The system suggests multiple alternatives for each booking based on the given preferences; e.g. resource type, hourly price, duration, etc.
query {
bookingsDraft(
input: {
account: { member_id: MEMBER_ID }
owner_user_id: USER_ID
bookings: [{
resource_id: RESOURCE_ID
}]
}
) {
booking_session_id
bookings {
booking_id
alternative_bookings {
booking_id
start_timestamp
end_timestamp
resources {
resource_id
}
payment {
total
}
}
}
}
}
Check the resource availability
query {
resourceAvailability(
input: {
resource: { price_hour_to: 20 }
start_timestamp: 1577869200
end_timestamp: 1577874600
duration_sec: 3600
}
) {
resource {
resource_id
title
}
available {
start_timestamp
end_timestamp
}
}
}