# Get a Quotation By QuotationNo

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/quotation/{quotationNo}:
    get:
      summary: Get a Quotation By QuotationNo
      deprecated: false
      description: ดึงข้อมูล Quotation โดย  QuotationNo
      tags:
        - Venio/Quotation
      parameters:
        - name: quotationNo
          in: path
          description: ''
          required: true
          example: ''
          schema:
            type: string
        - name: Ocp-Apim-Subscription-Key
          in: header
          description: รหัส subscription key ลูกค้า
          required: true
          example: <Your Subscription-Key>
          schema:
            type: string
        - name: Content-Type
          in: header
          description: ''
          required: true
          example: application/json
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: object
                    properties:
                      code:
                        type: string
                      description:
                        type: string
                    required:
                      - code
                      - description
                    x-apidog-orders:
                      - code
                      - description
                  data:
                    type: object
                    properties:
                      quotationSubject:
                        type: string
                      customerCode:
                        type: string
                      customerId:
                        type: integer
                      quotationNo:
                        type: string
                      quotationStatus:
                        type: integer
                      privateNote:
                        type: string
                      quotationDate:
                        type: string
                      recipientName:
                        type: string
                      recipientAddress:
                        type: string
                      headerTemplateId:
                        type: integer
                      warehouseCode:
                        type: string
                        description: รหัสคลังสินค้า
                        nullable: true
                      quotationDetails:
                        type: array
                        items:
                          type: object
                          properties:
                            productCode:
                              type: string
                            productName:
                              type: string
                            price:
                              type: integer
                            qty:
                              type: integer
                            productDescription:
                              type: string
                            discountValue:
                              type: integer
                              description: >-
                                เมื่อ DiscountBasisType = 360002 (ต่อหน่วย)
                                จะเป็นส่วนลดต่อหน่วย, เมื่อ = 360001 (ต่อรายการ)
                                จะเป็นส่วนลดของทั้งบรรทัด
                            discountType:
                              type: boolean
                            discountLevel:
                              type: integer
                              description: |-
                                ระดับการคิดส่วนลดของรายการสินค้า
                                1 = Unit: ส่วนลดต่อหน่วยสินค้า
                                2 = Item: ส่วนลดต่อรายการสินค้า
                              enum:
                                - 1
                                - 2
                              default: 2
                            totalPrice:
                              type: integer
                            productUnitName:
                              type: string
                            warehouseCode:
                              type: string
                              description: รหัสคลังสินค้า
                              nullable: true
                            vatTaxId:
                              type: number
                              description: ID ภาษี VAT (-1 = ไม่มี)
                            vatTaxValue:
                              type: number
                              description: '% VAT'
                            whtTaxId:
                              type: number
                              description: ID ภาษีหัก ณ ที่จ่าย (-1 = ไม่มี)
                            whtTaxValue:
                              type: number
                              description: '% WHT'
                            productId:
                              type: number
                              description: ID สินค้า (internal)
                            unitId:
                              type: integer
                              description: ID หน่วยสินค้า
                            discountBasisType:
                              type: integer
                              enum:
                                - 360001
                                - 360002
                              x-apidog-enum:
                                - value: 360001
                                  name: PerItem
                                  description: คิดส่วนลดแบบต่อรายการ/ทั้งบรรทัด
                                - value: 360002
                                  name: PerUnit
                                  description: คิดส่วนลดแบบต่อหน่วย
                          x-apidog-orders:
                            - productCode
                            - productName
                            - price
                            - qty
                            - productDescription
                            - discountValue
                            - discountType
                            - discountLevel
                            - totalPrice
                            - productUnitName
                            - warehouseCode
                            - vatTaxId
                            - vatTaxValue
                            - whtTaxId
                            - whtTaxValue
                            - productId
                            - unitId
                            - discountBasisType
                          required:
                            - discountBasisType
                      discountName:
                        type: string
                      discountValue:
                        type: integer
                      discountType:
                        type: boolean
                      remark:
                        type: string
                      staffCode:
                        type: string
                      vatCalculation:
                        type: boolean
                      subTotal:
                        type: integer
                      subTotalWithDiscount:
                        type: integer
                      grandTotal:
                        type: integer
                      attachments:
                        type: array
                        items:
                          type: object
                          properties:
                            attachmentId:
                              type: integer
                              description: |
                                รหัสfileแนบ
                            refId:
                              type: integer
                              description: >-
                                รหัสอ้างอิงจากตาราง activity, feedback,
                                inventory,purchaseRequisition
                            type:
                              type: integer
                              description: |-
                                ประเภท file:
                                1 = activity
                                2 = expense
                                3 = customer
                            filename:
                              type: string
                              description: ไฟล์แนบ
                            extension:
                              type: string
                              description: นามสกุลไฟล์
                            fileSize:
                              type: integer
                              description: ขนาดไฟล์
                            isActive:
                              type: boolean
                              description: |-
                                ใช้งานอยู่หรือไม่
                                true = ใช้งานอยู่
                                false = ไม่ได้ใช้งานอยู่
                            createdByUserId:
                              type: string
                              description: รหัส userid ผู้สร้าง
                              nullable: true
                            dateCreated:
                              type: string
                              description: เวลาสร้าง
                            resourceUrl:
                              type: string
                              description: urlที่มา
                              nullable: true
                            companyId:
                              type: integer
                              description: รหัสบริษัท
                              nullable: true
                            data:
                              type: string
                              description: ข้อมูลเพิ่มเติม (มักเป็น "")
                            url:
                              type: string
                              description: url
                            urlResponseUpload:
                              type: string
                              description: urlResponseUpload
                            thumbnail:
                              type: string
                              description: URL thumbnail ภายใน
                            seq:
                              type: integer
                              description: ลำดับไฟล์
                            thumbnailUrl:
                              type: string
                              description: URL thumbnail (signed, มี expiry)
                            thumbnailStorageProvider:
                              type: integer
                              description: Provider thumbnail (4 = Cloudflare R2)
                            thumbnailResourceUrl:
                              type: string
                              description: Path thumbnail บน storage
                          required:
                            - attachmentId
                            - refId
                            - type
                            - filename
                            - extension
                            - fileSize
                            - isActive
                            - dateCreated
                            - url
                            - urlResponseUpload
                            - thumbnail
                            - data
                            - seq
                            - thumbnailUrl
                            - thumbnailStorageProvider
                            - thumbnailResourceUrl
                          x-apidog-orders:
                            - attachmentId
                            - refId
                            - type
                            - filename
                            - extension
                            - fileSize
                            - isActive
                            - createdByUserId
                            - dateCreated
                            - resourceUrl
                            - companyId
                            - data
                            - url
                            - urlResponseUpload
                            - thumbnail
                            - seq
                            - thumbnailUrl
                            - thumbnailStorageProvider
                            - thumbnailResourceUrl
                      refOrderId:
                        type: string
                      quotationId:
                        type: number
                        nullable: true
                      quotationValidUntil:
                        type: string
                      referenceNo:
                        type: string
                      contactId:
                        type: number
                      contactName:
                        type: string
                      customerAddressId:
                        type: number
                      currencyCode:
                        type: string
                      paymentTerm:
                        type: string
                      salesPersonId:
                        type: string
                      totalVat:
                        type: number
                    required:
                      - quotationSubject
                      - customerCode
                      - customerId
                      - quotationNo
                      - quotationStatus
                      - quotationDate
                      - recipientName
                      - recipientAddress
                      - headerTemplateId
                      - quotationDetails
                      - privateNote
                      - totalVat
                    x-apidog-orders:
                      - quotationSubject
                      - customerCode
                      - customerId
                      - quotationNo
                      - quotationStatus
                      - privateNote
                      - quotationDate
                      - recipientName
                      - recipientAddress
                      - headerTemplateId
                      - warehouseCode
                      - quotationDetails
                      - discountName
                      - discountValue
                      - discountType
                      - remark
                      - staffCode
                      - vatCalculation
                      - subTotal
                      - subTotalWithDiscount
                      - grandTotal
                      - attachments
                      - refOrderId
                      - quotationId
                      - quotationValidUntil
                      - referenceNo
                      - contactId
                      - contactName
                      - customerAddressId
                      - currencyCode
                      - paymentTerm
                      - salesPersonId
                      - totalVat
                required:
                  - status
                  - data
                x-apidog-orders:
                  - status
                  - data
              examples:
                '1':
                  summary: Success (200)
                  value:
                    status:
                      code: '1000'
                      description: Success
                    data:
                      quotationSubject: ใบเสนอราคาสินค้าตัวอย่าง
                      customerCode: C251200010
                      customerId: 965089
                      quotationNo: Q-.!20251200052
                      quotationStatus: 2
                      privateNote: หมายเหตุภายใน ไม่แสดงต่อลูกค้า
                      quotationDate: 2025-12-23T00:00:00+0700
                      recipientName: คุณสมชาย ใจดี
                      recipientAddress: >-
                        7/2-7 ถนนรามคำแหง แขวงสะพานสูง เขตสะพานสูง กรุงเทพมหานคร
                        10240
                      headerTemplateId: 3
                      warehouseCode: WHMAIN
                      quotationDetails:
                        - productCode: CAT001
                          productName: TRUST5031-GRANDMAID FINE HOUSE KEEPING CART
                          price: 5000
                          qty: 1
                          productDescription: รายละเอียดสินค้าตัวอย่าง
                          discountValue: 100
                          discountType: false
                          discountLevel: 2
                          totalPrice: 4900
                          productUnitName: ชิ้น
                          warehouseCode: WHMAIN
                          vatTaxId: -1
                          vatTaxValue: 0
                          whtTaxId: -1
                          whtTaxValue: 0
                          productId: 88054
                          unitId: 2795
                      discountName: Discount
                      discountValue: 0
                      discountType: false
                      remark: <p>หมายเหตุแสดงในเอกสาร</p>
                      staffCode: UAT564
                      vatCalculation: true
                      subTotal: 4900
                      subTotalWithDiscount: 4900
                      grandTotal: 4900
                      attachments:
                        - attachmentId: 1165079
                          refId: 254288
                          type: 40012
                          filename: document.pdf
                          extension: application/pdf
                          fileSize: 119798
                          isActive: true
                          createdByUserId: 23108b99-ee24-43c4-b9e7-58dc6a4e16a2
                          dateCreated: 2026-03-30T15:19:11+0700
                          resourceUrl: >-
                            https://storage-uat.veniocrm.com/app/Company/507/Quotation/1165079.pdf?sv=...
                          companyId: 507
                          data: ''
                          url: >-
                            Quotations/254288/Attachment/1165079?v=639104807513770000
                          urlResponseUpload: Attachments/ResponseUpload/1165079
                          thumbnail: >-
                            Quotations/254288/Attachment/1165079?v=639104807513770000&thumbnail=true
                          seq: 1
                          thumbnailUrl: >-
                            https://venio-uat.f4443c58dba6e31819b1894e745e2e69.r2.cloudflarestorage.com/pdf-thumbnail/abc123.png?X-Amz-Expires=604800
                          thumbnailStorageProvider: 4
                          thumbnailResourceUrl: pdf-thumbnail/abc123.png
                        - attachmentId: 1165080
                          refId: 254288
                          type: 40012
                          filename: Image.jpeg
                          extension: image/jpeg
                          fileSize: 79938
                          isActive: true
                          createdByUserId: 23108b99-ee24-43c4-b9e7-58dc6a4e16a2
                          dateCreated: 2026-03-30T15:19:11+0700
                          resourceUrl: >-
                            https://storage-uat.veniocrm.com/app/Company/507/Quotation/1165080.jpeg?sv=...
                          companyId: 507
                          data: ''
                          url: >-
                            Quotations/254288/Attachment/1165080?v=639104807513770000
                          urlResponseUpload: Attachments/ResponseUpload/1165080
                          thumbnail: >-
                            Quotations/254288/Attachment/1165080?v=639104807513770000&thumbnail=true
                          seq: 2
                          thumbnailUrl: null
                          thumbnailStorageProvider: null
                          thumbnailResourceUrl: null
                      refOrderId: '254288'
                      quotationId: null
                      quotationValidUntil: 2026-01-23T00:00:00+0700
                      referenceNo: REF-2025-001
                      contactId: 625181
                      contactName: ผู้จัดฝ่ายซื้อ
                      customerAddressId: null
                      currencyCode: THB
                      paymentTerm: ชำระภายใน 30 วัน
                      salesPersonId: 5ea32220-5516-47f7-929b-bf1c74e7f297
                      totalVat: 0
                '2':
                  summary: Not Found (404)
                  value:
                    status:
                      code: '1104'
                      description: SalesOrderNo doesn't exist
                '3':
                  summary: Unauthorized (401)
                  value:
                    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: Success
        '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
                required:
                  - statusCode
                  - message
                x-apidog-orders:
                  - statusCode
                  - message
          headers: {}
          x-apidog-name: Not Found
        '404':
          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: "คำบรรยายsubcode/bussiness\_code"
                    required:
                      - code
                      - description
                    x-apidog-orders:
                      - code
                      - description
                required:
                  - status
                x-apidog-orders:
                  - status
          headers: {}
          x-apidog-name: Unauthorized
      security:
        - bearer: []
          x-apidog:
            schemeGroups:
              - id: aTozKq3iHpvP77bjPmPyW
                schemeIds:
                  - bearer
            required: true
            use:
              id: aTozKq3iHpvP77bjPmPyW
            scopes:
              aTozKq3iHpvP77bjPmPyW:
                bearer: []
      x-apidog-folder: Venio/Quotation
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/351895/apis/api-12091512-run
components:
  schemas: {}
  securitySchemes:
    bearerAuth:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: ใส่ JWT Token ในรูปแบบ Bearer {token}
    bearer:
      type: bearer
      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: []

```
