GET
/
api-category
/
v1
/
category
curl --request GET \
  --url https://live.copilot.fabric.inc/api-category/v1/category \
  --header 'Authorization: Bearer <token>' \
  --header 'x-site-context: <x-site-context>'
{
  "totalSize": 100,
  "pageSize": 10,
  "pages": 10,
  "categories": [
    {
      "id": "6196b45b5cb04b7ce167cb46",
      "nodeId": 16,
      "name": "PCs",
      "hierarchy": "ALTERNATE",
      "isActive": true,
      "breadcrumbs": [
        {
          "id": "6196b44a5cb04b7ce167cb34",
          "nodeId": 10,
          "name": "Computers",
          "level": 0,
          "hierarchy": "ALTERNATE",
          "isActive": true,
          "createdOn": "2022-03-09T23:37:54.086Z",
          "modifiedOn": "2022-03-09T23:37:54.086Z"
        }
      ],
      "attributes": [
        {
          "id": "619a8ba6f1875f6dbcaf0521",
          "name": "notes",
          "description": "Notes for this particular category.",
          "type": "TEXT",
          "value": "Unable to fulfill demand."
        }
      ],
      "children": [
        {
          "id": "619973877a22c466eee93219",
          "name": "Apple",
          "breadcrumbs": [
            {
              "id": "6196b44a5cb04b7ce167cb34",
              "nodeId": 10,
              "name": "Computers",
              "level": 0,
              "hierarchy": "ALTERNATE",
              "isActive": true,
              "createdOn": "2022-03-09T23:37:54.086Z",
              "modifiedOn": "2022-03-09T23:37:54.086Z"
            }
          ],
          "attributes": [
            {
              "id": "619a8ba6f1875f6dbcaf0521",
              "name": "notes",
              "description": "Notes for this particular category.",
              "type": "TEXT",
              "value": "Unable to fulfill demand."
            }
          ],
          "children": [
            {}
          ]
        }
      ],
      "createdOn": "2022-03-09T23:37:54.086Z",
      "modifiedOn": "2022-03-09T23:37:54.086Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

S2S access token (JWT) from fabric Identity service (during Login)

Headers

x-site-context
string
required

The x-site-context header is a JSON object that contains information about the source you wish to pull from. The mandatory account is the 24 character identifier found in Copilot. The channel (Sales channel ID), stage (environment name), and date attributes can be used to further narrow the scope of your data source.

Example:

"{\"date\": \"2023-01-01T00:00:00.000Z\", \"channel\": 12, \"account\": \"1234abcd5678efgh9ijklmno\",\"stage\":\"production\"}"

Query Parameters

ids
string[]

A 24-character system-generated category IDs. If ids and nodeIds are omitted, this endpoint returns all Alternate categories in Active status. Using size and page, you can narrow down the search results.

nodeIds
number[]

Numeric category IDs. When ids and nodeIds are omitted, specify size and page to narrow down the search results.

keyword
string

Keywords to search for categories. You will get a pagination response. Using size and page, you can narrow down the search results.

type
enum<string>

Category type. <br /> Note: When omitted, you will get ALTERNATE categories by default.

Available options:
PRIMARY,
ALTERNATE,
ALL
Example:

"ALL"

status
enum<string>

Category status. <br /> Note: If omitted, you will get Alternate categories in Active status by default. <br /> Note: When type is Primary, status must be Active. Inactive status is not applicable for Primary category.

Available options:
ACTIVE,
INACTIVE,
ALL
Example:

"ALL"

page
number

Page number to be retrieved. <br /> Note: <br /> 1) Applicable only in a paginated response. <br /> 2) Always paired with size <br /> 3) No default value set. Unless a value is specified, endpoint returns an error.

size
number

Number of records per page <br /> Note: <br /> 1) Always paired with page. <br /> 2) Applicable only in a paginated response. <br /> 3) No default value set. Unless a value is specified, endpoint returns an error.

Response

200
application/json

OK

The response is of type object.