# Get Products With Take & Status

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v2/Products/GetProduct:
    post:
      summary: Get Products With Take & Status
      deprecated: false
      description: การแสดงสินค้าหลายรายการ
      tags:
        - Venio/Product
      parameters:
        - name: Content-Type
          in: header
          description: ''
          required: false
          example: application/json
          schema:
            type: string
        - name: Ocp-Apim-Subscription-Key
          in: header
          description: รหัส subscription key ลูกค้า
          required: false
          example: <Your-Subscription-key>
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                take:
                  type: integer
                  description: จำนวนรายการสินค้าที่อยากแสดง
                status:
                  type: array
                  items:
                    type: integer
                  description: |-
                    สถานะของสินค้า 

                    [0 = inactive , 1 = activite]
              x-apidog-orders:
                - take
                - status
              required:
                - take
                - status
            example: "{\r\n    \"take\": 0, //จำนวน Product\r\n    \"status\": [\r\n        1\r\n    ] //สถานะของสินค้า [0 = inactive , 1 = activite]\r\n}"
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: object
                    properties:
                      code:
                        type: string
                        description: "<p>สถานะของ\_Business\_Code\_ถ้า<br>Success\_=\_1000<br>Error\_1\_ตัว\_=\_4001<br>Error\_มากกว่า\_1\_ตัว\_=\_4002\_\_\_\_<br>หรือเป็น\_Subcode\_ที่ต้องการจะแสดงเพื่อสื่อความหมายของ\_Error\_โดย\_subcode\_จะเป็นตัวเดียวกับ\_business\_error\_code\_หรือไม่ก็ได้\_เพื่อความสะดวกในการแสดงผล<p>"
                      description:
                        type: string
                        description: คำอธิบายข้อความที่จะแสดง
                    x-apidog-orders:
                      - code
                      - description
                    required:
                      - code
                      - description
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        productCode:
                          type: string
                          description: รหัสสินค้า [ไม่ต้องกรอก ถ้าเป็น multi-SKU]
                        productBarcode:
                          type: string
                          description: รหัสบาร์โค้ด
                        productName:
                          type: string
                          description: ชื่อสินค้า
                        productDescription:
                          type: string
                          description: รายละเอียดสินค้า
                        category:
                          type: string
                          description: "หมวดหมู่หลัก\_[ถ้ามีการส่งข้อมูลมาไม่ตรงกับระบบ\_ทางระบบจะทำการสร้าง\_Category\_ให้]"
                        subCategory:
                          type: string
                          description: "\_หมวดหมู่รอง [ถ้ามีการส่งข้อมูลมาไม่ตรงกับระบบ ทางระบบจะทำการสร้าง Category ให้]"
                        sub_SubCategory:
                          type: string
                          description: >-
                            หมวดหมู่ย่อย [ถ้ามีการส่งข้อมูลมาไม่ตรงกับระบบ
                            ทางระบบจะทำการสร้าง Category ให้]
                        cost:
                          type: number
                          description: >-
                            ต้นทุนสินค้า [ระบบจะไม่ Required และไม่สนใจ ถ้าเป็น
                            Multi SKU]
                          nullable: true
                        prices:
                          type: array
                          items:
                            type: object
                            properties:
                              priceTierName:
                                type: string
                                description: ชื่อระดับราคา
                              regularPrice:
                                type: number
                                description: ราคาปกติ
                              salePrice:
                                type: number
                                description: ราคาลด
                                nullable: true
                              vatValue:
                                type: number
                                description: >-
                                  ภาษีมูลค่าเพิ่ม [ถ้าไม่มีอยู๋ในระบบ
                                  จะทำการสร้างให้]
                              useDefaultVat:
                                type: boolean
                                description: >-
                                  <p>ใช้ภาษีมูลค่าเพิ่ม ที่เป็นค่าเริ่มต้น
                                  [<br>False = ไม่ใช้ Vat default , <br>True =
                                  ใช้ Vat default] <br>ค่า Vat จะเป็นตาม Set
                                  Defult Vat</p>
                                nullable: true
                              pricingTierId:
                                type: integer
                                description: "รหัส\_pricingTierId"
                                nullable: true
                            x-apidog-orders:
                              - priceTierName
                              - regularPrice
                              - salePrice
                              - vatValue
                              - useDefaultVat
                              - pricingTierId
                            required:
                              - regularPrice
                              - priceTierName
                              - vatValue
                          description: รายการราคาสินค้า
                        productUnitName:
                          type: string
                          description: >-
                            หน่วยสินค้า [ถ้าใส่ค่า Unit ไม่ตรงกับระบบ จะแสดง
                            error]
                        productWeight:
                          type: number
                          description: ' น้ำหนักสินค้า'
                        productWeightUnit:
                          type: string
                          description: "หน่วยน้ำหนักสินค้า\_[ระบบ\_Default\_ให้\_มี\_\"gram\"\_,\_\"kilogram\"]"
                        productTag:
                          type: array
                          items:
                            type: string
                          description: >-
                            ป้ายกำกับสินค้า [ถ้าไม่ตรงกับในระบบ จะสร้าง
                            productTag ให้ใหม่]
                        productImage:
                          type: array
                          items:
                            type: string
                          description: ' รูปสินค้า ให้ส่งเป็น PublicUrl'
                        trackInventory:
                          type: boolean
                          description: >-
                            จัดการข้อมูลคลังสินค้า [true = อนุญาตให้จัดการ ,
                            false = ไม่อนุญาตให้จัดการ]
                        qty:
                          type: integer
                          description: ' จำนวนสินค้า [เป็นจำนวนสินค้าของ Single Product]'
                          nullable: true
                        lowStockAlert:
                          type: integer
                          description: ' แจ้งเตือนเมื่อสต็อกคงเหลือ'
                          nullable: true
                        useWarranty:
                          type: boolean
                          description: >-
                            การรับประกันสินค้า [true = รับประกัน , false =
                            ไม่รับประกัน]
                          nullable: true
                        timeWarrantyValue:
                          type: integer
                          description: ' ระยะเวลาการรับประกันสินค้า'
                          nullable: true
                        timeWarrantyUnit:
                          type: string
                          description: >-
                            หน่วยเวลาการรับประกันสินค้า [y = year ,m = month ,d
                            = day]
                          nullable: true
                        warrantyNote:
                          type: string
                          description: ' บันทึกการรับประกันสินค้า'
                          nullable: true
                        visibility:
                          type: boolean
                          description: true = ทำรายการขายได้ , false = ทำรายการขายไม่ได้]
                        active:
                          type: boolean
                          description: สถานะสินค้า [true = ใช้งาน , false = ไม่ใช้งาน]
                      x-apidog-orders:
                        - productCode
                        - productBarcode
                        - productName
                        - productDescription
                        - category
                        - subCategory
                        - sub_SubCategory
                        - cost
                        - prices
                        - productUnitName
                        - productWeight
                        - productWeightUnit
                        - productTag
                        - productImage
                        - trackInventory
                        - qty
                        - lowStockAlert
                        - useWarranty
                        - timeWarrantyValue
                        - timeWarrantyUnit
                        - warrantyNote
                        - visibility
                        - active
                      required:
                        - productCode
                        - productName
                        - category
                        - prices
                        - productUnitName
                        - trackInventory
                        - visibility
                        - active
                x-apidog-orders:
                  - status
                  - data
                required:
                  - status
                  - data
              example:
                status:
                  code: '1000'
                  description: Success
                data:
                  - productCode: '123123'
                    productBarcode: ''
                    productName: Phone 2GB
                    category: Gorup Product
                    cost: 50
                    prices:
                      - priceTierName: Normal Price
                        regularPrice: 5000
                        salePrice: 2500
                        pricingTierId: 112
                        vatTaxValue: 7
                    productUnitName: เครื่อง
                    productTag: []
                    productImage: []
                    trackInventory: true
                    lowStockAlert: 0
                    useWarranty: false
                    timeWarrantyValue: 1
                    timeWarrantyUnit: 'Y'
                    visibility: true
                    active: true
                    productVariant: []
          headers: {}
          x-apidog-name: OK
        '401':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: |-
                      สถานะ code ของ httpเช่น
                      200 Ok
                      201 Created
                      400 BadRequest
                      401 Unauthorized
                      404 Record not found
                      500 Internal Server Error
                  message:
                    type: string
                    description: คำบรรยาย error
                x-apidog-orders:
                  - statusCode
                  - message
                required:
                  - statusCode
                  - message
              example:
                statusCode: 401
                message: >-
                  Access denied due to invalid subscription key. Make sure to
                  provide a valid key for an active subscription.
          headers: {}
          x-apidog-name: Unauthorized
      security:
        - bearer: []
      x-apidog-folder: Venio/Product
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/351895/apis/api-3597198-run
components:
  schemas: {}
  securitySchemes:
    bearerAuth:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: ใส่ JWT Token ในรูปแบบ Bearer {token}
    bearer:
      type: http
      scheme: bearer
servers:
  - url: https://api.gofive.co.th
    description: Production
security:
  - bearerAuth: []
    x-apidog:
      schemeGroups:
        - id: uyL_cJmK7q60QJZRTi5ot
          schemeIds:
            - bearerAuth
      required: true
      use:
        id: uyL_cJmK7q60QJZRTi5ot
      scopes:
        uyL_cJmK7q60QJZRTi5ot:
          bearerAuth: []

```
