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

Product by ID

Get single product

product

Returns a single product by ID.

Method

POST

Path

/graphql

Authentication

Bearer Token

Request Body Schema

Content-type: application/json

Variables

NameTypeRequiredDescription
idIDRequiredThe product ID

Example Payload

{
  "query": "query ($id: ID!) { product(id: $id) { id partnumber description model list_price msrp moq tariff_surcharge allow_tariff other_details created_at updated_at } }",
  "variables": {
    "id": "1"
  }
}

Response

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

Example Response

{
  "data": {
    "product": {
      "id": "1",
      "partnumber": "ABC-001",
      "description": "Standard Widget",
      "model": "W1",
      "list_price": 99.99,
      "msrp": 129.99,
      "moq": 10,
      "tariff_surcharge": 5.0,
      "allow_tariff": true,
      "other_details": null,
      "created_at": "2026-01-15 10:30:00",
      "updated_at": "2026-03-24 14:22:00"
    }
  }
}

Errors

Example Response

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