Categories

Categories endpoint

Get Categories

GET https://pomeranianstoner.com/v1/categories

This endpoint allows you to get list of all categories.

Headers

Name
Type
Description

Authentication

object

Authentication token present in cookies.

{
  "count": 2,
  "results": [
    {
      "id": 1,
      "name": "Food",
      "sub_categories": {
        "count": 2,
        "results": [
          {
            "id": 1,
            "name": "Food General"
          },
          {
            "id": 2,
            "name": "Supermarket"
          }
        ]
      }
    },
    {
      "id": 2,
      "name": "Entertainment",
      "sub_categories": {
        "count": 2,
        "results": [
          {
            "id": 1,
            "name": "Entertainment General"
          },
          {
            "id": 2,
            "name": "Bar"
          }
        ]
      }
    }
  ]
}

Create new category

POST https://pomeranianstoner.com/v1/categories

This endpoint allows you to create new category.

Headers

Name
Type
Description

Authentication

object

Authentication token present in cookies.

Request Body

Name
Type
Description

parent_id

string

Parent category id.

name

string

Category name.

Last updated

Was this helpful?