Docs home

Edit Batch

Updates a batch: name, manager, dates, attendance mode and its classes. Classes you send with a `class_id` are updated, classes without one are created (and the batch's learners are added to them), and existing classes you leave out are removed from the batch.

POST/masterbatch/{master_batch_id}
Edit Batch
curl --request POST \
  --url 'https://<your-api-host>/nuSource/api/v1/masterbatch/{master_batch_id}' \
  --header 'APIKEY: <your-api-key>' \
  --header 'ORGID: <your-org-id>' \
  --form 'JSONString={"class_name":"IIT JEE Foundation Batch - March 2026 - Updated","tutor_id":165264,"organization_id":2,"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":"1","display_index":0,"class_id":4402,"is_live":0,"zoom_room_waiting":0,"batch_class_count":0,"virtual_class_type":0,"external_class_link":""},{"course_id":24,"batch_name":"Chemistry for IIT JEE - Organic Chemistry","tutor_id":"1","display_index":1,"class_id":4403,"is_live":0,"zoom_room_waiting":0,"batch_class_count":0,"virtual_class_type":0,"external_class_link":""},{"course_id":236,"batch_name":"Mathematics for IIT JAM - Algebra & Calculus","tutor_id":"1","display_index":2,"class_id":4404,"is_live":0,"zoom_room_waiting":0,"batch_class_count":0,"virtual_class_type":0,"external_class_link":""}],"bundle_id":1287,"individual_batch_attendance":1}'
{
  "code": 200,
  "message": "Class Updated"
}

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

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

Path parameters
master_batch_idintegerrequired
The batch ID, as the last URL segment.
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.
Passed to each class update. Purpose unclear from code.

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
"Class Updated"
Example: Class Updated

Notes: This is a full replace. Send every class you want to keep: a class missing from courses_array is removed from the batch and archived unless another batch still uses it. start_date and end_date are cleared if you leave them out. Read the current values first with "Get Batch". Rate limit: 30 requests per 1 minute; going over locks you out for 30 minutes.

Updated yesterday

Ask AI