Account setup

You need to follow these steps to be able to use the Supplier API:

  1. Create a supplier account on https://app.rezdy.com. You will need a paid plan because you cannot create API bookings on a Free plan.
  2. Create a product. The product should be setup with “Fixed Dates and time” scheduling mode.
  3. Create sessions in your calendar. Sessions open availability for your product
  4. Generate an API Key by going to the API Integration settings.
  5. Read our API Overview, check out the example below and our detailed data model. Build your client and feel free to get in touch if you have any question or if you’d like to discuss the implementation of our API services.

Example flow: From browsing to booking

This example shows the API requests and responses for a typical booking flow. It helps you understand the process to replicate the Rezdy booking form through the API.

1. Load product details

When a customer browses to a specific product page on your website, you should show the product details including general pricing, description and photos.

Sample Request

GET /products/PE71B5

Sample Response

{
    "requestStatus": {
        "success": true,
        "version": "v1"
    },
    "product": {
        "productType": "ACTIVITY",
        "name": "DEMO - Single Flight",
        "shortDescription": "DEMO - Single indoor skydiving flight.",
        "description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec orci elit, hendrerit ut augue eget, mattis ullamcorper eros. Curabitur fermentum auctor augue, nec congue nunc luctus eget. In at risus id odio condimentum tempor. Vivamus sapien dui, congue eu nunc quis, laoreet mattis enim. Morbi sed consequat magna, a gravida ligula. Pellentesque sit amet mi quis ligula accumsan sagittis. Donec elementum ornare ultricies. Donec at nibh tristique, dapibus est et, vehicula augue.</p><p>Integer tincidunt quam elit, a consectetur augue pulvinar eget. Integer nec mollis velit. Donec et tristique tortor, a convallis massa. In tincidunt mauris a euismod sollicitudin. Quisque eu lobortis dolor. Phasellus vulputate nulla vel facilisis commodo. Mauris aliquet vitae odio id viverra. Vivamus ac arcu ut sem fringilla rhoncus id id neque. Ut ut diam sed mi malesuada tincidunt vel at velit. Ut vehicula tellus et ligula convallis lacinia.</p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam dui ligula, feugiat quis laoreet id, molestie aliquam augue. Curabitur rhoncus accumsan dolor, non lobortis dui aliquet vel. Quisque ut odio nec felis mattis viverra. In hac habitasse platea dictumst. Aliquam iaculis velit nisi, in iaculis odio suscipit vitae. Suspendisse commodo vitae quam nec euismod. Aenean sed libero est. Ut imperdiet mi viverra ipsum bibendum commodo. Aliquam sed justo nunc. Ut vitae sapien auctor, convallis nunc non, pharetra lectus. Nunc turpis nibh, egestas ac cursus in, semper ac libero. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla sed imperdiet tellus, quis ultricies dolor. Sed et tincidunt mauris.</p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas ullamcorper mauris vel velit fermentum, at tristique massa accumsan. Curabitur dui mi, tempus et tellus ut, rutrum ultricies neque. In in ipsum in dolor hendrerit ornare et non metus. Ut sollicitudin eros vel velit ornare suscipit. Nullam feugiat molestie interdum. Mauris non libero tincidunt, blandit nisl at, convallis urna.</p><p>Vivamus et tortor purus. In cursus, felis et vestibulum gravida, justo mi laoreet elit, accumsan hendrerit est turpis vitae diam. Mauris viverra mi et commodo luctus. Proin at mauris porttitor, aliquet sem nec, porta nibh. Aliquam tempus lacus in metus placerat, iaculis sollicitudin nisi consequat. Aliquam erat volutpat. Suspendisse tellus mi, varius vitae dolor a, pulvinar lobortis ante. Phasellus rutrum adipiscing urna ut pulvinar. Curabitur sollicitudin sapien quis ultricies congue. Donec orci tellus, suscipit sit amet congue ut, consequat sit amet leo.</p>",
        "productCode": "PF6B25",
        "internalCode": "",
        "supplierId": 9606,
        "supplierName": "Rezdy Demo",
        "timezone": "America/Los_Angeles",
        "advertisedPrice": 85,
        "priceOptions": [
            {
                "id": 18926,
                "price": 100,
                "label": "Adult",
                "seatsUsed": 1
            },
            {
                "id": 89426,
                "price": 90,
                "label": "Student",
                "seatsUsed": 1
            },
            {
                "id": 89427,
                "price": 80,
                "label": "Group",
                "seatsUsed": 1
            }
        ],
        "unitLabel": "Participant",
        "unitLabelPlural": "Participants",
        "quantityRequired": true,
        "quantityRequiredMin": 1,
        "quantityRequiredMax": 100,
        "images": [
            {
                "itemUrl": "https://d2jh4nh0bx3cra.cloudfront.net/PRODUCT_IMAGE/9606/skydive.png",
                "thumbnailUrl": "https://d2jh4nh0bx3cra.cloudfront.net/PRODUCT_IMAGE/9606/skydive_tb.png"
            }
        ],
        "bookingMode": "INVENTORY",
        "charter": false,
        "terms": "",
        "generalTerms": "Bookings\r\n\r\n→ Full payment is required at time of booking via credit card, bank transfer, or cash\r\n→ Minimum numbers for group/public tours is 4 people\r\n→ We reserve the right to cancel or reschedule if these numbers aren’t met\r\n→ Tours can be transferred to another person\r\n\r\nBad weather\r\n\r\n→ We reserve the right to cancel/reschedule the activity due to an unforeseen event or adverse weather conditions\r\n→ Bookings will be refunded or credited. If you booked through a third party, you will receive a credit with them\r\n→ If it is raining we will give you rain jackets and go ahead with the tour\r\n\r\nCancellation\r\n\r\n→ You must read and agree to Indemnity form before the tour\r\n→ If you want to postpone your booking after 5pm on the day before, there are no refunds and you will incur an admin fee of $20\r\n",
        "extras": [
            {
                "name": "DVD Video Service",
                "description": "One DVD captures everyone in your party",
                "price": 25,
                "quantity": 0
            }
        ],
        "bookingFields": [
            {
                "label": "First Name",
                "requiredPerParticipant": false,
                "requiredPerBooking": true
            },
            {
                "label": "Last Name",
                "requiredPerParticipant": false,
                "requiredPerBooking": true
            },
            {
                "label": "Phone",
                "requiredPerParticipant": false,
                "requiredPerBooking": true
            },
            {
                "label": "Email",
                "requiredPerParticipant": false,
                "requiredPerBooking": true
            },
            {
                "label": "Do you have any dietary requirements?",
                "requiredPerParticipant": false,
                "requiredPerBooking": true,
                "listOptions": "No, I have no requirements. \r\nYes, I'm Vegetarian."
            },
            {
                "label": "Hotel Pickup",
                "requiredPerParticipant": false,
                "requiredPerBooking": false,
                "listOptions": "0800 Hilton\r\n0815 Sheraton"
            }
        ],
        "latitude": -33.8676981,
        "longitude": 151.20360019999998,
        "confirmMode": "MANUAL"
    }
}

The above response includes a few important attributes that you will need to make a booking:

  • Price options: You can see there are 3 price options, with different labels (Adult, Student, Group). When you make a booking you’ll have to send the exact same label in the Quantity.optionLabel attribute.
  • Booking Fields: This is a list of the various fields required when making a booking. Some fields can be required once per booking and should be added to the Booking.fields array. Others can be required once per participant and should be added to the BookingItem.participants.fields array for each participant. The API does not enforce any mandatory field, so you are free to send none or all of them.

 

2. Check availability

When a customer wants to check availability for a specific product, you must call the /availability endpoint

Sample Request

GET /availability?productCode=PF6B25&startTimeLocal=2014-11-01&endTimeLocal=2014-11-31

This loads all the available sessions for product with code PF6B25 for the whole month of November 2014 in the local timezone setup on your account.

It is possible to load availability for multiple products in a single request. Simply add multiple productCode attributes to the request:

GET /availability?productCode=P11111&productCode=P22222&productCode=P33333&startTimeLocal=2014-11-01&endTimeLocal=2014-11-31

We recommend using startTimeLocal and endTimeLocal attributes, instead of startTime and endTime. Non-Local attributes require you to send the timezone as part of your request.

GET /availability?productCode=PF6B25&startTime=2014-11-01T00:00:00%2B11:00&endTime=2014-11-31T00:00:00%2B11:00

 

Sample Response

{
    "requestStatus": {
        "success": true,
        "version": "v1"
    },
    "sessions": [
        {
            "id": 9843251,
            "startTime": "2014-10-31T16:00:00Z",
            "endTime": "2014-10-31T20:00:00Z",
            "startTimeLocal": "2014-11-01 05:00:00",
            "endTimeLocal": "2014-11-01 09:00:00",
            "allDay": false,
            "seats": 10,
            "seatsAvailable": 6,
            "priceOptions": [
                {
                    "id": 18926,
                    "price": 100,
                    "label": "Adult",
                    "seatsUsed": 1
                },
                {
                    "id": 89426,
                    "price": 90,
                    "label": "Student",
                    "seatsUsed": 1
                },
                {
                    "id": 89427,
                    "price": 80,
                    "label": "Group",
                    "seatsUsed": 1
                }
            ]
        },
        {
            "id": 9843373,
            "startTime": "2014-10-31T22:00:00Z",
            "endTime": "2014-11-01T02:00:00Z",
            "startTimeLocal": "2014-11-01 09:00:00",
            "endTimeLocal": "2014-11-01 13:00:00",
            "allDay": false,
            "seats": 10,
            "seatsAvailable": 6,
            "priceOptions": [
                {
                    "id": 18926,
                    "price": 100,
                    "label": "Adult",
                    "seatsUsed": 1
                },
                {
                    "id": 89426,
                    "price": 90,
                    "label": "Student",
                    "seatsUsed": 1
                },
                {
                    "id": 89427,
                    "price": 80,
                    "label": "Group",
                    "seatsUsed": 1
                }
            ]
        },
        {
            "id": 9843252,
            "startTime": "2014-11-01T16:00:00Z",
            "endTime": "2014-11-01T20:00:00Z",
            "startTimeLocal": "2014-11-02 05:00:00",
            "endTimeLocal": "2014-11-02 09:00:00",
            "allDay": false,
            "seats": 10,
            "seatsAvailable": 6,
            "priceOptions": [
                {
                    "id": 18926,
                    "price": 100,
                    "label": "Adult",
                    "seatsUsed": 1
                },
                {
                    "id": 89426,
                    "price": 90,
                    "label": "Student",
                    "seatsUsed": 1
                },
                {
                    "id": 89427,
                    "price": 80,
                    "label": "Group",
                    "seatsUsed": 1
                }
            ]
        },
(....)

Important information here is:

  • startTimeLocal: This is the localized session time you need to send when making a booking for a specific session.
  • seatsAvailable: This is the number of seats available for that specific session.
  • startTime: It is also possible to use timezone-independent session start time for the product booking. However, only one of the fields startTime or startTimeLocal can be used in the booking request, therefore it is up to you to choose which way is more convenient for your client-side code. See the Date format section of our Api Overview for details.

3. Make a booking

When the customer checks out and confirms the booking, you need to record it in Rezdy by calling the /bookings endpoint.

Sample Request

The following request creates a simple booking for 2 Adults for the product we previously loaded. It’s a $200 booking for November 3rd at 9:00AM in Sydney, with a full external payment recorded. That means you charge the customer on your own website/gateway, and you simply record that payment in Rezdy, but do not process any payment through Rezdy.

POST /bookings

{
"customer": {
    "firstName": "Hugo",
    "lastName": "Sterin",
    "email": "noreply@rezdy.com",
    "phone": "0282443060"
},
"items": [ 
   {
      "productCode": "PF6B25",
      "startTime": "2014-11-02T22:00:00Z",
      "amount": 200,
      "quantities": [
    {
      "optionLabel": "Adult",
      "value": "2"
    }
      ],
       "participants": [
    {
        "fields": [
        {
            "label": "First Name",
            "value": "Hugo"
        },
        {
            "label": "Last Name",
            "value": "Sterin"
        }
        ]
    },
    {
        "fields": [
        {
            "label": "First Name",
            "value": "Simon"
        },
        {
            "label": "Last Name",
            "value": "Lenoir"
        }
        ]
    }
      ]
   }
],
"fields": [
   {
      "label": "Do you have any dietary requirements?",
      "value": "No, I have no requirements. "
   }
],
"comments": "Special requirements go here",
"resellerComments": "Your Agent voucher/redemption code should go here",
"payments": [
    {
      "type": "CREDITCARD",
      "amount": "200",
      "currency": "USD",
      "date": "2014-11-01T10:26:00Z",
      "label": "Payment processed by RezdyDemoAgent"
    }
  ]
}

 Booking request using other type of payments:

There are different payments types available for the booking. They can be split into 4 groups, based on the data sent in the request payload. Those group are:

  1. Payments recorded on Rezdy, but charged externally on your own website/gateway (one in the example above)
  2. Credit Card payments processed through Rezdy
  3. Bank Transfer / Cash / Invoice payments
  4. Paypal

Credit card payments:

In case of credit card payment processed through Rezdy, the “payments” section has to be omitted. Credit card object is used instead, with the data as shown below:

"paymentOption": "CREDITCARD",
"creditCard": {
      "cardName": "test",
      "cardType": "VISA",
      "expiryMonth": "12",
      "expiryYear": "2017",
      "cardNumber": "4242424242424242",
      "cardSecurityNumber": "123"
}

“cardSecurityNumber” is optional depending on selected CCV options in your payment gateway settings. Please note you need to setup a Payment Gateway in your settings before you can process a credit card payment through the API. See Settings -> Online Payments

Bank Transfer / Cash / Invoice payments:

For the Bank Transfer, Cash or Invoice payments specify the payment option as one of BANKTRANSFER, CASH or INVOICE, for the relevant section to appear on customer’s confirmation emails.

"paymentOption": "BANKTRANSFER",

Paypal: This payment type is currently under development and will be provided soon.

Sample Response

The response will contain all the information for the booking that was just created. The most important information here is the OrderNumber, which always starts with R (I.e. RD7PA1I). That’s the number you should show customers and print on booking confirmations.

{
    "requestStatus": {
        "success": true,
        "version": "v1"
    },
    "booking": {
        "customer": {
            "id": 502281,
            "firstName": "Hugo",
            "lastName": "Sterin",
            "name": "Hugo Sterin",
            "email": "noreply@rezdy.com",
            "phone": "0282443060"
        },
        "supplierId": 9606,
        "supplierName": "Rezdy Demo",
        "resellerId": 2404,
        "resellerName": "Rezdy Agent Demo",
        "orderNumber": "RD7PA1I",
        "items": [
            {
                "productName": "DEMO - Single Flight",
                "productCode": "PF6B25",
                "startTime": "2014-11-02T22:00:00Z",
                "endTime": "2014-11-03T02:00:00Z",
                "startTimeLocal": "2014-11-03 09:00:00",
                "endTimeLocal": "2014-11-03 13:00:00",
                "quantities": [
                    {
                        "optionLabel": "Adult",
                        "optionPrice": 100,
                        "value": 2
                    }
                ],
                "totalQuantity": 2,
                "amount": 200,
                "extras": [],
                "participants": [
                    {
                        "fields": [
                            {
                                "label": "First Name",
                                "value": "Hugo",
                                "requiredPerParticipant": false,
                                "requiredPerBooking": false
                            },
                            {
                                "label": "Last Name",
                                "value": "Sterin",
                                "requiredPerParticipant": false,
                                "requiredPerBooking": false
                            }
                        ]
                    },
                    {
                        "fields": [
                            {
                                "label": "First Name",
                                "value": "Simon",
                                "requiredPerParticipant": false,
                                "requiredPerBooking": false
                            },
                            {
                                "label": "Last Name",
                                "value": "Lenoir",
                                "requiredPerParticipant": false,
                                "requiredPerBooking": false
                            }
                        ]
                    }
                ],
                "subtotal": 200
            }
        ],
        "totalAmount": 200,
        "totalCurrency": "USD",
        "totalPaid": 200,
        "totalDue": 0,
        "dateCreated": "2014-11-05T03:04:04.007Z",
        "datePaid": "2014-11-05T03:04:04.007Z",
        "status": "CONFIRMED",
        "comments": "Special requirements go here\r\n",
        "internalNotes": "Internal notes go here",
        "payments": [
            {
                "type": "CREDITCARD",
                "amount": 200,
                "currency": "USD",
                "date": "2014-11-11T10:26:00Z",
                "label": "Payment processed by Rezdy Agent Demo"
            }
        ],
        "fields": [
            {
                "label": "Do you have any dietary requirements?",
                "value": "No, I have no requirements. ",
                "requiredPerParticipant": false,
                "requiredPerBooking": false
            }
        ],
    "source": "PARTNERS",
        "resellerSource": "API",
        "sourceChannel": "REZDYAGENTDEMO",
        "commission": 15,
        "vouchers": []
    }
}

Some more complex examples are coming soon, including:

  • Booking a product with taxes
  • Override the booking amount