API - Salesforce

In addition to default API function., if you are using SalesForce
then this function can come in handy

Get all orders by Sales Force user

Returns all order for specific SalesForce user

Input

Output

Example

Payload Data

{
    "SalesForceID": "00558000001QqclAAC"
}

Call

https://demo.bookinglive.com/api/plain/?Type=APIGetOrdersBySalesForceID&Payload=%7B%22SalesForceID%22%3A%2200558000001QqclAAC%22%7D&HashString=d3a9a852f24e4aab0ec3fe392630b791ae2454a1dced8ad813bb3cd0c7a30099

Response

{
    "Orders":[
    {
        "Created": "2016-11-09 16:19:00",
        "Status": "Aborted",
        "Reference": "REF-200000-XRZ",
        "Params": {
            "op_case_number": "00001627",
            "op_redirecturl_cancel": "https:\/\/www.google.com",
            "op_redirecturl_success": "https:\/\/avdc-dsh-jarek-dev-org-developer-edition.eu6.force.com\/business\/CaseDetail?case=00001627",
            "op_test_status": null
        },
        "Events": [
            {
                "ResourceName": "Bay 1",
                "LocationName": "Aylesbury Vale District Council MOT Centre",
                "ProductName": "DBS and identification test",
                "ProductID": 4,
                "ProductDescription": "<p>DBS and identification test<\/p>",
                "StartDateTime": "2016-12-09 16:00:00",
                "EndDateTime": "2016-12-09 17:00:00"
            }
        ],
        "Notes": [
            {
                "Created": "2016-11-09 16:18:49",
                "Type": "AdminNote",
                "Note": "adsasdsdasda"
            }
        ]
    }
    ]
}

Get all orders by user Email

Returns all order for specific user email.
This function is the same as the default one but the difference here is that
when you use SalesForce SSO you need to pass SalesForce user id too.

Input

Output

Example

Payload Data

{
    "email": "m_azair@hotmail.com",
    "SalesForceID": "xxxxx888"
}

Call

https://demo.bookinglive.com/api/plain/?Type=APIGetOrdersByEmail&Payload=%7B%22Semail%22S%3A%22Sm_azair%40hotmail.com%22%2C%22SalesForceID%22%3A%2200558000001QqclAAC%22%7D&HashString=78ab503c38fce13783b0bfec3abde1abc1699a8e659db2b1c72a7f2a513187c2

Response

{"Orders":
    [{
        "Created":"2016-11-10 10:45:00",
        "Status":"Completed",
        "Reference":"REF-200113-QQF",
        "Params":[],
        "Events":[{
            "ResourceName":"Bay 3",
            "LocationName":"Aylesbury Vale District Council MOT Centre",
            "ProductName":"DBS and identification check",
            "ProductID":5,"ProductDescription":"DBS and identification check<\/p>",
            "StartDateTime":"2016-11-10 10:45:00",
            "EndDateTime":"2016-11-10 11:00:00"
        }],
        "Notes":[]
    },
    {
        "Created":"2016-11-01 00:33:00",
        "Status":"Completed",
        "Reference":"REF-200063-QQF",
        "Params":[],
        "Events":[{
            "ResourceName":"Bay 3",
            "LocationName":"Aylesbury Vale District Council MOT Centre",
            "ProductName":"DBS and identification check",
            "ProductID":5,
            "ProductDescription":"DBS and identification check<\/p>",
            "StartDateTime":"2016-11-01 00:33:00",
            "EndDateTime":"2016-11-01 00:48:00"
        }],
        "Notes":[]
    }]
}

Add a note to SalesForce Case

Add a note to SalesForce Case

Input

Output

Example

Payload Data

{
    "SalesForceID": "00558000001QqclAAC",
    "CaseID": "50058000005HI1NAAW",
    "Comment": "Comment text"
}

Call

https://demo.bookinglive.com/api/plain/?Type=APIAddNoteToSalesForceCase&Payload=%7B%22SalesForceID%22%3A%2200558000001QqclAAC%22%2C%22CaseID%22%3A%2250058000005HI1NAAW%22%2C%22Comment%22%3A%22Comment+text%22%7D&HashString=c4135427e3aa0fb9309ae2016652242f7470972a64d820f3a05fff29d7958b19

Response

{
    "Status": "True"
}

Returns all events for selected product

Returns all events for selected product. In this case this function is the same
like the default one but the differecen is that order_params for an order are returned in the response.
This order_params can be set only when a booking from external site is made.

Input

Example

Payload Data

{
    "ProductIDs": "1",
    "StartDate": "2016-11-25",
    "EndDate": "2016-11-25"
}

Call

https://demo.bookinglive.com/api/plain/?Type=APIAddNoteToSalesForceCase&Payload=%7B%ProductIDs%22%3A%1%22%2C%StartDate%22%3A%2016-11-25%22%2C%EndDate%22%3A%222016-11-25%22%7D&HashString=4d59d753d838f6ce17747c62a76969cb915709138837bd82b7c8994796272182

Response

{
"2017-01-31 16:00:00": {
    "REF-200000-UTS": {
        "Created": "2016-11-25 16:23:34",
        "Status": "Completed",
        "Reference": "REF-200000-UTS",
        "Params": {
            "op_booking_type": "Vehicle",
            "op_custom_status": null,
            "op_reg_num": "FD343GGG",
            "op_case_number": "00001627",
            "op_redirecturl_cancel": "https:\/\/www.google.com",
            "op_redirecturl_success": "https:\/\/avdc-dsh-jarek-dev-org-developer-edition.eu6.force.com\/business\/CaseDetail?case=00001627",
            "op_test_status": "booked"
        },
            "Events": [{
                "ResourceName": "Pembroke Road - 1",
                "LocationName": "18 Pembroke Road",
                "ProductName": "VCS1 - MOT taxi check",
                "ProductID": 1,
                "ProductDescription": "
                <p>VCS1 - MOT taxi check&lt;\/p>",
                "StartDateTime": "2017-01-31 16:00:00",
                "EndDateTime": "2017-01-31 17:00:00"
            }],
            "Notes": [{
                "Created": "2016-11-25 16:08:55",
                "Type": "AdminNote",
                "Note": "this is admin note"
            }]
        }
    },
}

Page last modified: March 07, 2019