Skip to main content
GET
/
v1
/
categories
List Categories
curl --request GET \
  --url https://{cluster}.voucherify.io/v1/categories \
  --header 'Authorization: Bearer <token>' \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>'
{
  "object": "list",
  "data_ref": "data",
  "data": [
    {
      "id": "cat_0b5f49fb31c3bf6ab0",
      "name": "Sixth",
      "hierarchy": 6,
      "created_at": "2022-07-13T06:21:36.852Z",
      "object": "category"
    },
    {
      "id": "cat_0b5f49e6e1ce5bd2ba",
      "name": "Fifth",
      "hierarchy": 5,
      "created_at": "2022-07-13T06:21:16.039Z",
      "object": "category"
    },
    {
      "id": "cat_0b5f49deafce5bd2b5",
      "name": "Fourth",
      "hierarchy": 4,
      "created_at": "2022-07-13T06:21:07.662Z",
      "object": "category"
    },
    {
      "id": "cat_0b5f49d45c43bf6a99",
      "name": "Third",
      "hierarchy": 3,
      "created_at": "2022-07-13T06:20:57.094Z",
      "object": "category"
    },
    {
      "id": "cat_0b5f3f9881ce5bccb6",
      "name": "Second",
      "hierarchy": 2,
      "created_at": "2022-07-13T05:36:14.355Z",
      "object": "category"
    },
    {
      "id": "cat_0b53bc388dc2f108ba",
      "name": "First",
      "hierarchy": 1,
      "created_at": "2022-07-04T06:58:57.734Z",
      "object": "category"
    }
  ],
  "total": 6
}

Authorizations

X-App-Id
string
header
required
X-App-Token
string
header
required
Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Response

200 - application/json

Returns a dictionary of category objects.

Response body schema for GET v1/categories.

object
enum<string>
default:list
required

The type of the object represented by JSON. This object stores information about categories in a dictionary.

Available options:
list
data_ref
enum<string>
default:data
required

Identifies the name of the attribute that contains the array of category objects.

Available options:
data
data
Category · object[]
required
total
integer
required

Total number of categories.

I