CreateClass
POST /tp-api/classes
Create an in-person or virtual instructor-led class.
Header Parameters
- training-provider-id string required
- application/json
Request Body required
address object
Class Location. This is required for in-person classes
countryCode string requiredPossible values:
>= 2 characters
and<= 2 characters
2 letter country code
district stringDistrict name
extendedAddress stringAddress line 2
locality string requiredCity
name stringLocation name or Site name
postalCode string requiredPostal code
postOfficeBox stringPost office box
region string requiredProvince/State
streetAddress string requiredAddress line 1
contact object required
email email requiredMain contact email address
fax stringMain contact fax number
telephone stringMain contact phone number
- courseId string required
Class course id
- evaluatorIds string[]
- externalRegistrationUrl uri required
External registration url
- instructorIds string[] required
Possible values:
>= 1
- price number required
Class price. If price is
0
, the class considered free - publishInMarketplace boolean required
Should the class appear in the marketplace?
- showPriceInMarketplace boolean required
Should the class price be shown in marketplace?
schedule object[] required
Possible values:
>= 1
List of class events
Format for a single day class:
[
{
start: '2022-01-21T04:00:06.902Z',
end: '2022-01-21T08:00:06.902Z'
}
]
Format for a class being taught over multiple days:
[
{
start: '2022-01-21T04:00:06.902Z',
end: '2022-01-21T06:00:06.902Z'
},
{
start: '2022-01-24T05:00:06.902Z',
end: '2022-01-24T08:00:06.902Z'
},
{
start: '2022-01-26T11:00:06.902Z',
end: '2022-01-26T15:00:06.902Z'
}
]
Explanation:
1. For a class spanning multiple days, each event start
and end time should be added separately.
2. Each event must be less than 24 hours.
3. Each event should not overlap with other events.
4. Event start and end time should be added in UTC timezone.Array [start date-time requiredEvent start time
end date-time requiredEvent end time
]- specialInstructions string
Special instructions
- timezone string required
IANA timezone the class is offered in
- totalSeats integer required
Possible values:
>= 1
Class offering seat count
- virtualClassURL uri
Virtual class url. This field is required for virtual classes
- 200
- 400
Default Response
- application/json
- Schema
- Example (from schema)
Schema
- id string required
{
"id": "string"
}
Default Response
- application/json
- Schema
- Example (from schema)
Schema
- anyOf
- MOD1
- MOD2
statusCode number requiredcode stringError code
error string requiredError key
message string requiredError message
error object required
key string requiredError key
message string requiredError message
{
"statusCode": 0,
"code": "string",
"error": "string",
"message": "string"
}