Docs home

Get Batch Schedule

Returns the weekly timetable of a batch: for each class (subject) in the batch, the days and times it meets. Put the batch's `master_batch_id` in the URL. Use it to read a batch's recurring schedule before changing it with "Set Batch Schedule".

GET/masterbatch/schedule/{master_batch_id}
Get Batch Schedule
curl --request GET \
  --url 'https://<your-api-host>/nuSource/api/v1/masterbatch/schedule/{master_batch_id}' \
  --header 'APIKEY: <your-api-key>' \
  --header 'ORGID: <your-org-id>' \
  --form 'JSONString={"class_name":"DemoOMOTOTech","tutor_id":"62","organization_id":2,"start_date":"01 Jul 2022","end_date":"31 Jul 2022","courses_array":[{"course_id":52,"batch_name":"Biology","tutor_id":"27","is_live":0,"zoom_room_waiting":0,"batch_class_count":0,"display_index":null}],"bundle_id":"88","individual_batch_attendance":0}'
{
  "code": 200,
  "message": "Success",
  "schedule": [
    {
      "class_id": 2372,
      "timings": [
        {
          "schedule_id": 1937,
          "day": 1,
          "s_hour": 9,
          "s_minute": 0,
          "e_hour": 10,
          "e_minute": 0
        },
        {
          "schedule_id": 1938,
          "day": 2,
          "s_hour": 9,
          "s_minute": 0,
          "e_hour": 10,
          "e_minute": 0
        },
        {
          "schedule_id": 1939,
          "day": 3,
          "s_hour": 9,
          "s_minute": 0,
          "e_hour": 10,
          "e_minute": 0
        },
        {
          "schedule_id": 1940,
          "day": 4,
          "s_hour": 9,
          "s_minute": 0,
          "e_hour": 10,
          "e_minute": 0
        }
      ],
      "batch_class_count": 0,
      "course_id": 52,
      "tutor_id": 27
    }
  ]
}

Access: Institute admins, tutors, students and parents, plus custom roles that can view batches or manage submissions.

Path parameters
master_batch_idintegerrequired
The batch.
Response200application/json
codeinteger
Example: 200
messagestring
Example: Success
scheduleobject[]
Show child attributesHide child attributes
Example: 2372
One entry per weekly slot
Show child attributesHide child attributes
Example: 1937
0 Sunday to 6 Saturday
Example: 1
Example: 9
Example: 0
Example: 10
Example: 0
The number of sessions set for the class, if the batch is scheduled by session count, otherwise 0 or null
Example: 0
The subject
Example: 52
The class's default tutor
Example: 27

Notes: Fails with "MasterBatch class not mapped." if the batch has no classes. Rate limit: 100 requests per minute; going over locks you out for 30 minutes.

Updated yesterday

Ask AI