Back to Home

Documentation

Everything you need to know to get the most out of DiscountFlow. Find guides, tutorials, and API references.

Quick Start
API References
FAQs
API References
/
API Endpoints
/
Product category

Product category

Returns a paginated list of product categories.

productCategories

Returns a paginated list of product categories.

Method

POST

Path

/graphql

Authentication

Bearer Token

Request Body Schema

Content-type: application/json

Variables

NameTypeRequiredDescription
firstIntOptionalItems per page. Default: 15
pageIntOptionalPage number. Default: 1

Example Payload

{
  "query": "query ($first: Int, $page: Int) { productCategories(first: $first, page: $page) { data { id name base_price description custom_fields created_at updated_at } paginatorInfo { currentPage lastPage total } } }",
  "variables": {
    "first": 10,
    "page": 1
  }
}

Response

Returns a paginated list of ProductCategory objects.

Example Response

{
  "data": {
    "productCategories": {
      "data": [
        {
          "id": "01JNQX4KZB7WNVR3MPXT6A0DYE",
          "name": "Sensors",
          "base_price": 50.0,
          "description": "Industrial sensor products",
          "custom_fields": null,
          "created_at": "2026-02-01 09:00:00",
          "updated_at": "2026-02-01 09:00:00"
        }
      ],
      "paginatorInfo": {
        "currentPage": 1,
        "lastPage": 2,
        "total": 18
      }
    }
  }
}

Errors

Example Response

{
  "errors": [
    {
      "message": "Unauthenticated."
    }
  ]
}