This guide will help you integrate the Teach 'n Go Prospect Registration API into your website. This will enable potential customers to register directly on your platform and send their details to your Teach 'n Go account.
Implementing this API requires technical knowledge and access to your website's programming code. Alternatively, you can provide these instructions to your website administrator.
API Keys
Below are the keys and values you can send to Teach 'n Go, along with a description for each. Note that some fields are mandatory for the API to function.
Key | Data Type | Description | Mandatory |
school_id | Text | Your school's TnG school ID. | Yes |
fname | Text | The prospect's first name. | Yes |
lname | Text | The prospect's surname | Yes |
mobile_phone | Numeric | The prospect's contact number | No |
email_address | Text | The prospect's email address | No |
description | Text | General information you wish to capture form the student | No |
gender | Text (Male | Female | Not specified) | The prospect's gender. | No |
date_of_birth | Date | The prospect's date of birth. | No |
course_subject | Text | The student's chosen subject. | No |
course_level | Text | The student's chosen level. | No |
custom_fields | Textbox: Text Checkbox: true|false Dropdown: [Array] Date box: Date | An array of your custom fields. Please check the example below for usage. | No |
Destination URL
You should point the request to the following link:
https://app.teachngo.com/LeadsApi/add?apikey={yourschools-API-Key}
Learn how to get your API Key here
Example
Below is an example of request data sent from your website to Teach 'n Go in JSON format. Custom fields can also be used, and the example below shows the different custom field types.
{
"name": "Jane",
"name": "Doe",
"mobile_phone": "01011110",
"email_address":"jane@doe.com",
"description": "Here can add extra fields data",
"school_id": "2179",
"gender": "Female",
"date_of_birth":"1995-04-01",
"subject":"English",
"custom_fields": {
// Text box example
"Nationality":"Irish",
// Check box example
"is Document submitted?":true,
// Drop down value for multiple and single selection example
"Mother tongue":["English","French","Spanish"],
// Date box example
"Date":"2023-06-16"
}
}
Enrol Prospect in a Lesson
Api key passes either in the header or as a query parameter.
Header with X-API-KEY: key value
e.g. X-API-KEY:XXXXXX
or
Query parameter apikey=keyvalue
URL | |
Method | POST |
Body | JSON |
| { "lesson_id" : 2615398, "prospect_id" : '' }
|
To get the lesson and prospect ID, please follow this guide.
Response:
Success: |
{ "status": true, "message": " Prospect enroled in the lesson successfully." }
|
Already Enrolled |
{ "status": false, "message": "Prospect already enroled in the lesson." }
|
Error |
{ "status": false, "message": "Something is wrong, Please try again.", "errors": [ "Lesson id is Required.", "Prospect id is Required." ] }
|
401 Unauthorized |
{ "status":"failed", "msg":"Invalid Login" } |
More Help?
If you need more help, please contact Teach' n Go support by emailing info@teachngo.com or sending a message through the in-app chat.