Wiki

Clone wiki

API-2.0 / Booking_form_setup

Method: GET

Path: /booking/form

Get form setup.

Query params

type (optional)

Booking form type. If not provided, default booking form setup returned.

Supported types (features->new_booking_form_widget required, see Get settings): cleaning, auto, lawn, carpet.

Example of response (default)

{
  "headings": [
    {
      "id": 1,
      "code": "booking_next_total",
      "label": "Your final price is:",
      "show": false,
      "ordering": 0
    },
    {
      "id": 2,
      "code": "booking_today_total",
      "label": "First Service",
      "show": false,
      "ordering": 0
    },
    {
      "id": 3,
      "code": "you_are",
      "label": "STEP 1: WHO YOU ARE",
      "show": true,
      "ordering": 1
    },
    {
      "id": 4,
      "code": "your_home",
      "label": "STEP 2: YOUR HOME",
      "show": true,
      "ordering": 6
    },
    {
      "id": 5,
      "code": "choose_service",
      "label": "STEP 3: CHOOSE YOUR SERVICE",
      "show": true,
      "ordering": 10
    },
    {
      "id": 6,
      "code": "select_extras",
      "label": "STEP 4: SELECT EXTRAS",
      "show": true,
      "ordering": 15
    },
    {
      "id": 7,
      "code": "custom_fields",
      "label": "CUSTOM FIELDS",
      "show": false,
      "ordering": 17
    },
    {
      "id": 4,
      "code": "select_frequency_and_payment",
      "label": "STEP 5: SELECT FREQUENCY AND PAYMENT",
      "show": true,
      "ordering": 26
    },
    {
      "id": 5,
      "code": "what_next",
      "label": "WHAT HAPPENS NEXT?",
      "show": false,
      "ordering": 31
    },
    {
      "id": 6,
      "code": "booking_subtotal",
      "label": "SUB-TOTAL",
      "show": true,
      "ordering": 33
    },
    {
      "id": 7,
      "code": "booking_tip",
      "label": "TIP",
      "show": false,
      "ordering": 34
    },
    {
      "id": 8,
      "code": "booking_discount",
      "label": "DISCOUNT",
      "show": false,
      "ordering": 35
    },
    {
      "id": 9,
      "code": "booking_sales_tax",
      "label": "SALES TAX",
      "show": true,
      "ordering": 36
    },
    {
      "id": 10,
      "code": "booking_total",
      "label": "Your final price is:",
      "show": true,
      "ordering": 37
    }
  ],
  "paragraphs": {

  },
  "system_fields": {
    "address": {
      "id": 20,
      "label": "Address",
      "show": true,
      "value_required": true,
      "ordering": 7
    },
    "card_cvc": {
      "id": 21,
      "label": "Card CVC",
      "show": true,
      "value_required": true,
      "ordering": 29
    },
    "card_expires": {
      "id": 22,
      "label": "Expires on",
      "show": true,
      "value_required": true,
      "ordering": 30
    },
    "card_number": {
      "id": 23,
      "label": "Card Number",
      "show": true,
      "value_required": true,
      "ordering": 28
    },
    "city": {
      "id": 24,
      "label": "City",
      "show": false,
      "value_required": true,
      "ordering": 8
    },
    "customer_notes": {
      "id": 25,
      "label": "Special Instructions",
      "show": true,
      "value_required": false,
      "ordering": 16
    },
    "discount_code": {
      "id": 26,
      "label": "Discount Code (or leave this blank)",
      "show": true,
      "value_required": false,
      "ordering": 13
    },
    "email": {
      "id": 27,
      "label": "Email",
      "show": true,
      "value_required": true,
      "ordering": 4
    },
    "first_name": {
      "id": 28,
      "label": "First Name",
      "show": true,
      "value_required": true,
      "ordering": 2
    },
    "frequency": {
      "id": 29,
      "label": "Frequency of Service",
      "show": true,
      "value_required": true,
      "ordering": 27
    },
    "last_name": {
      "id": 30,
      "label": "Last Name",
      "show": true,
      "value_required": true,
      "ordering": 3
    },
    "phone": {
      "id": 31,
      "label": "Phone",
      "show": true,
      "value_required": true,
      "ordering": 5
    },
    "service": {
      "id": 32,
      "label": "Type of Service",
      "show": true,
      "value_required": true,
      "ordering": 11
    },
    "service_date": {
      "id": 33,
      "label": "Date / Time",
      "show": true,
      "value_required": true,
      "ordering": 12
    },
    "service_workers": {
      "id": 34,
      "label": "Maid",
      "show": true,
      "value_required": false,
      "ordering": 25
    },
    "sms_notifications": {
      "id": 35,
      "label": "Send me reminders about my booking via text message",
      "show": true,
      "value_required": false,
      "ordering": 24
    },
    "state": {
      "id": 36,
      "label": "State",
      "show": true,
      "value_required": true,
      "ordering": 9
    },
    "tip": {
      "id": 37,
      "label": "Tip",
      "show": false,
      "value_required": false,
      "ordering": 14
    },
    "zip": {
      "id": 38,
      "label": "Zip Code",
      "show": true,
      "value_required": true,
      "ordering": 9
    }
  },
  "content_areas": {

  },
  "settings": {
    "submit_button": {
      "button_text": "Book Appointment",
      "button_color": "rgb(95, 163, 65)",
      "border_color": "rgb(82, 142, 56)",
      "font_family": "BebasNeueRegular,arial",
      "font_color": "rgb(255, 255, 255)"
    },
    "form": {
      "border_color": "#aeaeae",
      "label_color": "#333333",
      "label_font": "Arial,Helvetica,sans-serif",
      "text_color": "#333333",
      "text_font": "Arial,Helvetica,sans-serif",
      "heading_color": "#333333",
      "heading_font": "BebasNeueRegular,arial",
      "custom_css": ""
    }
  }
}

Where:

  • headings is a list of headings; sorting: active DESC, ordering ASC, name ASC; headig attributes:
    • id is heading unique ID
    • code is heading unique code
    • label is heading display text
    • show tells if heading is visible or hidden
    • ordering is configured heading position in headings list
  • paragraphs is a hash (not sorted !) of paragraphs, it is always empty for default form; hash key is paragraph's unique code, value has attributes:
    • id is paragraph's unique ID
    • text is paragraphs text (may contain html code)
    • show tells if paragraph is visible or hidden
  • system_fields is a hash (not sorted !) of system fields; hash key is system field's unique code, value has attributes:
    • id is system field unique ID
    • label is system field display text
    • show tells if system field is visible or hidden
    • value_required tells if user must provide value for system field or not
    • ordering is configured system field position in system fields list
  • content_areas is a hash (not sorted !) of content areas, it is always empty for default form; currenly it is possible to have only one content area per booking form; hash key is content area's unique code (which is content_area for the only content area form has), value has attributes:
    • id is content area's unique ID
    • html is content area's html code
  • settings is a set of booking form preferences, has attributes:
    • submit_button is a set of display preferences for booking form submit button, has atributes:
      • button_text is text that should appear on the button, attribute always present
      • button_color is button color preference, attribute may or may not present
      • border_color is button border color preference, attribute may or may not present
      • font_family is preferred font family for the button text, attribute may or may not present
      • font_color is preferred color for the button text, attribute may or may not present
    • apply_button is a set of display preferences for booking form apply button, may or may not present, has atributes:
      • button_text is text that should appear on the button, attribute always present
    • form is a set of form appearance preferences, has attributes:
      • background_color is preferred color for booking form background, may or may not present
      • background_image is image to be used for booking form background, may or may not present
      • background_type is type of preferred background, if present its value is "transparent", "image" or "color"
      • border_color is preferred color for booking form border, may or may not present
      • panel_color is preferred background color for booking form panel elements, may or may not present
      • primary_color is preferred booking form primary color, may or may not present
      • secondary_color is preferred booking form secondary color, may or may not present
      • label_color is preferred color for booking form labels' text
      • label_font is preferred font family for booking form labels' text
      • text_color is preferred color for booking form text
      • text_font is preferred font family for booking text
      • heading_color is preferred color for booking form heading' text
      • heading_font is preferred font family for booking form heading' text
      • hide_sidebar tells if booking for sidebar should be hidden or visible, may or may not present
      • service_block_type is preferred way to show booking services, if present its value is "dropdown", "accordion" or "icon"
      • custom_css is booking form custom css
  • extras_tables is configuration of extras table, present only for booking form with type "carpet", extras table has attributes:
    • location_id is location unique ID (see Locations for booking)
    • service_id is service unique Id (see Services for booking)
    • columns is list of configured extra table's columns, column has attributes:
      • id is unique column ID
      • title is display text for column, could be empty
    • rows is list of configured extra table's rows, row has attributes:
      • id is unique row ID
      • title is display text for row, could be empty
    • cells is list of configured extra table's cells (not all combinations, cell has attributes:
      • column_id is column unique ID (see columns)
      • row_id is row unique ID (see rows)
      • extra_id is unique extra ID (see extras for service in Services for booking).

Example of paragraph:

    "agreement_information": {
      "id": 51,
      "text": "By clicking the Book Now button you are agreeing to our Terms of Service and Privacy Policy.",
      "show": true
    },

Example of content_area:

    "content_area": {
      "id": 90,
      "html": "\n\n\u003cdiv class=\"form_section text-center\" id=\"content_panel\" style=\"box-sizing: border-box; text-align: center; padding: 30px 0px 0px; border-radius: 2px; color: rgb(171, 171, 171); font-family: proxima, arial; font-size: 16px; line-height: 22.8571434020996px; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\"\u003e\u003cdiv class=\"icon-sidebar\"\u003e\u003csvg role=\"img\" class=\"clock\" x=\"0px\" y=\"0px\" width=\"28px\" height=\"28px\" viewBox=\"0 0 281.965 281.965\" enable-background=\"new 0 0 281.965 281.965\" xml:space=\"preserve\"\u003e\u003cuse xlink:href=\"/images/tenant/form/icons.svg#clock\"\u003e\u003c/use\u003e\u003c/svg\u003e\u003c/div\u003e\u003ch4 style=\"box-sizing: border-box; font-family: inherit; font-weight: bold; line-height: 1.1; color: rgb(55, 62, 74); margin-top: 8.5px; margin-bottom: 8.5px; padding: 0px 20px;\"\u003eSAVES YOU TIME\u003c/h4\u003e\u003cp style=\"box-sizing: border-box; margin: 0px 0px 8.5px; padding: 0px 20px 40px; font-weight: lighter; font-family: proxima,arial; color: rgb(64, 52, 52);\"\u003eOur service helps you live smarter, giving you time to focus on what's most important.\u003c/p\u003e\u003cdiv class=\"icon-sidebar\"\u003e\u003csvg role=\"img\" class=\"shield\" x=\"0px\" y=\"0px\" width=\"28px\" height=\"31px\" viewBox=\"0 0 212.59 296.004\" enable-background=\"new 0 0 212.59 296.004\" xml:space=\"preserve\"\u003e\u003cuse xlink:href=\"/images/tenant/form/icons.svg#shield\"\u003e\u003c/use\u003e\u003c/svg\u003e\u003c/div\u003e\u003ch4 style=\"box-sizing: border-box; font-family: inherit; font-weight: bold; line-height: 1.1; color: rgb(55, 62, 74); margin-top: 8.5px; margin-bottom: 8.5px; padding: 0px 20px;\"\u003eSAFETY FIRST\u003c/h4\u003e\u003cp style=\"box-sizing: border-box; margin: 0px 0px 8.5px; padding: 0px 20px 40px; font-weight: lighter; font-family: proxima,arial; color: rgb(64, 52, 52);\"\u003eWe rigorously vet all of our Cleaners, who undergo identity checks as well as in-person interviews.\u003c/p\u003e\u003cdiv class=\"icon-sidebar\"\u003e\u003csvg role=\"img\" class=\"thumb-up\" x=\"0px\" y=\"0px\" width=\"28px\" height=\"25px\" viewBox=\"0 0 286.198 266.346\" enable-background=\"new 0 0 286.198 266.346\" xml:space=\"preserve\"\u003e\u003cuse xlink:href=\"/images/tenant/form/icons.svg#thumb-up\"\u003e\u003c/use\u003e\u003c/svg\u003e\u003c/div\u003e\u003ch4 style=\"box-sizing: border-box; font-family: inherit; font-weight: bold; line-height: 1.1; color: rgb(55, 62, 74); margin-top: 8.5px; margin-bottom: 8.5px; padding: 0px 20px;\"\u003eONLY THE BEST QUALITY\u003c/h4\u003e\u003cp style=\"box-sizing: border-box; margin: 0px 0px 8.5px; padding: 0px 20px 40px; font-weight: lighter; font-family: proxima,arial; color: rgb(64, 52, 52);\"\u003eOur skilled professionals go above and beyond on every job. Cleaners are rated and reviewed after each task.\u003c/p\u003e\u003cdiv class=\"icon-sidebar\"\u003e\u003csvg role=\"img\" class=\"cleaning-bottle\" x=\"0px\" y=\"0px\" width=\"23px\" height=\"39px\" viewBox=\"0 0 165.503 284.223\" enable-background=\"new 0 0 165.503 284.223\" xml:space=\"preserve\"\u003e\u003cuse xlink:href=\"/images/tenant/form/icons.svg#cleaning-bottle\"\u003e\u003c/use\u003e\u003c/svg\u003e\u003c/div\u003e\u003ch4 style=\"box-sizing: border-box; font-family: inherit; font-weight: bold; line-height: 1.1; color: rgb(55, 62, 74); margin-top: 8.5px; margin-bottom: 8.5px; padding: 0px 20px;\"\u003eEASY TO GET HELP\u003c/h4\u003e\u003cp style=\"box-sizing: border-box; margin: 0px 0px 8.5px; padding: 0px 20px 40px; font-weight: lighter; font-family: proxima,arial; color: rgb(64, 52, 52);\"\u003eSelect your ZIP code, number of bedrooms and bathrooms, date and relax while we take care of your home.\u003c/p\u003e\u003cdiv class=\"icon-sidebar\"\u003e\u003csvg role=\"img\" class=\"bubble\" x=\"0px\" y=\"0px\" width=\"33px\" height=\"29px\" viewBox=\"0 0 309.063 268\" enable-background=\"new 0 0 309.063 268\" xml:space=\"preserve\"\u003e\u003cuse xlink:href=\"/images/tenant/form/icons.svg#bubble\"\u003e\u003c/use\u003e\u003c/svg\u003e\u003c/div\u003e\u003ch4 style=\"box-sizing: border-box; font-family: inherit; font-weight: bold; line-height: 1.1; color: rgb(55, 62, 74); margin-top: 8.5px; margin-bottom: 8.5px; padding: 0px 20px;\"\u003eSEAMLESS COMMUNICATION\u003c/h4\u003e\u003cp style=\"box-sizing: border-box; margin: 0px 0px 8.5px; padding: 0px 20px 40px; font-weight: lighter; font-family: proxima,arial; color: rgb(64, 52, 52);\"\u003eOnline communication makes it easy for you to stay in touch with your Cleaners.\u003c/p\u003e\u003cdiv class=\"icon-sidebar\"\u003e\u003csvg role=\"img\" class=\"visa\" x=\"0px\" y=\"0px\" width=\"31px\" height=\"21px\" viewBox=\"0 0 378 235\" enable-background=\"new 0 0 378 235\" xml:space=\"preserve\"\u003e\u003cuse xlink:href=\"/images/tenant/form/icons.svg#visa\"\u003e\u003c/use\u003e\u003c/svg\u003e\u003c/div\u003e\u003ch4 style=\"box-sizing: border-box; font-family: inherit; font-weight: bold; line-height: 1.1; color: rgb(55, 62, 74); margin-top: 8.5px; margin-bottom: 8.5px; padding: 0px 20px;\"\u003eCASH FREE PAYMENT\u003c/h4\u003e\u003cp style=\"box-sizing: border-box; margin: 0px 0px 8.5px; padding: 0px 20px 40px; font-weight: lighter; font-family: proxima,arial; color: rgb(64, 52, 52);\"\u003ePay securely online only when the cleaning is complete.\u003c/p\u003e\u003c/div\u003e\n\n"
    }

Example of extras tables:

  "extras_tables": [
    {
      "location_id": 1,
      "service_id": 9,
      "columns": [
        {
          "id": 1,
          "title": "column 1"
        },
        {
          "id": 2,
          "title": "column 2"
        }
      ],
      "rows": [
        {
          "id": 1,
          "title": "row 1"
        },
        {
          "id": 2,
          "title": "row 2"
        }
      ],
      "cells": [
        {
          "column_id": 1,
          "row_id": 1,
          "extra_id": 4
        },
        {
          "column_id": 1,
          "row_id": 2,
          "extra_id": 4
        },
        {
          "column_id": 2,
          "row_id": 1,
          "extra_id": 4
        },
        {
          "column_id": 2,
          "row_id": 2,
          "extra_id": 4
        }
      ]
    }
  ]

Example request:

For production, replace https://acme-sandbox.l27.co with https://<your subdomain>.launch27.com

curl -H "Content-Type: application/json" \
     -X GET -k \
     https://acme-sandbox.l27.co/latest/booking/form

Updated