# Verify Serial Number   

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v3/products/serials/verification:
    post:
      summary: 'Verify Serial Number   '
      deprecated: false
      description: ยืนยันสินค้าด้วย Serial Number
      tags:
        - Venio/Product
      parameters:
        - name: Content-Type
          in: header
          description: ''
          required: true
          example: application/json
          schema:
            type: string
        - name: Ocp-Apim-Subscription-Key
          in: header
          description: รหัส subscription key ลูกค้า
          required: true
          example: '{{subscription_key}}'
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                SerialNumber:
                  type: string
                  description: รหัส Serail number
                CustomerName:
                  type: string
                  description: >-
                    ชื่อลูกค้า หากไม่มี CustomerCode
                    และชื่อไม่ตรงกับลูกค้าที่มีในระบบ
                    ระบบจะทำการสร้างลูกค้าใหม่ให้
                CustomerType:
                  description: >-
                    ประเภทลูกค้า 1 = business[13002], 2 = individual[13001]
                    ,*ถ้าไม่ใส่จะเป็น individual
                  type: integer
                SaleOrderNo:
                  type: string
                Note:
                  type: string
                Latitude:
                  type: number
                Longtitude:
                  type: number
                PurchaseDate:
                  type: string
                CustomerCode:
                  type: string
                  description: CustomerCode  สำหรับเลือกลูกค้าที่มีอยู่ในระบบ
              required:
                - SerialNumber
                - PurchaseDate
              x-apidog-orders:
                - SerialNumber
                - CustomerName
                - CustomerCode
                - CustomerType
                - SaleOrderNo
                - Note
                - Latitude
                - Longtitude
                - PurchaseDate
            example: |-
              {
                "SerialNumber": "string",//string Required
                "CustomerName": "John Doe",//string optional (required CustomerCode or CustomerName) 
                "CustomerCode": "Coode",//string optional (required CustomerCode or CustomerName)
                "CustomerType": 1,
                "SaleOrderNo": "SO23080001xxxxxxx",
                "Note": "This is a test note.",
                "Latitude": 13.7563,
                "Longtitude": 100.5018,
                "PurchaseDate": "2023-08-04"//string format "YYYY-MM-DD" Required
              }
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      codeGuardId:
                        type: string
                      serialNumber:
                        type: string
                      product:
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                          description:
                            type: string
                          pictureUrl:
                            type: string
                          isUseWarranty:
                            type: boolean
                          rewardPoints:
                            type: string
                        required:
                          - id
                          - name
                          - description
                          - pictureUrl
                          - isUseWarranty
                          - rewardPoints
                        x-apidog-orders:
                          - id
                          - name
                          - description
                          - pictureUrl
                          - isUseWarranty
                          - rewardPoints
                      counterId:
                        type: integer
                      ticketId:
                        type: integer
                        description: เลขที่ตั๋ว
                    required:
                      - codeGuardId
                      - serialNumber
                      - product
                      - counterId
                      - ticketId
                    x-apidog-orders:
                      - ticketId
                      - codeGuardId
                      - serialNumber
                      - product
                      - counterId
                  statusCode:
                    type: integer
                  httpStatusCode:
                    type: integer
                  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
                required:
                  - data
                  - statusCode
                  - httpStatusCode
                  - status
                x-apidog-orders:
                  - status
                  - data
                  - statusCode
                  - httpStatusCode
              example:
                data:
                  codeGuardId: 053KLRQ9
                  serialNumber: IOMO202309011
                  product:
                    id: 51958
                    name: IOMO
                    description: เครื่องสแกน
                    pictureUrl: >-
                      https://storage-dev.veniocrm.com/venio-app/Company/1015/Product/115169.jpeg?sv=2023-01-03&se=2023-08-08T08%3A13%3A42Z&sr=b&sp=r&sig=f95i5AKDYVL7hASrxNB9BGrhTS7hMBWznDN0v1QdlA0%3D
                    isUseWarranty: true
                    rewardPoints: '0'
                  counterId: 2372
                statusCode: 1000
                httpStatusCode: 200
          headers: {}
          x-apidog-name: Success
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    properties:
                      item:
                        type: string
                        description: ชื่อfieldเปลี่ยนตามerrorที่พบเจอและคำบรรยาย
                        nullable: true
                    description: รายการ error ที่เกิดขึ้น
                    x-apidog-orders:
                      - item
                  type:
                    type: string
                    description: รายละเอียดประเภท ของ httpstatuscodeที่เจอ error
                  title:
                    type: string
                    description: คำบรรย้าย error
                  status:
                    type: integer
                    description: |-
                      สถานะ code ของ httpเช่น
                      200 Ok
                      201 Created
                      400 BadRequest
                      401 Unauthorized
                      404 Record not found
                      500 Internal Server Error
                  extensions:
                    type: object
                    properties:
                      traceId:
                        type: string
                        description: รหัส traceId
                        nullable: true
                    x-apidog-orders:
                      - traceId
                    description: รายละเอียด extensions
                x-apidog-orders:
                  - errors
                  - type
                  - title
                  - status
                  - extensions
                required:
                  - errors
                  - type
                  - title
                  - status
                  - extensions
              example:
                errors:
                  products[0].productTag:
                    - >-
                      Error converting value "miniral water" to type
                      'System.Collections.Generic.List`1[System.String]'. Path
                      'products[0].productTag', line 19, position 41.
                type: https://tools.ietf.org/html/rfc7231#section-6.5.1
                title: One or more validation errors occurred.
                status: 400
                extensions:
                  traceId: 00-fbeda93da7e3d6d82c8c14996bad65c5-9008669817772575-00
          headers: {}
          x-apidog-name: Bad Request
        '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
        '500':
          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: คำบรรยาย code
                    x-apidog-orders:
                      - code
                      - description
                    required:
                      - code
                      - description
                  data:
                    type: string
                    description: คำบรรยาย error ที่เกิดขึ้น
                x-apidog-orders:
                  - status
                  - data
                required:
                  - status
                  - data
              example:
                status:
                  code: E9905
                  description: Success
                data: >-
                  An error occurred while saving the entity changes. See the
                  inner exception for details.
          headers: {}
          x-apidog-name: Server Error
      security:
        - bearer: []
      x-apidog-folder: Venio/Product
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/351895/apis/api-4028746-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: []

```
