WiseNET.API - Unit Offers in Course Offer Endpoint

From Wisenet Resource Centre
Jump to: navigation, search


The Unit Offers in Given CourseIn Wise.NET a course is usually a qualification or short course Offer endpoint allows your applications to get information about unit offers in a course offer.

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

Contents

Related Endpoints

Unit Offer Properties

See Unit Offers.

Get All Unit Offers in a CourseIn Wise.NET a course is usually a qualification or short course Offer

GET /courseoffers/courseoffer/{id}/unitoffers

Returns the list of 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/123/unitoffers

Sample response 1:

  <UnitOfferSet xmlns="http://api.mywisenet.com.au/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>123</CourseOfferId>
        <CourseOfferLink>
          <Href>courseoffers/courseoffer/123</Href>
          <Rel>course-offer</Rel>
          <Title>1 - 123</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 incorrect {id} would return 404 HTTP 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/unitoffers";
 
    var request = HttpWebRequest.Create() 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