---
title: "Get Product Master by Id"
method: GET
path: "/product-masters/{id}"
tags: ["Product Master"]
---

# Get Product Master by Id

`GET /product-masters/{id}`

## Request

- Base URL: `https://openapi.flowaccount.com/v1`
- URL: `https://openapi.flowaccount.com/v1/product-masters/{id}`
- Auth: none declared. Required headers: `Authorization`
- TypeScript: <https://skmtc.dev/flowaccount/apis/flowaccount-open-api/docs/product-masters/:id/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `id` integer, required

## Headers

- `Authorization` string, required

## Response `200`

200 response

- ProductMasterResponse
  - `status` boolean: action success
  - `message` string: error message
  - `code` integer: error code
  - `data` DataProductMasterResponse[]
    - `id` integer: เลข id Product master
    - `type` integer: ประเภทสินค้า: 1 = บริการ / 3 = ไม่นับสต๊อก / 5 = นับสต๊อก
    - `name` string: ชื่อสินค้า <br> <ex>Example: Product</ex>
    - `code` string, nullable: รหัสสินค้า <br> <ex>Example: P001</ex>
    - `categoryId` integer, nullable: id หมวดสินค้า
    - `categoryName` string, nullable: หมวดสินค้า
    - `sellSettings` TradeSettingsResponse[]: ข้อมูลการขาย
      - `vatType` integer: ภาษี: <br> 1 = ราคาขายรวมภาษี <br> 3 = ราคาขายไม่รวมภาษี <br> 5 = ราคาขายภาษี 0% <br> 7 = ราคาขายสินค้าได้รับการยกเว้นภาษี
      - `description` string, nullable: รายละเอียดสินค้า
      - `chartOfAccountId` integer, nullable: เลข id ของผังบัญชี
      - `chartOfAccountCode` string, nullable: รหัสของผังบัญชี
      - `chartOfAccountName` string, nullable: ชื่อของผังบัญชี
    - `buySettings` TradeSettingsResponse[]: ข้อมูลการซื้อ
      - `vatType` integer: ภาษี: <br> 1 = ราคาขายรวมภาษี <br> 3 = ราคาขายไม่รวมภาษี <br> 5 = ราคาขายภาษี 0% <br> 7 = ราคาขายสินค้าได้รับการยกเว้นภาษี
      - `description` string, nullable: รายละเอียดสินค้า
      - `chartOfAccountId` integer, nullable: เลข id ของผังบัญชี
      - `chartOfAccountCode` string, nullable: รหัสของผังบัญชี
      - `chartOfAccountName` string, nullable: ชื่อของผังบัญชี
    - `nonInventorySettings` NonInventorySettingsResponse[]: ข้อมูลเกี่ยวกับสินค้าไม่นับสต๊อก
      - `productNonInventoryType` integer, nullable: ประเภทของสินค้าไม่นับสต๊อก <br> 1 = สินค้าเพื่อขาย <br> 11 = อื่น ๆ
    - `inventorySettings` InventorySettingsResponse[]: ข้อมูลเกี่ยวกับการตั้งต้นจำนวนสินค้า
      - `inventoryPublishedOn` string, date, nullable: วันที่ตั้งต้นสินค้า รูปแบบ yyyy-MM-dd <br> <ex>Example: 2021-01-01</ex>
      - `averageSellPrice` number, nullable: ราคาขายเฉลี่ย
      - `averageBuyPrice` number, nullable: ราคาซื้อเฉลี่ย
      - `remainingStock` number, nullable: จำนวนคงคลัง
      - `totalValueInHand` number, nullable: มูลค่ารวม
      - `warehouseId` integer, nullable: เลข id คลังสินค้า
    - `mainProductId` integer: เลข id ของสินค้าหน่วยหลัก
    - `mainUnitId` integer, nullable: เลข id ของหน่วยหลักของสินค้า
    - `mainUnitName` string, nullable: ชื่อหน่วยของหน่วยหลักของสินค้า
    - `productLists` ProductListResponse[]: รายการสินค้า
      - `id` integer: เลข id ของรายการสินค้า
      - `unitId` integer, nullable: เลข id ของหน่วยของรายการสินค้า
      - `unitName` string, nullable: ชื่อของหน่วยของรายการสินค้า
      - `isMainProduct` boolean: เครื่องหมายเพื่อระบุการเป็นรายการสินค้าที่มีหน่วยหลัก
      - `sellPrice` number, nullable: ราคาขายรายการสินค้า
      - `sellPriceWithVat` number, nullable: ราคาขายรวมภาษีของรายการสินค้า
      - `buyPrice` number, nullable: ราคาซื้อรายการสินค้า
      - `buyPriceWithVat` number, nullable: ราคาซื้อรวมภาษีของรายการสินค้า
      - `barcode` string, nullable: บาร์โค้ดรายการสินค้า ไม่เกิน 15 ตัวอักษร
      - `convertRatio` number: อัตราส่วนระหว่างรายการสินค้าและรายการสินค้าที่มีหน่วยหลัก
      - `hasMovement` boolean: เครื่องหมายเพื่อระบุความเคลื่อนไหวของรายการสินค้า

## Other responses

- `400`: Error code and message will describe the error
- `401`: 401 response
- `500`: 500 response

---

[API](https://skmtc.dev/flowaccount/apis/flowaccount-open-api.md) - [All operations](https://skmtc.dev/flowaccount/apis/flowaccount-open-api/llms.txt) - [OpenAPI document](https://skmtc.dev/flowaccount/apis/flowaccount-open-api/revisions/4ba3d3ca5bd5?raw)
