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

Overview

API References
/
API Endpoints
/
Mutations

Mutations

Object: ProductCategory

Product Category — Mutation

Object: ProductCategory Slug: product-category-mutation


createProductCategory

mutation {
  createProductCategory(input: {
    name: "Sensors"
    base_price: 50.00
    description: "Industrial sensor products"
  }) {
    id
    name
    base_price
  }
}

Required fields: name

updateProductCategory

mutation {
  updateProductCategory(id: "01ABC123", input: {
    name: "Sensors & Actuators"
    base_price: 55.00
  }) {
    id
    name
    base_price
    updated_at
  }
}

deleteProductCategory

Permanently deletes the category. Products previously linked to it lose their category association.

mutation {
  deleteProductCategory(id: "01ABC123") {
    id
    name
  }
}