Docs home

Create Batch

Creates a batch for a course, with one class per subject (curriculum) and the tutor for each. Learners are then enrolled into the batch.

POST/masterbatch
Create Batch
curl --request POST \
  --url 'https://<your-api-host>/nuSource/api/v1/masterbatch' \
  --header 'APIKEY: <your-api-key>' \
  --header 'ORGID: <your-org-id>' \
  --form 'JSONString={"class_name":"IIT JEE Foundation Batch - March 2026","tutor_id":"1025","organization_id":45,"start_date":"09 Mar 2026","end_date":"30 Jun 2026","courses_array":[{"course_id":23,"batch_name":"Physics for IIT JEE - Mechanics Module","tutor_id":"1025"},{"course_id":24,"batch_name":"Chemistry for IIT JEE - Organic Chemistry","tutor_id":"1032"},{"course_id":236,"batch_name":"Mathematics for IIT JAM - Algebra & Calculus","tutor_id":"1041"}],"bundle_id":5012,"individual_batch_attendance":1}'
{
  "code": 200,
  "message": "Class Created",
  "master_batch_id": 2338,
  "classes": [
    {
      "class_id": 4397,
      "course_id": 23
    },
    {
      "class_id": 4398,
      "course_id": 24
    },
    {
      "class_id": 4399,
      "course_id": 236
    }
  ]
}

Access: Institute admins, tutors, plus custom roles that can manage batches.

Request body: form-data with one field, JSONString, containing this JSON:

BodyJSONString
Batch name. Defaults to the course name.
bundle_idintegerrequired
Course (bundle) ID the batch belongs to.
tutor_idintegerrequired
User ID of the batch manager.
Organization (branch) of the batch. Defaults to your current organization.
Batch start date, e.g. 18 Aug 2021.
end_datestring
Batch end date, e.g. 31 Jul 2023.
0 (default) attendance is taken per class. 1 one common attendance for all classes held on the same day.
courses_arrayarrayrequired
The classes in the batch (fields below). At least one.
Start date passed to each new class's schedule.

Fields in each courses_array object (one per class, i.e. one subject taught in the batch):

Name Required Type Description
class_id No integer An existing class to keep (on update) or reuse (on create). Leave it out to create a new class.
course_id Yes for new classes integer Curriculum ID the class teaches. Use a curriculum linked to the course.
batch_name Yes string Class name.
tutor_id Yes integer User ID of the class tutor.
description No string Class description.
is_live No integer 1 the class has live sessions, 0 (default) it does not.
virtual_class_type No integer Live platform when is_live is 1: 1 Zoom Meeting (default), 2 BotSite, 3 GoTo, 4 GoTo Meeting, 5 Zoom Webinar, 6 Custom link, 7 Super Live, 8 MS Teams.
external_class_link No string Meeting URL, used only with virtual_class_type 6.
zoom_room_waiting No integer 1 turns on the Zoom waiting room. Default 0.
batch_class_count No integer Planned number of sessions. Default 0.
display_index No integer Position of the class in the batch (update only).
Response200application/json
codeinteger
Example: 200
messagestring
Example: Class Created
The new batch ID
Example: 2338
classesobject[]
Show child attributesHide child attributes
Example: 4397
Example: 23

Notes: Errors: "Please select a tutor for the batch" (no tutor_id), "Please add atleast one Module to batch" (empty courses_array). Rate limit: 30 requests per 1 minute; going over locks you out for 30 minutes.

Updated yesterday

Ask AI