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 by ID

Product category by ID

Retrieve all user data

productCategory

Returns a single product category by ID.

Method

POST

Path

/graphql

Authentication

Bearer Token

Request Body Schema

Content-type: application/json

Variables

NameTypeRequiredDescription
idIDRequiredThe product category ID

Example Payload

{
  "query": "query ($id: ID!) { productCategory(id: $id) { id name base_price description custom_fields created_at updated_at } }",
  "variables": {
    "id": "01JNQX4KZB7WNVR3MPXT6A0DYE"
  }
}

Response

Returns a single ProductCategory object, or null if not found.

Example Response

{
  "data": {
    "productCategory": {
      "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"
    }
  }
}

Errors

Example Response

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