Using pickups

Once a pickup is configured for a certain product, the product detail will contain a field pickupId. The Id value is not required for further use in other API calls (it's for the future purpose), for now on it just means the pickups are configured for this product.

GET https://api.rezdy.com/latest/products/marketplace?apiKey=[API KEY]  

RESPONSE:

{  
  "requestStatus": {  
    "success": true,  
    "version": "v1"  
  },  
  "products": [  
    {  
      "productCode": "PKVT0E",  
      "pickupId": 83,  
...  

To retrieve configured pickup for the certain product, with a list of all pickup location, call the service:

GET https://api.rezdy.com/latest/products/PKVT0E/pickups?apiKey=[API_KEY]  

RESPONSE:

{  
  "requestStatus": {  
    "success": false,  
    "version": "v1"  
  },  
  "pickupLocations": [  
    {  
      "locationName": "Maroubra Beach",  
      "address": "Maroubra Beach, New South Wales, Australia",  
      "latitude": -33.94731489999999,  
      "longitude": 151.25750340000002,  
      "minutesPrior": 55,  
      "additionalInstructions": "In front of the Maroubra seal surfing club building."  
    },  
    {  
      "locationName": "Coggee",  
      "address": "Coogee, New South Wales, Australia",  
      "minutesPrior": 45,  
      "additionalInstructions": "The parking lot at the north side of the beach"  
    },  
    {  
      "locationName": "Bondi Junction",  
      "address": "Bondi Junction, New South Wales, Australia",  
      "latitude": -33.8927878,  
      "longitude": 151.2472206,  
      "minutesPrior": 30,  
      "additionalInstructions": "In front of the Westfield shopping mall"  
    }  
  ]  
}

To specify a pickup location for a booking, you just need to send one locationName field value from pickupLocations list.

POST https://api.rezdy.com/latest/bookings?apiKey=[API_KEY]  

REQUEST:

{  
    "items":  
    [  
        {  
            "productCode": "PKVT0E",  
            "startTimeLocal": "2016-07-11 14:00:00",  
            "quantities":  
            [  
                {  
                    "optionLabel": "Adult",  
                    "value": "1"  
                }  
            ],  
            "pickupLocation":  
            {  
                "locationName": "Maroubra Beach"  
            }  
        }  
    ],  

    "payments":  
    [  

    ]  
}  

System will store the pickup location, calculate pickup time and return the pickup instructions.

RESPONSE:

{  
  "requestStatus": {  
    "success": true,  
    "version": "v1"  
  },  
  "booking": {  
    "orderNumber": "R3MPR7Z",  
    ...  
    "items": [  
      {  
        "productName": "DEMO - One day SCUBA diving",  
        "productCode": "PKVT0E",  
        "startTime": "2016-07-11T04:00:00Z",  
        ....  
        "pickupLocation": {  
          "locationName": "Maroubra Beach",  
          "address": "Maroubra Beach, New South Wales, Australia",  
          "pickupTime": "2016-07-11 13:05:00",  
          "pickupInstructions": "In front of the Maroubra seal surfing club building.\r\nPlease be ready 15 minutes before pickup time."  
        }  
      }  
    ],  
    ....  

It is also possible to specify a custom pickup location (should be maybe discussed with the product supplier if this option is feasible):

REQUEST:

    {  
    "items":  
    [  
        {  
            "productCode": "PKVT0E",  
            "startTimeLocal": "2016-07-11 14:00:00",  
            "quantities":  
            [  
                {  
                    "optionLabel": "Adult",  
                    "value": "1"  
                }  
            ],  
            "pickupLocation":  
            {  
                "locationName": "Circular Quay"  
            }  
        }  
    ],  

    "payments":  
    [  

    ]  
}  

In this case system stores the pickup location (obviously it can't calculate the other fields like pickup time or address) and returns the custom pickup location instructions (if they were specified by the supplier).

RESPONSE:

{  
  "requestStatus": {  
    "success": true,  
    "version": "v1"  
  },  
  "booking": {  
    "orderNumber": "R3MPR7Z",  
    ...  
    "items": [  
      {  
        "productName": "DEMO - One day SCUBA diving",  
        "productCode": "PKVT0E",  
        "startTime": "2016-07-11T04:00:00Z",  
        ....  
       "pickupLocation": {  
          "locationName": "Circular Quay",  
          "pickupInstructions": "We will contact you to confirm your pickup location and the pickup time.\r\nPlease be ready 15 minutes before pickup time."  
        }  
      }  
    ],  
    ....