Skip to main content
All CollectionsIntegrations & APIs
Prospect Registration API
Prospect Registration API

Integrating Teach 'n Go Prospect Registration API into Your Website

Abdullah Al-Hussein avatar
Written by Abdullah Al-Hussein
Updated over 10 months ago

This guide will assist you in seamlessly integrating the Teach 'n Go Prospect Registration API into your website, enabling potential customers to register directly on your platform and transmitting these details to your Teach 'n Go school account.

Implementation of 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

username

Text

The Teach 'n Go admin username.

Yes

password

Text

The Teach 'n Go admin password.

Yes

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.

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 students chosen subject.

No

course_level

Text

The students 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

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. The example below shows how the different custom field types can be used.

{
"username": "test@test.com",
"password": "11111",
"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.

Did this answer your question?