Skip to content

Commit

Permalink
booking index/form tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Kris Lemberg committed Mar 10, 2014
1 parent a701498 commit 2f5afcc
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
37 changes: 37 additions & 0 deletions docs/ref/booking.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,43 @@ booking
=======
A **booking** in the system represents an order and all associated information. It's possible to list, retrieve, create, and modify bookings in the system through use of the API.

booking
-------
.. http:method:: GET /api/3.0/booking
:optparam string status_id: The current status of a booking.
:optparam integer customer_id: The customer id associated with the booking.
:optparam string customer_email: The customer email associated with the booking.
:optparam string/timestamp start_date: The date the booking starts on (i.e. check-in).
:optparam string/timestamp end_date: The date the booking starts on (i.e. check-in).
:optparam integer limit: The limit of bookings to return per page (default: 100).
:optparam integer page: The page of results to return.

.. http:response:: Retrieves the booking index.
Details returned on *individual* bookings in the response:

:data integer booking_id: The internal index of a booking.
:data string code: The unique booking reference code.
:data string status_id: The status code of the booking.
:data string status_name: The display name of the booking status.
:data timestamp created_date: The date/time the booking was created.
:data float total: The full value of the booking.
:data float tax_total: The sum of the taxes applied to the booking.
:data float paid_total: The amount the customer has paid on the booking.
:data string customer_name: The full name of the booking contact.
:data string customer_email: The email address of the booking contact.
:data string summary: A brief description of the contents of the booking.
:data string date_desc: A string describing the booked dates/times.
:data string token: A customer token for the booking, can be used to build links to customer portions of the reservation system.

.. literalinclude:: ../examples/response/booking-index.json
:language: js
:linenos:
:lines: 23-39

Booking endpoints
-----------------
.. toctree::
:glob:
:maxdepth: 1
Expand Down
2 changes: 1 addition & 1 deletion docs/ref/booking/form.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
booking/form
------------
This call will can easily be cached if your configuration does not often change, but depending on your setup, a number of the fields returned in this request may be required to complete a booking.
This call can easily be cached if your configuration does not often change, but depending on your setup, a number of the fields returned in this request may be required to complete a booking.

You will receive an error indicating missing information if you attempt to call :doc:`create` without the required fields, either those required by staff if you're acting on behalf of a staff member, or by a customer otherwise.

Expand Down
5 changes: 4 additions & 1 deletion docs/ref/booking/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ booking/index
.. http:method:: GET /api/3.0/booking/index
:optparam string status_id: The current status of a booking.
:optparam integer customer_id: The customer id associated with the booking.
:optparam string customer_email: The customer email associated with the booking.
:optparam string/timestamp start_date: The date the booking starts on (i.e. check-in).
:optparam string/timestamp end_date: The date the booking starts on (i.e. check-in).
:optparam string/timestamp end_date: The date the booking starts on (i.e. check-in).
:optparam integer limit: The limit of bookings to return per page (default: 100).
:optparam integer page: The page of results to return.

.. http:response:: Retrieve a listing of bookings in the system.
Expand Down

0 comments on commit 2f5afcc

Please sign in to comment.