POST api/activitiespackage
Insert an Activity plus its related records.
Request Information
URI Parameters
None.
Body Parameters
ActivityPackageDtoName | Description | Type | Additional information |
---|---|---|---|
Activity |
The Activity record to create. |
ActivityDto |
Required |
ActivityCourses |
A collection of ActivityCourse records to create that will be associated with the Activity record. Note: for each of the items supplied in this collection: set ActivityId to 1, as once it passes range validation, it will be ignored and automatically assigned to the id of the created Activity record. Likewise set PreferenceNumber to 1 as it will be ignored and automatically assigned based on the order the items are supplied in this collection. |
Collection of ActivityCourseDto |
Max items: 50 |
Request Formats
application/json, text/json
Sample:
{ "Activity": { "Id": 1, "CrmNumber": 2, "ContactStatusId": 1, "ContactStatusName": "sample string 3", "IntakeId": 1, "IntakeName": "sample string 4", "DateCreated": "2025-01-22T21:48:44.4216435+11:00", "Task": { "TaskTypeId": 1, "Description": "sample string 2" } }, "ActivityCourses": [ { "Id": 1, "ActivityId": 2, "DateCreated": "2025-01-22T21:48:44.4216435+11:00", "PreferenceNumber": 3, "SubChannelId": 4, "SubChannelName": "sample string 5", "StudyLevelId": 1, "StudyLevelName": "sample string 6", "FacultyId": 1, "FacultyName": "sample string 7", "CourseId": 1, "CourseName": "sample string 8", "DepartmentId": 1, "DepartmentName": "sample string 9", "CampusId": 1, "CampusName": "sample string 10", "StudyAreaId": 1, "StudyAreaName": "sample string 11" }, { "Id": 1, "ActivityId": 2, "DateCreated": "2025-01-22T21:48:44.4216435+11:00", "PreferenceNumber": 3, "SubChannelId": 4, "SubChannelName": "sample string 5", "StudyLevelId": 1, "StudyLevelName": "sample string 6", "FacultyId": 1, "FacultyName": "sample string 7", "CourseId": 1, "CourseName": "sample string 8", "DepartmentId": 1, "DepartmentName": "sample string 9", "CampusId": 1, "CampusName": "sample string 10", "StudyAreaId": 1, "StudyAreaName": "sample string 11" } ] }
Response Information
Resource Description
The primary key (id) of the Activity record inserted in the Hobsons database.
integerResponse Formats
application/json, text/json
Sample:
1