Last modified on August 24, 2023 at 6:18 pm
Overview
Retrieves a specific offering with the specified id. The result of this GET request will be JSON-encoded representation of an offering object. The object definition is provided below.
JSON Object Definition
The following is a full definition of all possible properties on the JSON object representing an offering. 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
Retrieve Offering by ID
This example shows the retrieval of a single offering by its identifier. Because it has an orderIndex value of 1, it would appear as the second item in a list of your organization’s offerings.
Request
- GET /dc/api/v5/offerings/7610000620ac0df0113cb75752dadef HTTP/1.1
- Host: api.digitalchalk.com
- Accept: application/json
Response
- HTTP/1.1 200 OK
- Content-type: application/json
- Content-length: 456
- {
- "id" : "7610000620ac0df0113cb75752dadef",
- "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
- }
Failure Cases
Below is a list of the most common failure scenarios your code should be prepared to handle. This list is not exhaustive.
Invalid ID
If there is no offering resource located at the given URL, the server will issue a 404 Not Found response.
Request
- GET /dc/api/v5/offerings/INVALID_ID_HERE HTTP/1.1
- Host: api.digitalchalk.com
- Accept: application/json
Response
- HTTP/1.1 404 Not Found
- Content-type: application/json
- Content-length: 55
- {
- "errors": [ "No resource exists with the given id." ]
- }