POST crm/people/hart_courses

Associate a contact or lead with a HART rider course or update the status of course for a contact or lead. (Each request can have multiple associations.)

Request Information

Parameters

NameDescription
json Note: If one person is doing to book the course which hasn’t been booked before in salesforce, some fields are mandatory, such as person_id,product_id,date_of_birth,license_type,drivers_license,mobile_phone(home_phone)street,city,state,country. If only need to update the course which has already been booked, the fields are optional but the Asset id or (Product id and Person id) still need to be provided as the begin fields.
  • person_id [ Mandatory , string ]
    The person id is lead id or contact id
  • product_id [ Mandatory , string ]
    Product id ((can get from the crm/products api))
  • asset_id [ Optional , object ]
    Asset id
  • course_datetime [ Mandatory , datetime ]
    The course datetime in asset
  • hart_instructor_1 [ Optional , string ]
    The first course instructor
  • hart_instructor_2 [ Optional , string ]
    The second course instructor
  • course_location [ Mandatory , string ]
    The course location in asset , value must be somerton,tullamarine,kilsyth,st ives,slacks creek,ipswitch or Toowoomba
  • course_feedback [ Mandatory , string ]
    The feedback of course depends on course status , value must be pass A,pass B,pass C,pass F,fail 1,fail 2,fail 3 or fail 4
  • booking_number [ Mandatory , string ]
    The order number of course
  • dealer_code [ Mandatory , string ]
    Match a dealer with asset in salesforce
  • course_price [ Mandatory , string ]
    The price of course
  • booking_source [ Mandatory , string ]
    Booking Source , value must be None,Website,Phone or In Person
  • course_status [ Mandatory , string ]
    The status of course , value must be booked,cancelled,completed - pass or completed - fail
  • mobile_phone [ Optional , string ]
    Contact Moblie Phone
  • home_phone [ Optional , string ]
    Contact Home Phone
  • postcode [ Optional , string ]
    Contact Mailing Postal Code
  • street [ Optional , string ]
    Contact Mailing Street
  • city [ Optional , string ]
    Contact Mailing City
  • state [ Optional , string ]
    Contact Status
  • country [ Optional , string ]
    Contact Mailing Country
  • drivers_license [ Optional , string ]
    The license of drivers
  • license_type [ Optional , string ]
    The type of license , value must be CYL or CYP
  • date_of_birth [ Optional , datetime ]
    The date of birth
  • opt_in [ Optional , bool ]
    Opt In

Request body formats

application/json, text/json, text/plain, application/x-www-form-urlencoded

Sample:

{
  "people_product": [{
      "person_id": "0039000002Bg9c5",
      "product_id": "01t90000000P92v",
      "asset_id": "",
      "course_datetime": "2017-12-31 13:00:00",
      "course_date_end": "2018-01-25 13:00:00",
      "course_location": "st ives",
      "hart_instructor_1": "Mark",
      "hart_instructor_2": "Frank",
      "course_status": "completed - pass",
      "course_feedback": "pass A",
      "booking_number": "002",
      "dealer_code": "1234",
      "course_price": "400",
      "booking_source": "Website",
      "mobile_phone": "012345678",
      "home_phone": "12345678",
      "postcode": "1234",
      "street": "123 Some Street",
      "city": "Some City",
      "state": "Some State",
      "country": "Some Country",
      "drivers_license": "ABDCEGF",
      "license_type": "CYL",
      "date_of_birth": "1993-01-22",
      "opt_in": false 
    },{
      "person_id": "00Q90000015YJnT",
      "product_id": "01t90000000P92v",
      "asset_id": "",
      "course_datetime": "2017-12-31 13:00:00",
      "course_date_end": "2018-01-25 13:00:00",
      "course_location": "st ives",
      "hart_instructor_1": "Mark",
      "hart_instructor_2": "Frank",
      "course_status": "completed - fail",
      "course_feedback": "fail 4",
      "booking_number": "002",
      "dealer_code": "1234",
      "course_price": "400",
      "booking_source": "Phone",
      "mobile_phone": "012345678",
      "home_phone": "12345678",
      "postcode": "1234",
      "street": "123 Some Street",
      "city": "Some City",
      "state": "Some State",
      "country": "Some Country",
      "drivers_license": "ABCDEFG12",
      "license_type": "CYL",
      "date_of_birth": "1989-02-21",
      "opt_in": false 
    },{
      "person_id": "00Q90000016CRNO", 
      "asset_id": "02i90000004WVxjAAG", 
      "course_status": "cancelled", 
      "course_datetime": "2015-12-19 12:30:00", 
      "course_date_end": "2015-12-19 14:30:00" 
}]
}

Response Information

Response body formats

application/json, text/json

Sample:

{
     "details":[
   {
     "delivery":"true",
     "receipt": "Update HART course successfully.",
     "person_id": "0039000002Bg9c5",
     "product_id": "01t90000000P92v",
     "contact_id": "0039000002Bg9c5",
     "asset_id": "02i90000002cRuSAAU",
     "course_datetime": "2017-12-31 13:00:00",
      "course_date_end": "2018-01-25 13:00:00"
   },
   {
     "delivery": "true",
     "receipt": "Update HART course successfully.",
     "person_id": "00Q90000002KUwL",
     "product_id": "01t90000000P92v",
     "contact_id": "0039000002E1z3GAAR",
     "asset_id": "02i90000002cRw4AAE",
     "course_datetime": "2017-12-31 13:00:00",
      "course_date_end": "2018-01-25 13:00:00"
   },
   {
     "delivery": "true",
     "receipt": "Update HART course successfully.",
     "person_id": "00Q90000016CRNO",
     "product_id": "01t90000000P92v",
     "contact_id": "0039000002WWxHaAAL",
     "asset_id": "02i90000004WVxjAAG",
     "course_datetime": "2017-12-31 13:00:00",
      "course_date_end": "2018-01-25 13:00:00"
   }
],
     "audit_id": "760"
}
Or Bad Response:
   Status update failed.