GET /v1/shop/product/{id}

load a product for a given Id

Path parameters

  • id string Required

Responses

  • 200 application/json

    A company products

    Hide response attributes Show response attributes object
    • id string Required
    • name string Required
    • taxRateId string
    • categoryId string | null Required
    • imgUrls array[object] Required
      Hide imgUrls attributes Show imgUrls attributes object
      • id string Required
      • url string Required
    • courses array[string] Required
    • variants array[object] Required
      Hide variants attributes Show variants attributes object
      • id string Required
      • price integer Required
      • stock integer | null Required
      • code string | null Required
      • attributes array[object] Required
        Hide attributes attributes Show attributes attributes object
        • id string Required
        • name string Required
        • value string Required
GET /v1/shop/product/{id}
curl \
 --request GET 'https://classmanager.test/v1/shop/product/pcat_01jq6nbd7rvjg4bsnf8v873gwr'
Response examples (200)
{
  "id": "prod_01jq6nbd7b8hvajm12rbycwazt",
  "name": "Ballroom Costumes",
  "taxRateId": "tax_01jr892fdx8bjw166r1dm9c3hg",
  "categoryId": "pcat_01jr892g2ndffn7a62wa4nwv6n",
  "imgUrls": [
    {
      "id": "file_01jq6nbd7b8hvajm12rbycwazt",
      "url": "https://example.com/image.png"
    }
  ],
  "courses": [
    "cls_01jqezwkq5es6ge03ag2qx17km"
  ],
  "variants": [
    {
      "id": "var_01jqezwkq4s2qkep106djgbwjz",
      "price": 5655,
      "stock": 10,
      "code": "PUR-001",
      "attributes": [
        {
          "id": "attr_01jqezwkq5es6ge03ag2qx17km",
          "name": "Color",
          "value": "Red"
        }
      ]
    }
  ]
}