BDP WebAPI Documentation1.0.4

BDP Rest API Basics

Authenticating a Request

BDP APIs use a simplified version of the Amazon S3 method for authentication. Authentication is provided by placing an ‘Authorization’ header in the request containing an API key and signature generated from a shared secret.

Get Props

Returns json results for properties. Each property result is a shortened ‘summary’ json object. Full property details including all images must be pulled individually using GET /property/id.

Get Branches

GET /branches HTTP/1.1

Returns a json object for each branch. The follow example shows what details are included:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

[

{

branch_id:"122",

branchName:"Aberdeen ",

houseNo:"12",

streetName:"Main Street",

town:"Aberdeen",

addrL3:"",

postcode:"AB10 2HR",

tel1:"01224 553 000",

contactEmail:"maildesk@firm.com",

espcRef:"1000001",

gspcRef:"",

fspcRef:"",

rMoveRef:"",

atmRef:"",

dpgRef:"",

s1Ref:"",

lWebRef:"",

partnerEmail:"",

branchWebsite:"",

partnerName:""

},

{

branch_id:"999",

branchName:"Inverurie",

houseNo:"6",

streetName:"Long Place",

town:"Inverurie",

addrL3:"",

postcode:"AB51 6TN",

tel1:"01467 887 601",

contactEmail:"maildesk@firm.com",

espcRef:"1000001",

gspcRef:"",

fspcRef:"",

rMoveRef:"",

atmRef:"",

dpgRef:"",

s1Ref:"",

lWebRef:"",

partnerEmail:"",

branchWebsite:"",

partnerName:""

}

]

Get Users

GET /users HTTP/1.1

Returns all users for a given firm. Included data for each user:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

[

{

user_id:"101111",

userNme:"test@bdphq.com",

password:"password",

firstName:"Joe",

lastName:"Brown",

userStatus_id:"2",

workTel1:"",

workMob1:"",

workRole:"",

accountAdmin:"1",

branchId:"212",

techAdmin:"0",

propertyEdit:"0",

valuer:"0",

viewingAgent:"0",

negotiator:"0",

conveyancer:"0",

feeEarner:"0",

propertyAdvisor:"0",

solicitor:"0",

clientCare:"0",

propertyAdmin:"0",

inCal:"1",

firmIpHold:"0",

ipHold:"",

calEmail:"",

calColour:"",

proPic:null,

customInitials:"",

assignedAccess:"0"

},

{

user_id:"11433",

userNme:"user@bdphq.com",

password:"password",

firstName:"Dave",

lastName:"Field",

userStatus_id:"2",

workTel1:"",

workMob1:"",

workRole:"",

accountAdmin:"1",

branchId:"212",

techAdmin:"0",

propertyEdit:"1",

valuer:"0",

viewingAgent:"0",

negotiator:"1",

conveyancer:"0",

feeEarner:"0",

propertyAdvisor:"0",

solicitor:"0",

clientCare:"0",

propertyAdmin:"0",

inCal:"1",

firmIpHold:"0",

ipHold:"",

calEmail:"",

calColour:"",

proPic:null,

customInitials:"",

assignedAccess:"0"

}

]

Get Property Types

GET /propertytypes HTTP/1.1

Returns all property types. We recommend using only the superTypeId (i.e. House, Flat, etc.) to limit the amount of search options e.g. when populating a drop-down.

1

2

3

4

5

6

7

8

9

10

11

12

13

14

[

{

superTypeId:"46",

superTypeName:"House",

subTypeId:"49",

subTypeName:"Terraced"

},

{

superTypeId:"47",

superTypeName:"Flat / Apartment",

subTypeId:"284",

subTypeName:"Penthouse Flat"

}

]

Get SPC Districts

GET /spcdistricts HTTP/1.1

Returns all SPC districts. Fields include CRAD id, country, region, area and district. Snippet of returned JSON data:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

[

{

crad_id:"858",

country:"Scotland",

region:"Argyll & The Isles",

area:"Argyll & The Isles",

district:"Argyll & The Isles"

},

{

crad_id:"859",

country:"Scotland",

region:"Ayrshire",

area:"Arran Bute & Cumbrae",

district:"Arran Bute & Cumbrae"

},

{

crad_id:"860",

country:"Scotland",

region:"Ayrshire",

area:"East Ayrshire",

district:"East Ayrshire"

},

{

crad_id:"861",

country:"Scotland",

region:"Ayrshire",

area:"North Ayrshire",

district:"North Ayrshire"

},

{

crad_id:"862",

country:"Scotland",

region:"Ayrshire",

area:"South Ayrshire",

district:"South Ayrshire"

},

{

crad_id:"863",

country:"Scotland",

region:"Central Scotland",

area:"Greater Falkirk",

district:"Airth"

}

]

Webhook

The suggested method for populating a website with content from BDP is to pull the data on page load, rather than store it locally. If storing data locally, it is recommended that a full GET of property data is pulled at least once a day to avoid data inconsistencies if webhook calls are missed.

A Webhook Url can be stored in the configuration section of BDP. When a new order is initiated from BDP, a simple get request is made to the Webhook Url containing an id parameter. A typical rest client would listen for a notification, when received, it will access the API and request data for the given id.