Product Detail

This page describes the request data identifiers and response structure required to build a product detail page.

Data Identifier

{
  "dataID": "GET_PRODUCT",
  "seq": 340
}
KeyDescription
dataIDData identifier GET_PRODUCT
seqProduct number

HTML

<div class="card shadow-sm p-4">
  <h4 class="mb-1">{{ output.product.name }}</h4>
  <p class="text-secondary">{{ output.product.summary }}</p>
  <del v-if="output.product.list_price > output.product.base_price">{{ output.product.list_price }}</del>
  <h5>{{ output.product.base_price }} {{ output.product.currency }}</h5>
  <label class="form-label">{{ output.product.option_sets[0].label }}</label>
  <select class="form-select" name="variant_seq">
    <option v-for="r in output.product.option_sets[0].rows" :value="r.seq" :disabled="!r.orderable">
      {{ r.option_text }} (+{{ r.price_delta }})
    </option>
  </select>
  <button type="button" class="btn btn-primary mt-3">Add to cart</button>
</div>

Response Result

{
  "result": true,
  "product": {
    "seq": 340,
    "product_code": "TS-TS01",
    "product_type": "PHYSICAL",
    "status": "ACTIVE",
    "name": "Cotton T-Shirt",
    "brand": "H:Dev+",
    "summary": "100% soft cotton tee",
    "description": "<p>180g cotton jersey</p>",
    "currency": "KRW",
    "base_price": 19000,
    "list_price": 25000,
    "option_rev": 1,
    "stock_flg": 0,
    "extra_data": null,
    "created_by": 3,
    "updated_by": null,
    "create_date": "2026-10-04 11:57:34",
    "modify_date": "2026-10-04 11:57:35",
    "delete_flg": "N",
    "variant_count": 6,
    "option_sets": [
      {
        "seq": 12,
        "set_no": 1,
        "set_type": "COMBO",
        "label": "Color / Size",
        "is_required": 1,
        "stock_flg": 1,
        "add_price": 0,
        "sort_order": 0,
        "options": [
          {
            "seq": 21,
            "name": "Color",
            "sort_order": 0,
            "values": [
              {
                "seq": 101,
                "label": "White",
                "code": "WHT",
                "price_delta": 0,
                "sort_order": 0
              },
              {
                "seq": 102,
                "label": "Black",
                "code": "BLK",
                "price_delta": 1000,
                "sort_order": 1
              }
            ]
          },
          {
            "seq": 22,
            "name": "Size",
            "sort_order": 1,
            "values": [
              {
                "seq": 103,
                "label": "S",
                "code": null,
                "price_delta": 0,
                "sort_order": 0
              },
              {
                "seq": 104,
                "label": "M",
                "code": null,
                "price_delta": 0,
                "sort_order": 1
              },
              {
                "seq": 105,
                "label": "L",
                "code": null,
                "price_delta": 2000,
                "sort_order": 2
              }
            ]
          }
        ],
        "rows": [
          {
            "seq": 5001,
            "combo_key": "101-103",
            "values": [
              101,
              103
            ],
            "option_text": "White / S",
            "sku": "TS-TS01-WHT-V103",
            "status": "ACTIVE",
            "price_delta": 0,
            "quantity_on_hand": 10,
            "quantity_reserved": 0,
            "inventory_version_no": 1,
            "orderable": 1
          },
          {
            "seq": 5002,
            "combo_key": "101-104",
            "values": [
              101,
              104
            ],
            "option_text": "White / M",
            "sku": "TS-TS01-WHT-V104",
            "status": "ACTIVE",
            "price_delta": 0,
            "quantity_on_hand": 3,
            "quantity_reserved": 0,
            "inventory_version_no": 1,
            "orderable": 1
          },
          {
            "seq": 5003,
            "combo_key": "101-105",
            "values": [
              101,
              105
            ],
            "option_text": "White / L",
            "sku": "TS-TS01-WHT-V105",
            "status": "ACTIVE",
            "price_delta": 2000,
            "quantity_on_hand": 0,
            "quantity_reserved": 0,
            "inventory_version_no": 1,
            "orderable": 0
          }
        ]
      }
    ],
    "base_stock": {
      "mode": "SUM",
      "quantity_on_hand": 23,
      "quantity_reserved": 0,
      "available": 23,
      "sets": [
        {
          "set_seq": 12,
          "label": "Color / Size",
          "quantity_on_hand": 23,
          "quantity_reserved": 0,
          "available": 23
        }
      ]
    },
    "option_groups": [],
    "variants": [
      {
        "seq": 5001,
        "product_seq": 340,
        "set_seq": 12,
        "base_flg": 0,
        "combo_key": "101-103",
        "sku": "TS-TS01-WHT-V103",
        "barcode": null,
        "status": "ACTIVE",
        "price_override": null,
        "price_delta": 0,
        "combo_active": "781-783",
        "base_active": null,
        "set_label": "Color / Size",
        "quantity_on_hand": 10,
        "quantity_reserved": 0,
        "reorder_level": 2,
        "version_no": 1,
        "quantity_available": 10,
        "option_values": []
      },
      {
        "seq": 5002,
        "product_seq": 340,
        "set_seq": 12,
        "base_flg": 0,
        "combo_key": "101-104",
        "sku": "TS-TS01-WHT-V104",
        "barcode": null,
        "status": "ACTIVE",
        "price_override": null,
        "price_delta": 0,
        "combo_active": "781-784",
        "base_active": null,
        "set_label": "Color / Size",
        "quantity_on_hand": 3,
        "quantity_reserved": 0,
        "reorder_level": 2,
        "version_no": 1,
        "quantity_available": 3,
        "option_values": []
      }
    ],
    "custom_fields": [],
    "images": [],
    "categories": [
      {
        "seq": 2,
        "parent_seq": 1,
        "code": "TSHIRTS",
        "name": "T-Shirts",
        "depth": 1,
        "sort_order": 1,
        "status": "ACTIVE",
        "map_sort_order": 0
      }
    ],
    "related_product": [],
    "delete_impact": {
      "variant_count": 6,
      "stock_on_hand": 23,
      "image_count": 0,
      "category_count": 1
    }
  },
  "option_group_list": [
    {
      "seq": 10,
      "code": "COLOR",
      "name": "Color",
      "status": "ACTIVE",
      "stock_flg": 1,
      "variant_use_count": 0,
      "product_use_count": 0,
      "option_values": [
        {
          "seq": 111,
          "option_group_seq": 10,
          "code": "WHT",
          "label": "White",
          "price_delta": 0,
          "sort_order": 0,
          "status": "ACTIVE"
        },
        {
          "seq": 112,
          "option_group_seq": 10,
          "code": "BLK",
          "label": "Black",
          "price_delta": 1000,
          "sort_order": 1,
          "status": "ACTIVE"
        }
      ]
    }
  ],
  "category_list": [
    {
      "seq": 1,
      "parent_seq": null,
      "code": "APPAREL",
      "name": "Apparel",
      "depth": 0,
      "sort_order": 1,
      "status": "ACTIVE"
    },
    {
      "seq": 2,
      "parent_seq": 1,
      "code": "TSHIRTS",
      "name": "T-Shirts",
      "depth": 1,
      "sort_order": 1,
      "status": "ACTIVE"
    }
  ]
}
KeyDescription
productThe product. null if not found
product.base_priceSelling price
product.list_priceRegular price. null if none
product.option_revOption revision
product.stock_flgBase-row stock tracking 0 / 1
product.option_setsOption sets
product.option_sets[n].seqOption set number. set_seq in an order
product.option_sets[n].set_typeCOMBO / TEXT
product.option_sets[n].labelOption set name
product.option_sets[n].is_requiredRequired 0 / 1
product.option_sets[n].stock_flgStock tracked 0 / 1
product.option_sets[n].optionsOptions and their values
product.option_sets[n].rowsRows the customer can pick
product.option_sets[n].rows[n].seqRow number. variant_seq in an order
product.option_sets[n].rows[n].option_textDisplay text, e.g. White / S
product.option_sets[n].rows[n].price_deltaExtra amount added to the price
product.option_sets[n].rows[n].quantity_on_handStock on hand
product.option_sets[n].rows[n].quantity_reservedQuantity reserved by orders
product.option_sets[n].rows[n].orderable1 orderable / 0 sold out or inactive
product.base_stockStock summary
product.variantsAll option rows (admin use)
product.option_groupsLegacy. Always empty
product.categoriesLinked categories
product.imagesImages
product.custom_fieldsCustom fields
product.related_productRelated products
product.delete_impactDelete impact counts
option_group_listActive option groups (admin use)
category_listCategory tree (admin use)
  • Screen example (detail to cart): build a select box from option_sets[n].rows and disable rows with orderable 0. Store only product_seq, quantity and selections[{set_seq, variant_seq}] in the cart; the server recalculates price and stock at order time.
  • Price: base_price is the selling price and list_price the regular price (null if none). With an option, price = base_price + the row's price_delta. Show a struck-through list price and discount only when list_price is greater.
  • Stock: available = on hand (quantity_on_hand) − reserved (quantity_reserved). The server adds reservations when an order is placed and releases them on shipping or cancellation.
  • base_stock.mode is SUM (sum of option rows) when option stock exists, otherwise BASE (the single base row). available = quantity_on_hand − quantity_reserved. option_sets[n].options is {name, values[{seq, label, price_delta}]}.
  • product.option_groups and variants[n].option_values are empty since v1.0.35. Use option_sets to show options.
  • Error codes — errors also come back as HTTP 200. Check result:false, then error_code (string) and error_message.
  • This read API needs no sign-in. An unknown seq returns result:true with product:null. On a storefront, show a 404 page unless status is ACTIVE.

Example

T-Shirts

Cotton T-Shirt

100% soft cotton tee

₩25,000
₩19,000
<script setup>
import { ref, computed } from 'vue'
const { output } = await useNuxtApp().$connector({ dataID: 'GET_PRODUCT', seq: 340 })
const p = output.product
const set = p.option_sets[0]                 // COMBO option set (e.g. Color / Size)
const picked = ref(null)                     // a row of set.rows
const price = computed(() => p.base_price + (picked.value ? picked.value.price_delta : 0))
const money = v => new Intl.NumberFormat('ko-KR', { style: 'currency', currency: p.currency }).format(v)

function addToCart() {
  // Keep only what CREATE_ORDER needs; the server recalculates price and stock
  const cart = JSON.parse(localStorage.getItem('cart') || '[]')
  cart.push({ product_seq: p.seq, quantity: 1, selections: [{ set_seq: set.seq, variant_seq: picked.value.seq }] })
  localStorage.setItem('cart', JSON.stringify(cart))
}
</script>

<template>
  <div class="card shadow-sm p-4">
    <div class="small text-secondary">{{ p.categories.map(c => c.name).join(' / ') }}</div>
    <h4 class="mb-1">{{ p.name }}</h4>
    <p class="text-secondary">{{ p.summary }}</p>
    <del v-if="p.list_price > p.base_price" class="text-secondary">{{ money(p.list_price) }}</del>
    <h5>{{ money(price) }}</h5>

    <label class="form-label mt-3">{{ set.label }}</label>
    <select class="form-select" v-model="picked">
      <option :value="null" disabled>Choose an option</option>
      <option v-for="r in set.rows" :key="r.seq" :value="r" :disabled="!r.orderable">
        {{ r.option_text }}{{ r.price_delta ? ' (+' + r.price_delta.toLocaleString() + ')' : '' }}{{ r.orderable ? '' : ' - Sold out' }}
      </option>
    </select>
    <button class="btn btn-primary mt-3" :disabled="!picked" @click="addToCart">Add to cart</button>
  </div>
</template>
<?php
$output = $connector->request(['dataID' => 'GET_PRODUCT', 'seq' => 340]);
$p = $output['product'];
if (!$p || $p['status'] !== 'ACTIVE') { http_response_code(404); exit; }
$set = $p['option_sets'][0] ?? null;
?>
<h4><?= htmlspecialchars($p['name']) ?></h4>
<?php if ($p['list_price'] !== null && $p['list_price'] > $p['base_price']) { ?>
  <del><?= number_format($p['list_price']) ?></del>
<?php } ?>
<h5><?= number_format($p['base_price']) ?> <?= $p['currency'] ?></h5>
<?php if ($set) { ?>
<form method="post" action="/cart/add">
  <input type="hidden" name="product_seq" value="<?= $p['seq'] ?>">
  <input type="hidden" name="set_seq" value="<?= $set['seq'] ?>">
  <select name="variant_seq" class="form-select">
  <?php foreach ($set['rows'] as $r) { ?>
    <option value="<?= $r['seq'] ?>" <?= $r['orderable'] ? '' : 'disabled' ?>>
      <?= htmlspecialchars($r['option_text']) ?><?= $r['price_delta'] ? ' (+' . number_format($r['price_delta']) . ')' : '' ?>
    </option>
  <?php } ?>
  </select>
  <button class="btn btn-primary mt-3">Add to cart</button>
</form>
<?php } ?>