Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Components of a Category

  2. Creating a Category

  3. Updating a Category

  4. Deleting a Category

  5. Get a single category

  6. Get list of categories

Components of a Category

The category consists of the following fields

...

Code Block
languagejson
End-point: /categories/<category id>
Request Type: DELETE
Headers: 
{
  "Authorization": "Bearer <your token>",
  "Project": "<project domain>"
}

Get a single Category

To get a category the following request must be made:

Code Block
languagejson
End-point: /categories/<category id>
Request Type: GET
Headers: 
{
  "Authorization": "Bearer <your token>",
  "Project": "<project domain>"
}

Get list of Categories

To get a list categories the following request must be made:

Code Block
languagejson
End-point: /categories
Request Type: GET
Headers: 
{
  "Authorization": "Bearer <your token>",
  "Project": "<project domain>"
}

The category listing endpoint supports pagination. There are additional parameters that can be used:

Parameters

  • limit

    • Description: Controls how many categories will be returned per page

    • Values:

      • Maximum value: 200

      • Default value: 20

    • Behaviour: Affects how many pages are generated.
      Example: If there are 60 categories and the limit is set to 10, this will generate 6 pages of categories.

    • Request:

      Code Block
      languagejson
      End-point: /categories?limit=10

  • page

    • Description: Controls which categories page will be retrieved

    • Values:

    • Behaviours: Affected by the “limit“ parameter

    • Request

      • Without “limit“ parameter

        Code Block
        End-point: /categories?page=2
      • With “limit“ parameter

        Code Block
        End-point: /categories?limit=10&page=2