Description: To create a lesson under a course in an academy.
Request URL: /api/v4/<orgId>/sessions.json (How do I get my orgId?)
Method: POST
OAuth scope: TrainerCentral.sessionapi.CREATE
Parameters for creating an on-demand lesson
- {
- "session":{
- "name":"<session name>",
- "courseId":"<courseId>",
- "sectionId":"<sectionId>",
- "deliveryMode":4
- }
- }
Parameters - description
1. name - The name of the lesson (it can be on-demand or live)
2. courseId - The Id of the course under which the lesson has to be created.
3. sectionId - The Id of the chapter under which session has to be created.
4. deliveryMode - 4 for an on-demand session, 3 for a live session.
5. scheduledTime - The scheduled start time of the live lesson in milliseconds.
6. scheduledEndTime - The scheduled end time of the live lesson in milliseconds.
7. timezone - The timezone set for the above mentioned start/end timings.
Sample response for an on-demand lesson
- {
- "ticketsInfo":
- {
- "tickets":
- {
- "session”:<sessionId>,
- "maximumPurchaseLimit":"1",
- "paymentOrgId”:<paymentOrgId>,
- "description”:<description>,
- "orgId”:<orgId>,
- "frequency":"1",
- "paymentType":"0",
- "createdTime":"1646208424732",
- "lastUpdatedTime":"1646208424732",
- "id”:<sessionId>,
- "deletedTime":"-1",
- "expiryDurationType":"0",
- "lastUpdatedBy”:<userId>,
- "amount":"0.0",
- "isTaxable":"false",
- "ticketType":"0",
- "sessionId”:<sessionId>,
- "isDefault":"true",
- "createdBy”:<userId>,
- "billingCycle":"-1",
- "frequencyType":"-1",
- "name”:<sessionName>,
- "expiryDuration":"0",
- "ticketId”:<sessionTicketId>,
- "status":"1"
- }
- },
- "sessionMembers":
- [
- {
- "country":"us",
- "role":"1",
- "encryptedSessionMemberId”:<encrytpedSessionMemberId>,
- "session”:<sessionId>,
- "sessionMemberId”:<sessionMemberId>,
- "language":"en",
- "emailId”:<userEmail>,
- "sessionId”:<sessionId>,
- "presenterImageUrl”:<presenterImageURL>,
- "userId”:<userId>,
- "orgId”:<orgId>,
- "name”:<userName>,
- "createdTime":"1646208424693",
- "time":"1646208424693",
- "id”:<sessionMemberId>
- }
- ],
- "session":
- {
- "sessionIndex":"0",
- "timezone”:<usertimezoneSet>,
- "attendeeLimit”:<attendeeLimit>,
- "createdbyName”:<userName>,
- "orgId”:<orgId>,
- "protoFlag":"1",
- "recurringType":"0",
- "deliveryMode":"4",
- "sessionType":"1",
- "course”:<courseId>,
- "createdTime":"1646208424680",
- "scheduledBy”:<userId>,
- "id”:<id>,
- "joinURL”:<session join url>,
- "deletedTime":"-1",
- "courseId”:<courseId>,
- "registeredCount":"0",
- "invitedCount":"0",
- "orgName”:<orgName>,
- "scheduledTime":"1646208424676",
- "presenterAutoStartUrl”:<presenterAutoStartURL>,
- "presenterUrl”:<presenterURL>,
- "uniqueKey”:<UniqueKey>,
- "sessionId”:<sessionId>,
- "attendedCount":"0",
- "paymentsHomePageURL”:<paymentsURL>,
- "referrer":"1",
- "scheduleType":"0",
- "createdBy”:<userId>,
- "name”:”<sessionName>,
- "zaid”:<zaid>,
- "memberRole":"2"
- },
- "talks":
- [
- {
- "owner”:<userId>,
- "scheduledTime":"1646208424676",
- "deliveryMode":"4",
- "session”:<sessionId>,
- "sessionType":"1",
- "id”:<sessionId>,
- "sessionId”:<sessionId>,
- "talkId”:<talkId>,
- "orgId”:<orgId>,
- "status":"1",
- "registeredCount":"0"
- }
- ],
- "sessionCategories":[]
- }
Parameters for creating a live lesson under a course
- {
- "session":
- {
- "name":<sessionName>,
- "scheduledTime":<session Start time>,
- "scheduledEndTime":<session end time>,
- "deliveryMode":3,
- "timezone":"Asia/Calcutta",
- "description":<session description>,
- "courseId":"<courseId>",
- "sectionId":"<sectionId>",
- "sessionSettings":
- {
- "enableClientLogin":true,
- "recurringType":0
- }
- }
- }
Sample response for a live lesson hosted under a course
- {
- "ticketsInfo":
- {
- "tickets":
- {
- "session”:<sessionId>,
- "maximumPurchaseLimit":"1",
- "paymentOrgId”:<paymentsOrgId>,
- "description”:<description>,
- "orgId”:<orgId>,
- "frequency":"1",
- "paymentType":"0",
- "createdTime":"1646210370550",
- "lastUpdatedTime":"1646210370550",
- "id":"<ticketId>",
- "deletedTime":"-1",
- "expiryDurationType":"0",
- "lastUpdatedBy”:<userId>,
- "amount":"0.0",
- "isTaxable":"false",
- "ticketType":"0",
- "sessionId”:<sessionId>,
- "isDefault":"true",
- "createdBy”:<userId>,
- "billingCycle":"-1",
- "frequencyType":"-1",
- "name”:”<session name>,
- "expiryDuration":"0",
- "ticketId”:<ticketId>,
- "status":"1"
- }
- },
- "sessionMembers":
- [
- {
- "country":"us",
- "role":"1",
- "encryptedSessionMemberId”:<encryptedSessionMemberId>,
- "session":<sessionId>,
- "sessionMemberId":<sessionMemberId>,
- "language":"en",
- "emailId”:<userEmaild>,
- "sessionId”:<sessionId>,
- "presenterImageUrl”:<userImageURL>,
- "userId”:<userId>,
- "orgId”:<orgId>,
- "name”:<userName>,
- "createdTime":"1646210370523",
- "time":"1646210370523",
- "id”:<sessionMemberId>
- }
- ],
- "session":
- {
- "sessionIndex":"0",
- "timezone”:<userTimeZoneSet>,
- "description”:<description>,
- "attendeeLimit":"100",
- "createdbyName”:<userName>,
- "orgId”:<orgId>,
- "protoFlag":"1",
- "recurringType":"0",
- "descriptionId”:<descriptionId>,
- "deliveryMode":"3",
- "sessionType":"1",
- "course”:<courseId>,
- "createdTime":"1646210370510",
- "scheduledBy”:<userId>,
- "id”:”<sessionId>,
- "joinURL”:<joinURL>,
- "deletedTime":"-1",
- "courseId”:<courseId>,
- "registeredCount":"0",
- "invitedCount":"0",
- "orgName”:<orgName>,
- "scheduledTime":"1646210400000",
- "presenterAutoStartUrl”:<presenterAutoStartUrl>,
- "presenterUrl”:<presenterURL>,
- "uniqueKey”:<uniqueKey>,
- "scheduledEndTime":"1646214000000",
- "sessionId”:<sessionId>,
- "attendedCount":"0",
- "paymentsHomePageURL”:<paymentsURL>,
- "referrer":"1",
- "scheduleType":"0",
- "createdBy”:<userId>,
- "name”:<sessionName>,
- "zaid”:<zaid>,
- "memberRole":"2"
- },
- "talks":
- [
- {
- "owner”:<userId>,
- "scheduledTime":"1646210400000",
- "deliveryMode":"3",
- "session”:<sessionId>,
- "scheduledEndTime":"1646214000000",
- "sessionType":"1",
- "id”:<talkId>,
- "sessionId”:<sessionId>,
- "talkId”:<talkId>,
- "orgId”:<orgId>,
- "status":"1",
- "registeredCount":"0"
- }
- ],
- "sessionCategories":[]
- }