Skip to main content
All CollectionsBusiness & Booking Settings
Pre-filling fields in the booking form
Pre-filling fields in the booking form

How to pass data to your hosted booking page or embedded booking widget via query strings

Updated over a week ago

First, the basics: What's a query string?

A query string is an extra bit of information that can be added to a web address in the format of ?some_field_name=value. Where some_field_name is the field's name (ex. customer_name), and value is the data you want to pass to that field (ex. Johnny).

For example, let's look at this booking URL. It has a query string (bolded) that automatically fills in the ZIP code with that preselected value when someone books from that link:

https://widget.zenbooker.com/book/manymaids?postal_code=20901

If you want to include multiple query strings in the same URL, just add an & between the additional query strings.

For example:

https://widget.zenbooker.com/book/manymaids?postal_code=20901&coupon_code=spring-clean


Passing data to your booking form via query strings

You can easily prefill fields on the booking form by adding query strings to the URL of your booking page or adding them to one of your website pages with the booking widget embedded.

For example, let's say you have an embedded booking widget on your page at example.com/book-online and want to share a link with a prefilled coupon.

You can do this by simply sharing a link that adds the ?coupon_code= query string. So it would be: example.com/book-online?coupon_code=spring-clean

The embedded booking widget will automatically detect the query string and pass it along to the booking form.


Supported query strings for prefilling data on the booking form

Field name

Description

Example

postal_code

Prefills the postal code input for the service area check

?postal_code=20901

service_address

Prefills the customer's service location in the address field.

?service_address=123+Fake+St+Silver+Spring+MD+20901

service_address_unit

Prefills the customer's apt/unit/floor field in the address field. Only works when also used with the service_address parameter.

?service_address=123+Fake+St+Silver+Spring+MD+20901&service_address_unit=B2

coupon_code

Automatically applies a coupon code if a valid code is passed

?coupon_code=save20

customer_name

Prefills the customer name field on the last page of the booking form

?customer_name=Scruffy+Jones

customer_phone

Prefills the customer phone number field. Important: Don't include the country calling code prefix in the phone number you pass - e.g., use 3015551234 instead of 13015551234

?customer_phone=3015551234

customer_email

Prefills the customer email address field

Did this answer your question?