Skip to main content

Prospect registration API

Learn how to integrate the Teach ’n Go Prospect Registration API to send website leads directly into your Teach ’n Go account.

Abdullah Al-Hussein avatar
Written by Abdullah Al-Hussein
Updated this week

If you collect enquiries or trial lesson registrations through your website, you can connect it to Teach ’n Go using the Prospect Registration API. This automatically adds new prospects to your Prospects section.

Implementing this API requires technical knowledge or access to your website’s code. If needed, share this guide with your web developer.


API endpoint

Send a POST request to:

 https://app.teachngo.com/LeadsApi/add?apikey={your-school-API-key}

You can find your API key in your Teach ’n Go account settings.


Required and optional fields

Below are the keys you can send in your JSON request:

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


Example JSON request

Below is a sample request body in JSON format:

{
"fname": "Jane",
"lname": "Doe",
"mobile_phone": "01011110",
"email_address": "jane@doe.com",
"description": "Interested in evening classes",
"school_id": "2179",
"gender": "Female",
"date_of_birth": "1995-04-01",
"course_subject": "English",
"custom_fields": {
"Nationality": "Irish",
"Is Document Submitted?": true,
"Mother Tongue": ["English", "French"],
"Start Date": "2023-06-16"
}
}

Custom field formats

Custom fields must match the type set up in your Teach ’n Go account:

  • Text box: "Field name": "Value"

  • Checkbox: "Field name": true

  • Dropdown (single or multiple): "Field name": ["Option1", "Option2"]

  • Date field: "Field name": "YYYY-MM-DD"


Enrol a prospect in a lesson via API

You can also enrol a prospect directly into a lesson using the API.

Endpoint

https://app.teachngo.com/globalApis/enrollProspect

Authentication

Pass your API key either:

  • In the header:

    X-API-KEY: yourapikey

OR

  • As a query parameter:

    ?apikey=yourapikey


Request method

POST

Request body (JSON)

{
"lesson_id": 2615398,
"prospect_id": ""
}

You will need the lesson ID and prospect ID. To get them, please follow this guide.


API responses

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"
}


If you need technical support with your integration, contact Teach ’n Go support via in-app chat or email.

Did this answer your question?