Advertisement
Guest User

Untitled

a guest
Feb 3rd, 2016
332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1.  
  2. Authentication
  3. REQUEST:
  4. POST /sales/1.1/auth HTTP/1.1
  5. Host: api.related.com
  6. Cache-Control: no-cache
  7. Content-Type: application/x-www-form-urlencoded
  8.  
  9. grant_type=password&username={username}&password={password}
  10.  
  11. SUCCESS RESPONSE (JSON):
  12. HTTP 200
  13. {
  14. "access_token": "abcdefg1234567",
  15. "token_type": "bearer",
  16. "expires_in": 599
  17. }
  18.  
  19. ERROR RESPONSE (JSON):
  20. HTTP 401
  21. {
  22. "error": "invalid_grant",
  23. "error_description": "The user name or password is incorrect."
  24. }
  25.  
  26. Insert Prospect
  27. REQUEST:
  28. POST /sales/1.0/properties/215/prospects HTTP/1.1
  29. Host: api.related.com
  30. Authorization: Bearer {access_token}
  31. Content-Type: application/json
  32. Cache-Control: no-cache
  33.  
  34. {
  35. "followupCode": "E",
  36. "source": "Ad: Online",
  37. "firstName" : "First Name",
  38. "lastName": "Last Name",
  39. "email": "EmailAddress@gmail.com",
  40. "phone": "212-222-2222",
  41. "postalcode" : "10019",
  42. "country": "US"
  43. }
  44.  
  45. SUCCESS RESPONSE:
  46. HTTP 200
  47.  
  48. ERROR RESPONSE:
  49. HTTP 400
  50. {
  51. "message": "Prospect Object Invalid:\n Error message from BCMS",
  52. "statusCode": 400
  53. }
  54.  
  55. Get Marketing Sources
  56. REQUEST:
  57. GET /sales/1.0/properties/{propertyId}/marketingsources HTTP/1.1
  58. Host: api.related.com
  59. Authorization: Bearer {access_token}
  60. Content-Type: application/json
  61. Cache-Control: no-cache
  62.  
  63. RESPONSE:
  64. HTTP 200
  65. ["Marketing Source", "Marketing Source"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement