Skip to content

E-commerce integration

E-commerce integration can be used to allow candidates to self-enrol in a long-running event.

  • A product catalogue is setup in WooCommerce, where each product is associated with an Organisation Unit and test event.
  • Endpoints allow the sales of new tests by enrolling a candidate to one or more test events.
  • Candidates can purchase a seat for an event at a location, which automatically creates a Janison Insights enrolment at a given test centre.
  • Removal of an enrolment is possible for cancellations.

The following table provides details of the e-commerce integration endpoint, methods and parameters.

Function Endpoint Details
Enrol User /api/enrolments/enroluser Method: GET Parameters: catalogueitemid=" . $catalogueItemId . "&username=" . $billing_username . "&firstname=" . $billing_first_name . "&lastname=" . $billing_last_name . "&email=" . $billing_email . "&checkExistingEnrolments=true / false
Remove Enrolment /api/enrolments/removeenrol Method: GET Parameters: ?enrolid=" . $enrol_id;
Create or Update User /api/user/createorupdateuser Method: POST Body: {"UserDetails":{"Username":"'.$current_user->user_email.'", "Surname":"'.$current_user->user_lastname.'","GivenName":"'.$current_user->user_firstname.'" },"Options":{ "AllowUpdateUsers":true }}