Create Batch API
This API is used to create a new batch in LMS.
Request URL: (Blended Learning Course)
https://people.zoho.com/api/v1/courses/<courseId>/batches/<batchId>?batchData={"name" : <batchName>, "startDate" : <startDate>, "endDate" : <endDate>, "locations" : <locations>, "minimumCapacity" : <minimumCapacity>, "maximumCapacity":<maximumCapacity>, "allowWaitlisting" : <allowWaitlisting>, "cancelBatchWhenMinimumCapacityIsNotMet" : <cancelBatchWhenMinimumCapacityIsNotMet>, "waitingTimeForCancellation" : <waitingTimeForCancellation>, "waitingTimeUnitForCancellation" : <waitingTimeUnitForCancellation>}
Header:
Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf
Scope:
ZOHOPEOPLE.training.ALL
OR
ZOHOPEOPLE.training.CREATE
Possible Operation Types:
ALL - Complete access to data
CREATE - Only to create data
Method:
POST
Request Parameters
Parameters | Values Allowed | Default Value | Description |
*batchData | <parameters in JSON Object> | JSON Input |
Parameters | Values Allowed | Default Value | Description |
*name | <Batch name> | <Mandatory> | Specify the batch name |
*startDate | <startDate date in DD-MM-YYYY format> | <Mandatory> | Specify the start date |
*endDate | <endDate date in DD-MM-YYYY format> | <Mandatory> | Specify the end date |
minimumCapacity | integer values | <Mandatory> | Specify the minimum capacity |
maximumCapacity | integer values | <Mandatory> | Specify the maximum capacity |
locations | Array of location ids | - | Specify the location ids |
allowWaitlisting | true|false | - | Specify if wait-listing should be allowed or not |
cancelBatchWhenMinimumCapacityIsNotMet | true|false | - | - |
waitingTimeForCancellation | integer values | - | Specify waiting time to cancel batch |
waitingTimeUnitForCancellation | "day" | - |
*mandatory parameters
Request
Copiedhttps://people.zoho.com/api/v1/courses/219225000000645203/batches?batchData={"name":"Add Batch API Testing","startDate":"25-12-2021","endDate":"01-02-2022","minimumCapacity":2,"maximumCapacity":20,"allowWaitlisting":true,"cancelBatchWhenMinimumCapacityIsNotMet":true,"waitingTimeForCancellation":10,"waitingTimeUnitForCancellation":day,"locations":[]}
Header
CopiedAuthorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf
Response
Copied{
"code": "200",
"batch": {
"startDateAsDisplayString": "25-Dec-2021",
"endDateAsDisplayString": "01-Feb-2022",
"cancelBatchWhenMinimumCapacityIsNotMet": true,
"waitingTimeUnitForCancellation": "day",
"batchId": "219225000000653025",
"waitingTimeForCancellation": 10,
"learnersCount": 0,
"name": "Batch One",
"minimumCapacity": 2,
"locations": [],
"maximumCapacity": 20,
"courseId": "219225000000645203",
"publishStatus": "unpublished"
},
"message": "success"
}