Register Student
Register Student
Section titled “Register Student”Description
Section titled “Description”The Register Student API allows you to register a new student for a given user, uniquely identified by the :registration_id. This API is used to create student profiles associated with specific users within the Jodo system.
Endpoint
Section titled “Endpoint”POST /api/v1/integrations/erp/users/:registration_id/studentsRequest
Section titled “Request”Headers
Section titled “Headers”| Header | Value | Description |
|---|---|---|
| Content-Type | application/json | The data format for the request body. |
| Authorization | Basic ZGVtbzpwQDU1dzByZA== | Replace with your actual authorization token. |
URL Parameters
Section titled “URL Parameters”| Parameter | Description |
|---|---|
| registration_id | Unique identifier for the user. |
Request Body
Section titled “Request Body”The request body should contain the following JSON parameters:
student (object, required)
Section titled “student (object, required)”| Property | Type | Required | Description |
|---|---|---|---|
| fullname | string | Yes | The full name of the student. |
| identifier | string | Yes | An identifier for the student (e.g., student ID). |
| grade | string | Yes | The grade or class the student is in. |
| new_admission | boolean | Yes | Indicates if it’s a new admission or not. |
| academic_year_start | string | Yes | The start year of the academic year. |
| academic_year_end | string | Yes | The end year of the academic year. |
| date_of_birth | string | Yes | The date of birth of the student in “YYYY-MM-DD” format. |
| primary_contact_name | string | Yes | The name of the primary contact for the student. |
| primary_contact_number | string | Yes | The primary contact number of the student’s primary contact. |
| primary_contact_email | string | Yes | The primary contact email of the student’s primary contact. |
fee_components (array of objects, optional)
Section titled “fee_components (array of objects, optional)”| Property | Type | Required | Description |
|---|---|---|---|
| component_type | string | Yes | The type of fee component (e.g., TUITION_FEE, TRANSPORT_FEE, etc.). |
| fee_amount | number | Yes | The fee amount for the component. |
| discounts | array | No | An array of objects representing discounts applied to this component. |
payments (array of objects, optional)
Section titled “payments (array of objects, optional)”| Property | Type | Required | Description |
|---|---|---|---|
| amount | number | Yes | The payment amount. |
| paid_at | string | Yes | The date and time of the payment in ISO 8601 format. |
| mode | string | Yes | The payment mode (e.g., cash, credit card, etc.). |
| transaction_id | string | Yes | The unique transaction ID for the student. |
| settlement_utr | string | No | The settlement UTR (Unique Transaction Reference) if applicable. |
| notes | string | No | Additional notes or comments regarding the payment. |
| fee_components | array | Yes | An array of objects representing fee components included in this payment. |
Example
Section titled “Example”curl --location --globoff 'https://[base_url]/api/v1/integrations/erp/users/:registration_id/students' \--header 'Content-Type: application/json' \--header 'Authorization: Basic ZGVtbzpwQDU1dzByZA==' \--data-raw '{ "student": { "fullname": "Ron Rivest", "identifier": "STUDENT_IDENTIFIER", "grade": "fdb97be4", "new_admission": true, "academic_year_start": "2022", "academic_year_end": "2023", "date_of_birth": "2021-11-03", "primary_contact_name": "Leonard Adleman", "primary_contact_number": "9918900100", "primary_contact_email": "customer@example.com" }, "fee_components": [ { "component_type": "TUITION_FEE", "fee_amount": 10000, "discounts": [ { "value": 500, "discount_type": "SCHOLARSHIP" } ] }, { "component_type": "TRANSPORT_FEE", "fee_amount": 10500 } ], "payments": [ { "amount": 2000, "paid_at": "2022-01-29T10:05:45Z", "mode": "cash", "transaction_id": "tra_1234", "settlement_utr": "settl_1234", "notes": "advance payment", "fee_components": [ { "component_type": "TUITION_FEE", "amount": 1000 }, { "component_type": "TRANSPORT_FEE", "amount": 1000 } ] } ] }'import requestsimport json
url = "https://[base_url]/api/v1/integrations/erp/users/:registration_id/students"
payload = json.dumps({ "student": { "fullname": "Ron Rivest", "identifier": "STUDENT_IDENTIFIER", "grade": "fdb97be4", "new_admission": True, "academic_year_start": "2022", "academic_year_end": "2023", "date_of_birth": "2021-11-03", "primary_contact_name": "Leonard Adleman", "primary_contact_number": "9918900100", "primary_contact_email": "customer@example.com" }, "fee_components": [ { "component_type": "TUITION_FEE", "fee_amount": 10000, "discounts": [{"value": 500, "discount_type": "SCHOLARSHIP"}] }, {"component_type": "TRANSPORT_FEE", "fee_amount": 10500} ], "payments": [ { "amount": 2000, "paid_at": "2022-01-29T10:05:45Z", "mode": "cash", "transaction_id": "tra_1234", "settlement_utr": "settl_1234", "notes": "advance payment", "fee_components": [ {"component_type": "TUITION_FEE", "amount": 1000}, {"component_type": "TRANSPORT_FEE", "amount": 1000} ] } ]})headers = { 'Content-Type': 'application/json', 'Authorization': 'Basic ZGVtbzpwQDU1dzByZA=='}
response = requests.request("POST", url, headers=headers, data=payload)print(response.text)var request = require('request');var options = { 'method': 'POST', 'url': 'https://[base_url]/api/v1/integrations/erp/users/:registration_id/students', 'headers': { 'Content-Type': 'application/json', 'Authorization': 'Basic ZGVtbzpwQDU1dzByZA==' }, body: JSON.stringify({ "student": { "fullname": "Ron Rivest", "identifier": "STUDENT_IDENTIFIER", "grade": "fdb97be4", "new_admission": true, "academic_year_start": "2022", "academic_year_end": "2023", "date_of_birth": "2021-11-03", "primary_contact_name": "Leonard Adleman", "primary_contact_number": "9918900100", "primary_contact_email": "customer@example.com" }, "fee_components": [ { "component_type": "TUITION_FEE", "fee_amount": 10000, "discounts": [{"value": 500, "discount_type": "SCHOLARSHIP"}] }, {"component_type": "TRANSPORT_FEE", "fee_amount": 10500} ], "payments": [ { "amount": 2000, "paid_at": "2022-01-29T10:05:45Z", "mode": "cash", "transaction_id": "tra_1234", "settlement_utr": "settl_1234", "notes": "advance payment", "fee_components": [ {"component_type": "TUITION_FEE", "amount": 1000}, {"component_type": "TRANSPORT_FEE", "amount": 1000} ] } ] })};request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body);});Response
Section titled “Response”The API response will be in JSON format with the following structure:
{ "status": "success", "data": { "jodo_student_id": "student_12345" }}Response Properties
Section titled “Response Properties”| Property | Type | Description |
|---|---|---|
| status | string | Indicates the status of the API request. Possible values are “success” and “error”. |
| data | object | Contains the data related to the newly registered student. |
| data.jodo_student_id | string | The unique identifier assigned to the newly registered student within Jodo. |