---
title: "Get all Product Masters"
method: GET
path: "/product-masters"
tags: ["Product Master"]
---

# Get all Product Masters

`GET /product-masters`

## Request

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

## Query parameters

- `currentPage` integer
- `pageSize` integer
- `sortBy` string
- `filter` string
- `searchString` string

## Headers

- `Authorization` string, required

## Response `200`

200 response

- ListOfProductMasterResponse
  - `status` boolean: action success
  - `message` string: error message
  - `code` integer: error code
  - `data` object
    - `total` integer: จำนวนสินค้าทั้งหมด
    - `currentPage` integer: หน้าที่แสดงสินค้า
    - `list` object[]: ข้อมูลสินค้า
      - `id` integer
      - `type` integer
      - `name` string
      - `code` string
      - `categoryId` integer
      - `categoryName` string
      - `sellSettings` object
        - `vatType` integer
        - `description` string, nullable
      - `buySettings` object
        - `vatType` integer
        - `description` string, nullable
      - `mainProductId` integer
      - `mainUnitId` integer
      - `mainUnitName` string
      - `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)
