Retrieve Available Offerings For a User

Last modified on August 24, 2023 at 6:16 pm

Overview

Retrieve a list of all offerings defined in your organization that are available for registration for the given user. This may be a subset of all your organization’s offerings based on which offerings a user has already registered for, which offerings allow retaking, and other availability settings.

Filtering is performed by sending a userId parameter along with the request. This is one of several parameters available to filter the list of offerings returned; for more details see the Filtering reference on the offerings search documentation.

The result of this GET request will be JSON-encoded representation of an array of offering objects. The object definition is provided below. This request follows standard practices for paging and filter restrictions.

JSON Object Definition

The following is a full definition of all possible properties on the JSON object representing offering categories. For details about these properties, see the Offering Object Reference.

{
  "id" : "",
  "title" : "",
  "beginDate" : "",
  "endDate" : "",
  "registrationBeginDate" : "",
  "registrationEndDate" : "",
  "catalogDescription" : "",
  "dashboardDescription" : "",
  "deliveryDescription" : "",
  "price" : 0.0,
  "offeringCategoryIds" : [ "", ... ],
  "tags" : [ "", ... ],
  "orderIndex" : 0
}

Examples

List of Two Offerings

This example shows a request for offerings available to a specific user. This is accomplished by adding a userId parameter to the request. Offerings in the result are available for registration for the given user.

Request
GET /dc/api/v5/offerings?userId=79a2ac9a25de5f5129a927610a0892a HTTP/1.1
Host: api.digitalchalk.com
Accept: application/json
Response
HTTP/1.1 200 OK
Content-type: application/json
Content-length: 931
{
  results: [
    {
      "id" : "8925ac9a25de5f5129a927610a0e00e",
      "title" : "Sample Offering 1",
      "beginDate" : "2013-07-01T00:00:00Z",
      "price" : 260.0,
      "orderIndex" : 0
    },
    {
      "id" : "7610000620ac0df0113cb75752dadee",
      "title" : "Sample Offering 2",
      "beginDate" : "2013-08-01T08:00:00Z",
      "endDate" : "2014-01-01T07:59:59Z",
      "registrationBeginDate" : "2013-07-15T00:00:00Z",
      "registrationEndDate" : "2013-08-01T00:00:00Z",
      "catalogDescription" : "Second Sample Offering",
      "dashboardDescription" : "Begin taking Sample Offering 2",
      "deliveryDescription" : "Report Record of Sample Offering 2",
      "price" : 285.0,
      "offeringCategoryIds" : [ "322887559acf003141592653584510e", "31984324731200022dc6f676621398a" ],
      "tags" : [ "sample" ],
      "orderIndex" : 1
    }
  ]
}

Reference