WiseNET.API - Course Offers Endpoint

From Wisenet Resource Centre
Jump to: navigation, search


The Wise.NET CourseIn Wise.NET a course is usually a qualification or short course Offers endpoint allows your applications to get information about course offers and course enrolments, and to submit new course enrolments.

This page is a part of WiseNET API: Developer Resources.

Contents

Related Endpoints

All CourseIn Wise.NET a course is usually a qualification or short course Offer Properties

List All CourseIn Wise.NET a course is usually a qualification or short course Offers

GET /courseoffers/

Returns the list of all course offers

Sample request:

 curl -X GET \
   -H "Accept: application/vnd.mywisenet.api.v1+xml" \
   https://tst-api.wisenet.co/courseoffers/

Sample response:

  <CourseOfferSet xmlns="http://api.mywisenet.com.au/v1/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <SetCount>2</SetCount>
    <CourseOffers>
      <CourseOffer>
        <Agents>
          <CodeDescription>
            <Code>Agent's code</Code>
            <Description>Agent's name</Description>
          </CodeDescription>
        </Agents>
        <CourseEnrolmentsLink>
          <Href>courseoffers/courseoffers/enrolments</Href>
          <Rel>enrolments</Rel>
          <Title>All CourseIn Wise.NET a course is usually a qualification or short course Enrolments</Title>
        </CourseEnrolmentsLink>
        <CourseId>2</CourseId>
        <CourseOfferId>2</CourseOfferId>
        <CourseOfferStatus/>
        <CourseWebDetails/>
        <DeliveryMode/>
        <DeliveryOrganisation><Code>SomeCode</Code><Description>Main Hotel - Head Office</Description></DeliveryOrganisation>
        <EnrolViaWiseWebLink>https://wiseweb2.mywisenet.com.au/wiseweb/login.aspx?key=...</EnrolViaWiseWebLink>
        <EnrolmentPeriod>
          <EndDate>2010-10-01T00:00:00</EndDate>
          <StartDate>2010-09-01T00:00:00</StartDate>
        </EnrolmentPeriod>
        <LastUpdated>2011-04-05T00:00:00</LastUpdated>
        <Link>
          <Href>courseoffers/courseoffer/2</Href>
          <Rel>self</Rel>
          <Title>11VRSA - CERTIFICATE II IN RETAIL OPERATIONS</Title>
        </Link>
        <Location>
          <Description i:nil="true"/>
        </Location>
        <Offer>
          <Code>11VRSA</Code>
          <Description>CERTIFICATE II IN RETAIL OPERATIONS</Description>
        </Offer>
        <OfferPeriod>
          <EndDate>2010-10-01T00:00:00</EndDate>
          <StartDate>2010-09-01T00:00:00</StartDate>
        </OfferPeriod>
        <Program/>
        <PublishPeriod/>
        <Venue/>
        <WebDetails>
          <Name>CERTIFICATE II IN RETAIL OPERATIONS</Name>
        </WebDetails>
      </CourseOffer>
      <CourseOffer>
        <CourseEnrolmentsLink>
          <Href>courseoffers/courseoffers/enrolments</Href>
          <Rel>enrolments</Rel>
          <Title>All CourseIn Wise.NET a course is usually a qualification or short course Enrolments</Title>
        </CourseEnrolmentsLink>
        <CourseId>5</CourseId>
        <CourseOfferId>5</CourseOfferId>
        <CourseOfferStatus>
          <Code>Active - Offer currently being taught</Code>
          <Description>Active - Offer currently being taught</Description>
        </CourseOfferStatus>
        <CourseWebDetails/>
        <DeliveryMode>
          <Code>01</Code>
          <Description>Local Face to Face Class (WA only)</Description>
        </DeliveryMode>
        <EnrolViaWiseWebLink>https://wiseweb2.mywisenet.com.au/wiseweb/login.aspx?key=...</EnrolViaWiseWebLink>
        <EnrolmentPeriod>
          <EndDate>2010-10-01T00:00:00</EndDate>
          <StartDate>2010-09-01T00:00:00</StartDate>
        </EnrolmentPeriod>
        <LastUpdated>2011-02-04T00:00:00</LastUpdated>
        <Link>
          <Href>courseoffers/courseoffer/5</Href>
          <Rel>self</Rel>
          <Title>0708CERT3 - CERTIFICATE III IN TRANSPORT AND DISTRIBUTION (RAIL OPERATIONS)</Title>
        </Link>
        <Location>
          <Description i:nil="true"/>
        </Location>
        <Offer>
          <Code>0708CERT3</Code>
          <Description>CERTIFICATE III IN TRANSPORT AND DISTRIBUTION (RAIL OPERATIONS)</Description>
        </Offer>
        <OfferPeriod>
          <EndDate>2010-10-01T00:00:00</EndDate>
          <StartDate>2010-09-01T00:00:00</StartDate>
        </OfferPeriod>
        <Program/>
        <PublishPeriod/>
        <Venue/>
        <WebDetails>
          <Name>CERTIFICATE III IN TRANSPORT AND DISTRIBUTION (RAIL OPERATIONS)</Name>
        </WebDetails>
      </CourseOffer>
    </CourseOffers>
    <Link>
      <Href>/courseoffers/enrolments</Href>
      <Rel>enrolments</Rel>
      <Title>Enrolments</Title>
    </Link>
  </CourseOfferSet>

C# Code Sample

public static void GetCourseOffersSample()
{
    const string url = "https://tst-api.wisenet.co/courseoffers/";
 
    var request = HttpWebRequest.Create(url) as HttpWebRequest;
    request.Accept = "application/vnd.mywisenet.api.v1+xml";
    request.Method = "GET";
    request.UserAgent = "C# Sample ClientIn Wise.NET a client is a student, trainee or apprentice";
 
    try
    {
        // Get response  
        using (var response = request.GetResponse() as HttpWebResponse)
        {
            // Get the response stream  
            using (var responseReader = new StreamReader(response.GetResponseStream()))
            {
                string responseBody = responseReader.ReadToEnd();
 
                // Console application output  
                Console.WriteLine(responseBody);
            }
        }
    }
    catch (WebException ex)
    {
        Console.WriteLine("Error: {0}", ex.Message);
    }
}

List modified CourseIn Wise.NET a course is usually a qualification or short course Offers

GET /courseoffers/

Returns the list of course offers created or modified since the specified date.

The command is the same, but you need to set the If-Modified-Since header in HTTP request. The date must be in UTC format.

The CourseIn Wise.NET a course is usually a qualification or short course Offers endpoint will filter on the LastAuditTimestamp field of each student. This field is updated to the current UTC date whenever a student is created or edited.

Sample request:

 curl -X GET \
   -H "Accept: application/vnd.mywisenet.api.v1+xml" \
   -H "If-Modified-Since: Fri, 8 Jul 2011 1:43:31 GMT" \
   https://tst-api.wisenet.co/courseoffers/

Response format would be the same as for List all CourseIn Wise.NET a course is usually a qualification or short course Offers command.

Note: We would recommend that all calls to list CourseIn Wise.NET a course is usually a qualification or short course Offers from the API use this If-Modified-Since parameter to avoid large responses.

C# Code Sample

private static void GetIfModifiedSinceSample()
{
    const string url = "https://tst-api.wisenet.co/courseoffers/";
 
    var request = HttpWebRequest.Create(url) as HttpWebRequest;
    request.Accept = "application/vnd.mywisenet.api.v1+xml";
    request.IfModifiedSince = DateTime.Now.AddDays(-1);
    request.Method = "GET";
    request.UserAgent = "C# Sample ClientIn Wise.NET a client is a student, trainee or apprentice";
 
    try
    {
        // Get response  
        using (var response = request.GetResponse() as HttpWebResponse)
        {
            // Get the response stream  
            using (var responseReader = new StreamReader(response.GetResponseStream()))
            {
                string responseBody = responseReader.ReadToEnd();
 
                // Console application output  
                Console.WriteLine(responseBody);
            }
        }
    }
    catch (WebException ex)
    {
        Console.WriteLine("Error: {0}", ex.Message);
    }
}

Filtered search

The full list and order of parameters to the GET /courseOffers command is:

GET /courseoffers?startdatefrom={from}&startdatetill={till}&locationdescription={location}&skip={skip}&take={take}

List CourseIn Wise.NET a course is usually a qualification or short course Offers for a location

GET /courseoffers/?locationdescription={location}

Returns all CourseIn Wise.NET a course is usually a qualification or short course Offers for the specified {location}.

You can also combine this request with the additional IfModifiedSince header or paging parameters (see below).

Sample request:

 curl -X GET \
   -H "Accept: application/vnd.mywisenet.api.v1+xml" \
   https://tst-api.wisenet.co/courseoffers/?locationdescription=Sydney

Response format would be the same as for the List all CourseIn Wise.NET a course is usually a qualification or short course Offers command.

List CourseIn Wise.NET a course is usually a qualification or short course Offers for a start date

GET /courseoffers/?startdatefrom={from]&startdatetill={till}
GET /courseoffers/?startdatefrom={from}
GET /courseoffers/?startdatetill={till}

Returns all CourseIn Wise.NET a course is usually a qualification or short course Offers starting within the specified {from} and {till} dates.

Date format is:

YYYY-MM-DDTHH:MM:SS

for example:

2011-01-01T00:00:00

You can also combine this request with the additional IfModifiedSince header or paging parameters (see below).

Sample request:

 curl -X GET \
   -H "Accept: application/vnd.mywisenet.api.v1+xml" \
   https://tst-api.wisenet.co/courseOffers/?startdatefrom=2010-01-01T00:00:00&startdatetill=2011-01-01T00:00:00

Response format would be the same as for the List all CourseIn Wise.NET a course is usually a qualification or short course Offers command.

List CourseIn Wise.NET a course is usually a qualification or short course Offers by page

GET /courseoffers/?skip={skip}&take={take}

Skips {skip} items in the full CourseIn Wise.NET a course is usually a qualification or short course Offers list, then returns {take} items.

You can also combine this request with the additional IfModifiedSince header.

Sample request:

 curl -X GET \
   -H "Accept: application/vnd.mywisenet.api.v1+xml" \
   https://tst-api.wisenet.co/courseoffers/?skip=100&take=20

Response format would be the same as for the List all CourseIn Wise.NET a course is usually a qualification or short course Offers command.

List CourseIn Wise.NET a course is usually a qualification or short course Offers for specified courseId

GET /courseoffers/?courseId={courseId}

Return courseoffers with courseId={courseId}

You can also combine this request with the additional IfModifiedSince header, skip, take and other parameters

Sample request:

 curl -X GET \
   -H "Accept: application/vnd.mywisenet.api.v1+xml" \
   https://tst-api.wisenet.co/courseoffers/?courseId=1

Response format would be the same as for the List all CourseIn Wise.NET a course is usually a qualification or short course Offers command.

List CourseIn Wise.NET a course is usually a qualification or short course Offers currently published/not published on the Web

GET /courseoffers/?IsPublished=true

Return courseoffers which WebCourseOffer.StartDate already passed and WebCourseOffer.EndDate is yet to come.

You can also combine this request with the additional IfModifiedSince header, skip, take and other parameters

Sample request:

 curl -X GET \
   -H "Accept: application/vnd.mywisenet.api.v1+xml" \
   https://tst-api.wisenet.co/courseoffers/?IsPublished=true

Response format would be the same as for the List all CourseIn Wise.NET a course is usually a qualification or short course Offers command.

Get CourseIn Wise.NET a course is usually a qualification or short course Offer

GET /courseoffers/courseoffer/{id}

Returns information about the CourseIn Wise.NET a course is usually a qualification or short course Offer with the specified {id}.

Sample request:

 curl -X GET \
   -H "Accept: application/vnd.mywisenet.api.v1+xml" \
   https://tst-api.wisenet.co/courseoffers/courseoffer/123

Sample response 1:

  <CourseOffer xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://api.wisenet.co/v1/">
    <Agents>
      <CodeDescription>
         <Code>Agent's code</Code>
         <Description>Agent's name</Description>
      </CodeDescription>
    </Agents>
    <CourseEnrolmentsLink>
      <Href>courseoffers/courseoffers/enrolments</Href>
      <Rel>enrolments</Rel>
      <Title>All CourseIn Wise.NET a course is usually a qualification or short course Enrolments</Title>
    </CourseEnrolmentsLink>
    <CourseId>2</CourseId>
    <CourseOfferId>123</CourseOfferId>
    <CourseOfferStatus />
    <CourseWebDetails />
    <DeliveryMode>
      <Code>01</Code>
      <Description>Local Face to Face Class (WA only)</Description>
    </DeliveryMode>
    <EnrolViaWiseWebLink>
    https://wiseweb2.mywisenet.com.au/wiseweb/login.aspx?key=...</EnrolViaWiseWebLink>
    <EnrolmentPeriod>
      <EndDate>2010-10-01T00:00:00</EndDate>
      <StartDate>2010-09-01T00:00:00</StartDate>
    </EnrolmentPeriod>
    <LastUpdated>2011-04-05T00:00:00</LastUpdated>
    <Link>
      <Href>courseoffers/courseoffer/123</Href>
      <Rel>self</Rel>
      <Title>11VRSA - CERTIFICATE II IN RETAIL OPERATIONS</Title>
    </Link>
    <Location>
      <Description i:nil="true" />
    </Location>
    <Offer>
      <Code>11VRSA</Code>
      <Description>CERTIFICATE II IN RETAIL OPERATIONS</Description>
    </Offer>
    <OfferPeriod>
      <EndDate>2010-10-01T00:00:00</EndDate>
      <StartDate>2010-09-01T00:00:00</StartDate>
    </OfferPeriod>
    <Program />
    <PublishPeriod />
    <Venue />
    <WebDetails>
      <Name>CERTIFICATE II IN RETAIL OPERATIONS</Name>
    </WebDetails>
  </CourseOffer>

Sample response 2: An unknown [id] would return a 404 HTTP status code.

  <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">
    The CourseIn Wise.NET a course is usually a qualification or short course Offer with ID '123' cannot be found.
  </string>

C# Code Sample

private static void ReadSample()
{
    const string url = "https://tst-api.wisenet.co/courseoffers/courseoffer/123";
 
    var request = HttpWebRequest.Create(url) as HttpWebRequest;
    request.Accept = "application/vnd.mywisenet.api.v1+xml";
    request.Method = "GET";
    request.UserAgent = "C# Sample ClientIn Wise.NET a client is a student, trainee or apprentice";
 
    try
    {
        // Get response  
        using (var response = request.GetResponse() as HttpWebResponse)
        {
            // Get the response stream  
            using (var responseReader = new StreamReader(response.GetResponseStream()))
            {
                string responseBody = responseReader.ReadToEnd();
 
                // Console application output  
                Console.WriteLine(responseBody);
            }
        }
    }
    catch (WebException ex)
    {
        Console.WriteLine("Error: {0}", ex.Message);
    }
}

List all Unit Offers in a CourseIn Wise.NET a course is usually a qualification or short course Offer

GET /courseoffers/courseoffer/{id}/unitoffers

Returns Unit Offers in the CourseIn Wise.NET a course is usually a qualification or short course Offer with the specified [id].

Sample request:

 curl -X GET \
   -H "Accept: application/vnd.mywisenet.api.v1+xml" \
   https://tst-api.wisenet.co/courseoffers/courseoffer/1/unitoffers

Sample response 1:

  <UnitOfferSet xmlns="http://api.wisenet.co/v1/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <SetCount>1</SetCount>
    <Link>
      <Href>/unitoffers/enrolments</Href>
      <Rel>enrolments</Rel>
      <Title>Enrolments</Title>
    </Link>
    <UnitOffers>
      <UnitOffer>
        <CourseId>1</CourseId>
        <CourseOfferId>1</CourseOfferId>
        <CourseOfferLink>
          <Href>courseoffers/courseoffer/1</Href>
          <Rel>course-offer</Rel>
          <Title>1 - 1</Title>
        </CourseOfferLink>
        <DeliveryMode></DeliveryMode>
        <LastUpdated>2011-12-13T09:18:39.12</LastUpdated>
        <Link>
          <Href>unitoffers/unitoffer/1</Href>
          <Rel>self</Rel>
          <Title>UO1: U1 - CERTIFICATE II IN HOSPITALITY (OPERATIONS)</Title>
        </Link>
        <Location>
          <Description i:nil="true"></Description>
        </Location>
        <MaximumEnrolments>30</MaximumEnrolments>
        <MinimumEnrolments>1</MinimumEnrolments>
        <Program></Program>
        <Unit>
          <Code>U1</Code>
          <Description>CERTIFICATE II IN HOSPITALITY (OPERATIONS)</Description>
        </Unit>
        <UnitEnrolmentsLink>
          <Href>unitoffers/unitoffers/enrolments</Href>
          <Rel>enrolments</Rel>
          <Title>All Unit Enrolments</Title>
        </UnitEnrolmentsLink>
        <UnitOfferCode>UO1</UnitOfferCode>
        <UnitOfferId>1</UnitOfferId>
        <UnitOfferPeriod>
          <EndDate>2011-12-03T00:00:00</EndDate>
          <StartDate>2010-12-03T00:00:00</StartDate>
        </UnitOfferPeriod>
        <UnitWebDetails></UnitWebDetails>
        <UrlEnrol>https://wiseweb2.mywisenet.com.au/wiseweb/login.aspx?key=...</UrlEnrol>
        <Venue></Venue>
        <WebDetails>
          <Name>CERTIFICATE II IN HOSPITALITY (OPERATIONS)</Name>
        </WebDetails>
      </UnitOffer>
    </UnitOffers>
  </UnitOfferSet>

Sample response 2: An unknown [id] would return a 404 HTTP status code.

  <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">
    The CourseIn Wise.NET a course is usually a qualification or short course Offer with ID '1' cannot be found.
  </string>

C# Code Sample

private static void ReadSample()
{
    const string url = "https://tst-api.wisenet.co/courseoffers/courseoffer/665/unitoffers";
 
    var request = HttpWebRequest.Create(url) as HttpWebRequest;
    request.Accept = "application/vnd.mywisenet.api.v1+xml";
    request.Method = "GET";
    request.UserAgent = "C# Sample ClientIn Wise.NET a client is a student, trainee or apprentice";
 
    try
    {
        // Get response  
        using (var response = request.GetResponse() as HttpWebResponse)
        {
            // Get the response stream  
            using (var responseReader = new StreamReader(response.GetResponseStream()))
            {
                string responseBody = responseReader.ReadToEnd();
 
                // Console application output  
                Console.WriteLine(responseBody);
            }
        }
    }
    catch (WebException ex)
    {
        Console.WriteLine("Error: {0}", ex.Message);
    }
}
Personal tools
Namespaces
Variants
Actions
Navigation
Translate
Wisenet Getting Started
Learning Relationship Management
Learner App
Trainer Portal
Wise.NET Portal
CRM
eLearning
Surveys
Finance
Application Integration
Compliance: Australia
Compliance: New Zealand
Developer Resources
Toolbox