Enroll Student Action API
This endpoint allows the creation of a student account if it doesn't exist already on the OnlineCourseHost.com platform and enrolls the student in a particular course, all on the same call.
This endpoint is particularly useful for scenarios where you want to sell your courses in external platforms like WooCommerce or Shopify, or when you want to use other alternative payment gateways other than Stripe or Paypal (like RazorPay, MercadoLatino, etc.).
This endpoint allows you to sell your courses in those alternative payment platforms, for which we don't have a direct integration, and you can then automatically create a student account on your course website and enroll the student in the course they just paid.
This endpoint can be triggered with a POST
HTTP request to the following URL: /api/zapier-enroll-student-action-webhook
In order to call this endpoint successfully, you need to make sure that you are correctly authenticated, and that you pass the correct values on the body of the request:
Authentication
To submit a successful POST request, you need to provide the correct value in the x-integration-token
HTTP header.
You can obtain your x-integration-token by signing in with your Admin account to OnlineCourseHost.com, and then going to Admin >> Setting >> Zapier Integrations >> Activate.
See here for detailed instructions: Where to find your Zapier Integration Token
Required Headers
Make sure that you fill in these headers when calling this endpoint:
- Content-Type: application/json - Accept: application/json - X-INTEGRATION-TOKEN: put here your Zapier integration token
Request Body
To call this HTTP POST endpoint, you need to pass the following properties in the JSON body of the request:
Attribute Type Description | ||
name string Student name, optional |
||
email string Student email, required |
||
courseId string Unique identifier for the course where the student is being enrolled, required |
||
password string Password for the student account, required |
||
For finding the correct value for the courseId, you need to call first this endpoint in order to retrieve all the course Ids available: List All Courses endpoint.
Sample Response
And here is a sample HTTP response that you will get after a successful course enrollment: