A booking represents block of time for an event or multiple events. Bookings can have multiple events. A booking's payments, billing item totals, line items, and category totals can also be included by adding the parameter '&show_financial=true' .
Booking Fields Overview
- name (required)
- description - additional information
- start_date - (mm/dd/yyyy)
- end_date - (mm/dd/yyyy)
- location_id - the ID of the location for this booking
- account_id (required if hotel) - Account ID for this event (see accounts API)
- contact_id (required if hotel) - Contact ID for this event (see contacts API)
Booking Financial Fields
These are only visible by adding the parameter '&show_financial=true'. This will add the following financial details under the documents node.
- billing_totals - Collection of billing totals
- description String
- value Currency
- total_price Currency
- category_totals Collection
- name String
- value Currency
- payment_set - Record that represents a set of payments for the attached document
- amount_due Currency
- running_balance Currency
- remaining_payment_amount Currency
- document_name - Name of associated Document (if applicable)
- payments - Collection - all payments belonging to the payment_set
- Id integer
- amount Currency
- state String
- custom_title String - optional custom title
- created_at date of payment creation (MM/DD/YYYY)
- due_at due date of payment (MM/DD/YYYY)
- paid_at date of payment completion (MM/DD/YYYY)
- payable_by_guest True or False
- billing_kind String - type of payment (deposit, amount_due, etc.)
- payment_method credit card, cash, etc
- credit_card_type type of card used, if applicable
- refunded_at date of refund, if applicable
- refunded_reason refund reason, if applicable
- paid_by
- custom_field if applicable
Booking Show / List Endpoints (JSON | XML schema)
GET /v1/bookings.(xml | json)
Retrieves a paginated list of bookings (50 per page, use page parameter listed below to iterate over pages).
GET /v1/bookings/{id}.(xml | json)
Retrieves an booking by its ID.
DELETE /v1/bookings/{id}.(xml | json)
Deletes the booking for the given ID.
GET /v1/bookings/search.(xml | json)?{search params}
Search for bookings using filtering parameters (listed below). Append parameters together using & (e.g., ?query=kevin&sort_direction=desc&order=created_at).
Search Parameters and values
- query - searches by name, event names
- order - created_at, updated_at, name
- sort_direction - desc, asc
- location_ids - comma separated list of location ID's
- booking_start_date - mm/dd/yyyy (also requires end date)
- booking_end_date - mm/dd/yyyy (also requires start date)
- booking_created_start_date - mm/dd/yyyy (also requires end date)
- booking_created_end_date - mm/dd/yyyy (also requires start date)
- booking_updated_start_date - mm/dd/yyyy (also requires end date)
- booking_updated_end_date - mm/dd/yyyy (also requires start date)
- page - (1..9999999)
Booking Create/Update Endpoints (JSON | XML schema)
POST /v1/bookings.(xml | json)?booking={booking parameters}
Creates a booking using the passed in booking parameters. Parameters are expected to follow the format listed in the JSON/XML schema above.
POST /v1/bookings/{id}.(xml | json)?booking={booking parameters}
Works just like the create method except you need to pass in the ID of the booking to update.
Comments
0 comments
Article is closed for comments.