Reward Store API Documentation

Categories

Retrieve category information

GET /categories/

Use this endpoint to get information on categories and subcategories applicable to products assigned to your reward store.
If neither category or subcategory fields are present, then all categories and subcategories will be returned.

The following parameters are available to filter the categories returned:

Parameter Example Notes
categories BOOKS,COMP Optional. Specify category codes comma separated. Returns specified categories with subcategories.
subcategories BOOKS003,COMP002 Optional. Specify subcategory codes comma separated. Returns parent categories with specified subcategories.
This field is ignored if the category field is present.
languages en,fr,de Optional. Only return the specified translations for the name and description fields. Note that not all languages are guaranteed to be present.
Please see Getting Started for a list of available languages. If this field is omitted, all languages will be output.
JSON
Body content
{
    "subcategories": "BOOKS003,COMP002",
    "languages": "en,fr,de"
}

The output will contain the following properties:

Property Description
code Unique identifier
slug URL-friendly identifier
name Object containing available translations for the category name, optionally filtered by your language selection above.
Keyed by the language code. If a translation is not available, it will not be present in this object.

The parameters above will result in the following output:

JSON
HTTP Status 200 OK
[
    {
        "code": "BOOKS",
        "slug": "books",
        "name": {
            "en": "Books",
            "fr": "Livres",
            "de": "Bücher"
        },
        "subcategories": [
            {
                "code": "BOOKS003",
                "slug": "fiction",
                "name": {
                    "en": "Fiction",
                    "fr": "Fiction",
                    "de": "Fiktion"
                }
            }
        ]
    },
    {
        "code": "COMP",
        "slug": "computing",
        "name": {
            "en": "Computing",
            "fr": "L'informatique",
            "de": "Computing"
        },
        "subcategories": [
            {
                "code": "COMP002",
                "slug": "data-storage",
                "name": {
                    "en": "Data Storage",
                    "fr": "Stockage de données",
                    "de": "Datenspeicher"
                }
            }
        ]
    }
]