# Get Sale Order Attachment By No

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v2/salesorder/{SaleOrderNo}/Attachments:
    get:
      summary: Get Sale Order Attachment By No
      deprecated: false
      description: ดึงข้อมูล รายการไฟล์แนบของ saleorder
      tags:
        - Venio/SalesOrder
      parameters:
        - name: SaleOrderNo
          in: path
          description: ''
          required: true
          schema:
            type: string
        - 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: <Your-Subscription-Key>
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: "<p>สถานะของ\_Business\_Code\_ถ้า<br>Success\_=\_1000<br>Error\_1\_ตัว\_=\_4001<br>Error\_มากกว่า\_1\_ตัว\_=\_4002\_\_\_\_<br>หรือเป็น\_Subcode\_ที่ต้องการจะแสดงเพื่อสื่อความหมายของ\_Error\_โดย\_subcode\_จะเป็นตัวเดียวกับ\_business\_error\_code\_หรือไม่ก็ได้\_เพื่อความสะดวกในการแสดงผล<p>"
                  httpStatusCode:
                    type: integer
                    description: "<p>สถานะ\_ code ของ httpเช่น<br>200 Ok<br>201 Created<br>400 BadRequest<br>401 Unauthorized<br>404 Record not found<br>500 Internal Server Error</p>"
                  data:
                    type: object
                    properties:
                      value:
                        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
                            isProcessed:
                              type: boolean
                              description: |-
                                ดำเนินการแล้วหรือยัง
                                true = ดำเนินการแล้ว
                                false = ยังไม่ดำเนินการ
                              nullable: true
                            url:
                              type: string
                              description: url (Deprecated)
                            urlResponseUpload:
                              type: string
                              description: urlResponseUpload
                            thumbnail:
                              type: string
                              description: thumbnail
                          x-apidog-orders:
                            - attachmentId
                            - refId
                            - type
                            - filename
                            - extension
                            - fileSize
                            - isActive
                            - createdByUserId
                            - dateCreated
                            - resourceUrl
                            - companyId
                            - isProcessed
                            - url
                            - urlResponseUpload
                            - thumbnail
                          required:
                            - attachmentId
                            - refId
                            - type
                            - filename
                            - extension
                            - fileSize
                            - isActive
                            - dateCreated
                            - url
                            - urlResponseUpload
                            - thumbnail
                        description: รายการรายละเอียดไฟล์แนบ
                        nullable: true
                      statusCode:
                        type: integer
                        description: >-
                          <p>สถานะ statusCode ของ httpเช่น<br>200 Ok<br>201
                          Created<br>400 BadRequest<br>401 Unauthorized<br>404
                          Record not found<br>500 Internal Server Error</p>
                    x-apidog-orders:
                      - value
                      - statusCode
                    required:
                      - value
                      - statusCode
                x-apidog-orders:
                  - statusCode
                  - httpStatusCode
                  - data
                required:
                  - statusCode
                  - httpStatusCode
                  - data
              examples:
                '1':
                  summary: OK (200)
                  value:
                    data:
                      value:
                        - attachmentId: 1
                          refId: 1
                          type: 1
                          filename: string
                          extension: string
                          fileSize: 1
                          isActive: true
                          dateCreated: 2022-06-27T13:21:14+0700
                          resourceUrl: string
                          url: string
                          urlResponseUpload: string
                          thumbnail: string
                      statusCode: 200
                    statusCode: 1000
                    httpStatusCode: 200
                '2':
                  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.
                '3':
                  summary: Forbidden (403)
                  value:
                    data:
                      authenticationSchemes: []
                    hasError: true
                    errorMessage: Invalid access rights
                    statusCode: 9503
                    httpStatusCode: 403
                '4':
                  summary: Bad Request (400)
                  value:
                    data:
                      value: SaleOrder id "23" doesn't exist.
                      statusCode: 400
                    hasError: true
                    errorMessage: Invalid parameters entered
                    statusCode: 1102
                    httpStatusCode: 400
          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
          headers: {}
          x-apidog-name: Unauthorized
        '403':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: "<p>สถานะของ\_Business\_Code\_ถ้า<br>Success\_=\_1000<br>Error\_1\_ตัว\_=\_4001<br>Error\_มากกว่า\_1\_ตัว\_=\_4002\_\_\_\_<br>หรือเป็น\_Subcode\_ที่ต้องการจะแสดงเพื่อสื่อความหมายของ\_Error\_โดย\_subcode\_จะเป็นตัวเดียวกับ\_business\_error\_code\_หรือไม่ก็ได้\_เพื่อความสะดวกในการแสดงผล<p>"
                  httpStatusCode:
                    type: integer
                    description: |-
                      สถานะ  code ของ httpเช่น
                      200 Ok
                      201 Created
                      400 BadRequest
                      401 Unauthorized
                      404 Record not found
                      500 Internal Server Error
                  errorMessage:
                    type: string
                    description: คำอธิบายเกี่ยวกับ error
                  hasError:
                    type: boolean
                    description: |-
                      มี error ไหม
                      true = มี
                      false = ไม่มี
                  data:
                    type: object
                    properties:
                      authenticationSchemes:
                        type: array
                        items:
                          type: string
                        description: ค่า Enum ของ authenticationSchemes
                    x-apidog-orders:
                      - authenticationSchemes
                    required:
                      - authenticationSchemes
                    description: |-
                      ข้อมูลที่จะแสดง ไม่จำกัดรูปแบบว่าจะเป็นเช่นไร 
                      ตอนเรียกออกมาสามารเป็น Array และ Object ได้
                x-apidog-orders:
                  - statusCode
                  - httpStatusCode
                  - errorMessage
                  - hasError
                  - data
                description: ' กรณีที่คนที่ดูไม่มี permission view data '
                required:
                  - statusCode
                  - httpStatusCode
                  - errorMessage
                  - hasError
                  - data
          headers: {}
          x-apidog-name: Forbidden
        'x-200:Bad Request ':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: "<p>สถานะของ\_Business\_Code\_ถ้า<br>Success\_=\_1000<br>Error\_1\_ตัว\_=\_4001<br>Error\_มากกว่า\_1\_ตัว\_=\_4002\_\_\_\_<br>หรือเป็น\_Subcode\_ที่ต้องการจะแสดงเพื่อสื่อความหมายของ\_Error\_โดย\_subcode\_จะเป็นตัวเดียวกับ\_business\_error\_code\_หรือไม่ก็ได้\_เพื่อความสะดวกในการแสดงผล<p>"
                  httpStatusCode:
                    type: integer
                    description: |-
                      สถานะ  code ของ httpเช่น
                      200 Ok
                      201 Created
                      400 BadRequest
                      401 Unauthorized
                      404 Record not found
                      500 Internal Server Error
                  errorMessage:
                    type: string
                    description: คำอธิบายเกี่ยวกับ error
                  hasError:
                    type: boolean
                    description: |-
                      มี error ไหม
                      true = มี
                      false = ไม่มี
                  data:
                    type: object
                    properties:
                      value:
                        type: string
                        description: valueที่พบerror
                      statusCode:
                        type: integer
                        description: |-
                          สถานะ  code ของ httpเช่น
                          200 Ok
                          201 Created
                          400 BadRequest
                          401 Unauthorized
                          404 Record not found
                          500 Internal Server Error
                    x-apidog-orders:
                      - value
                      - statusCode
                    description: 'รายละเอียดรายการที่เกิดerror '
                    required:
                      - value
                      - statusCode
                x-apidog-orders:
                  - statusCode
                  - httpStatusCode
                  - errorMessage
                  - hasError
                  - data
                description: ' กรณีที่คนที่request bodyมีข้อผิดพลาด'
                required:
                  - statusCode
                  - httpStatusCode
                  - errorMessage
                  - hasError
                  - data
          headers: {}
          x-apidog-name: 'Bad Request '
      security:
        - bearer: []
      x-apidog-folder: Venio/SalesOrder
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/351895/apis/api-23674485-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: []

```
