Wiki
Clone wikiAPI-2.0 / Get_booking_for_customer
Method: GET
Path: /customer/bookings/:id
Get details of booking.
id
(required)
Booking unique ID.
Example response JSON
{ "id": 1, "location": { "id": 1, "name": "Sandbox", "active": true, "default": true }, "digest": "NcUHgV93Vkf7Jxgr8P6rvOi3DMLpYvc2", "service_date": "2019-08-15T14:30:00Z", "arrival_window": 0, "address": { "full_address": "595 Market St, San Francisco, CA 94105", "street": "595 Market St", "city": "San Francisco", "state": "CA", "zip": "94105", "latitude": 37.789215, "longitude": -122.4008 }, "active": true, "completed": false, "name": "First Last", "email": "user@email.com", "phone": "462-485-0790", "frequency": { "id": 1, "interval": "o", "name": "One Time" }, "payment_method_info": { "code": "cash" }, "first_recurring": false, "tip_recurring": false, "customer_notes": null, "services": [ { "id": 1, "name": "One Bedroom Apartment Cleaning", "price": 99.00, "extras": null, "pricing_parameters": null, "commercial": false, "discount_by_frequency": false, "discount_by_code": false } ], "teams": [ ], "custom_fields": [ ], "summary": { "services": 99.00, "pricing_parameters": 0.00, "extras": 0.00, "discount": 0.00, "adjustment": 0.00, "revenue": 99.00, "tip": 0.00, "total": 99.00 }, "discount_info": { }, "actions": { "edit": true, "cancel": true, "late_cancel": false, "recurring_cancel": false, "complete": false } }
Where:
id
is booking unique IDdigest
is booking unique ID (one that used in email notifications, etc.)name
is customer's nameemail
is customer's emaillocation
is booking's location, has attributes:id
is location unique IDname
is location display nameactive
tells if location is active or archiveddefault
tells if location is default location or not
service_date
is booking service date and timearrival_window
is booking arrival window in minutesaddress
is booking address, has following attributes:full_address
is formatted address stringstreet
is street address part of booking addresscity
is city part of booking addressstate
is state part of booking addresszip
is zip code (postal code) part of booking addresslatitude
andlongitude
are geographic coordinates for booking address, may be empty if address geocoding failed
phone
is customer's contact phone for the bookingfrequency
is booking's frequency, has attributes:id
is frequency unique IDname
is frequency display nameinterval
is frequency interval (value corresponds to pattern "\Ao|(\d+[dwmy])+\z"; for example:o
means one time,1w
means every week,2m15d
means every 2 months and 15 days, etc.)percent
is frequency discount (%), present only if discount greater than 0%amount
is frequency discount ($), present only if discount greater than $0- frequency cannot have both
percent
andamount
discount, so frequency will have only one of them or none of them
payment_method_info
is booking payment method details, has attributescode
is payment method code and is always presenttext
present only ifcode
="stripe", contains brand and last 4 digits of customer's default credit card registered with Stripe
services
is a list of services linked to booking (see service attributes below)summary
is booking price summary, has attributes:services
is total price for services (excluding extras and pricing parameters price)extras
is total price for extraspricing_parameters
is total price for pricing parametersdiscounts
is total amount of discounts (note: some discounts applied before tax and other discounts applied after tax, seediscount_info
)adjustment
is amount of price adjustment for bookingrevenue
is amount of revenuetax
present only if account has sales tax feature "on" (seefeatures
->booking
->sales_tax
in Get settings) and defined sales tax for booking service date; has attributes:before_tax
is total price before tax (before_tax
=revenue
)tax_percent
is tax % applied to the bookingtax_amount
is calculated tax amountafter_tax
is total price after tax applied
tip
is amount of tiptotal
is booking total amountnext_total
is estimated next booking total amount (can be different because of discounts, non-recurring extras and tip, tax %, price adjustment, first recurring booking frequency discount restriction)
discount_info
are discounts applied to booking, may have attributes:frequency_amount
is booking's discount because of frequency. Important:- this discount applied before tax
- this discount applied to:
- service and linked pricing parameter prices only if service has
discount_by_frequency
=true (see Services for booking) - extra price only if extra has
discount_by_frequency
=true (see Services for booking)
- service and linked pricing parameter prices only if service has
- this discount cannot co-exist with referral discount (
referral_amount
) or non-stackable discount by code (discount_code
) - this discount can co-exist with gift card discount (
giftcard_amount
) or stackable discount by code (discount_code
)
discount_code
is booking's discount because of discount by code. Important:- this discount applied before tax
- this discount applied to:
- service and linked pricing parameter prices only if service has
discount_by_code
=true (see Services for booking) - extra price only if extra has
discount_by_code
=true (see Services for booking)
- service and linked pricing parameter prices only if service has
- this discount cannot co-exist with referral discount (
referral_amount
) or gift card discount (giftcard_amount
) - if discount by code is stackable it can co-exist with frequency discount (
frequency_amount
) - if discount by code is non-stackable it cannot co-exist with frequency discount (
frequency_amount
)
referral_amount
is booking's discount (or revard) because of referral program. Important:- this discount applied before tax
- this discount cannot co-exist with gift card discount (
giftcard_amount
) or discount by code (discount_code
) or frequency discount (frequency_amount
)
giftcard_amount
is booking's discount because of gift card. Important:- this discount applied "the latest", i.e. after tip
- this discount cannot co-exist with referral discount (
referral_amount
) or discount by code (discount_code
) - this discount can co-exist with frequency discount (
frequency_amount
)
active
tells if booking is active or cancelledcompleted
tells if booking completed or notfirst_recurring
tells if booking is first recurring booking or nottip_recurring
tells if booking tip is recurring or notcustomer_notes
is a customer's free text notes for bookingteams
is a list of teams assigned to booking (see team attributes below)custom_fields
is a list of custom fields with values (see custom field attributes below)actions
are actions available for booking, has attributes:edit
tells if booking can be changed by customer or notcancel
tells if booking can be cancelled with no cancellation fee or notlate_cancel
tells if booking can be cancelled with cancellation fee or notrecurring_cancel
tells if booking applicable for "recurring cancel" procedureedit_tip
tells if booking's tip can be modified or notcomplete
always false for customer usershow_recurring_options
tells if customer should see recurring options or not when:- rescheduling recurring booking (see
create_next_recurring
in Update booking for customer) - cancelleing recurring booking (see Cancel booking for customer)
- rescheduling recurring booking (see
- sevice attributes:
id
is service unique IDname
is service display nameprice
is service price per unit (forhourly
services it is price per worker/hour)commercial
tells if service is commercial (cannot be added to booking by customer) or nothourly
only present for hourly services, has attributes:title
is display tital for workers (for example "maids")quantity
is a number of booked workersminutes
is a number of booked minutes per worker
discount_by_frequency
tells if discount by frequency applicable to service (and linked pricing parameters) price or notdiscount_by_code
tells if discount by code applicable to service (and linked pricing parameters) price or notextras
is list of booked extras for service (see extra attributes below)pricing_parameters
is list of booked pricing parameters for service (see pricing parameter attributes below)
- extra attributes:
id
is extra unique IDname
is extra display namequantity
is number of booked extra unitsquantity_based
tells if it is possible to book more than one unit for extra or notprice
is extra's price per unittotal
is total price for booked units (total
=price
forquantity
=1)description
is extra's description (if configured for extra)recurring
tells if extra is recurring (should be copied over to next recurring booking when next recurring booking created or not)discount_by_frequency
tells if discount by frequency applicable to extra price or notdiscount_by_code
tells if discount by code applicable to extra price or not
- pricing parameter attributes:
id
is pricing parameter unique Idname
is pricing parameter display namequantity
is number booked pricing parameter unitsprice
is pricing parameter price per unittotal
is is total price for booked units (total
=price
forquantity
=1)can_be_removed
tells if pricing parameter is not linked to service anymore, so not required for service and can be unlinked from booking (if needed)
- team attributes:
id
is team unique IDtitle
is team display nameimage
if present is team image url
- custom field attributes:
id
is custom field unique IDtitle
is custom field display titletype
is type of UI control that should be used to edit custom field value(s) (see Custom fields for booking for types description)value
is custom field value for the following types (single_line
,multi_line
,date
,datetime
orcheckbox
)values
is list of selected options for booking for custom field, every option has attributes:id
is option unique IDlabel
is option display nameother
is addition explanation provided for option
Example request:
For production, replace https://acme-sandbox.l27.co
with https://<your subdomain>.launch27.com
Replace BEARER_FROM_LOGIN with bearer
from Login
curl -H "Content-Type: application/json" \ -H 'Authorization: Bearer BEARER_FROM_LOGIN' \ -X GET -k \ https://acme-sandbox.l27.co/latest/customer/bookings/1
Response
- 401 Unauthorized on login failure.
- 403 Forbidden if customer has no access to booking.
- 200 OK on success.
Updated