Retrieve all offering categories

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

Overview

Retrieve a list of all offering categories defined in your organization. The result of this GET request will be JSON-encoded representation of an array of offering category objects. The object definition is provided below. This request follows standard practices for paging and filter restrictions. Note that no offering information is returned in this listing; to find offerings that belong to a specific category, send a GET request to /api/v5/offerings with a categoryId restriction.

JSON Object Definition

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

{
  "id": "",
  "name": "",
  "description": "",
  "color": "",
  "orderIndex": 0
}

Filtering

Filtering the result list can be accomplished by specifying value restrictions for the following properties:

Parameter NameDetails
createdDateString representation of a date. This can be a precise timestamp, an imprecise date implying a range, or a range of dates. See the Date Filtering documenttation for more detail.
nameCase-insensitive substring match, i.e. the parameter value provided must occur verbatim somewhere within the category name to matc

Examples

List of Two Offering Categories

This example shows a response containing two categories. Since name and orderIndex are required fields, they are present for all objects; other fields are omitted when no value is set.

Request
GET /dc/api/v5/offeringcategories HTTP/1.1
Host: api.digitalchalk.com
Accept: application/json
Response
HTTP/1.1 200 OK
Content-type: application/json
Content-length: 931

[
  {
    "id": "322887559acf003141592653584510e",
    "name": "Sample offering category with no extra information",
    "orderIndex": 0,
  },
  {
    "id": "31984324731200022dc6f676621398a",
    "name": "Sample offering category #2 with all fields set",
    "description": "Description for category #2",
    "color": "#ff0000",
    "orderIndex": 1
  }
]

Reference