---
title: "Attachment purchase order document."
method: POST
path: "/purchases-orders/{id}/attachment"
tags: ["Purchase Order"]
---

# Attachment purchase order document.

`POST /purchases-orders/{id}/attachment`

## Request

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

แนบไฟล์ รูปภาพ หรือ เอกสารที่เกี่ยวข้อง ในเอกสารใบสั่งซื้อตามเลขที่เอกสารที่ต้องการ

## Path parameters

- `id` string, required

## Headers

- `Authorization` string, required

## Request body `multipart/form-data`

- object
  - `file` string, binary: รูปแบบ file ที่ใช้แนบในเอกสารเป็นแบบ Binary

## Response `200`

200 response

- AttachmentResponse
  - `status` boolean: action success
  - `message` string: error message
  - `code` integer: error code
  - `data` object[]: ข้อมูลไฟล์แนบเอกสาร
    - `attachmentId` integer: เลข Id ไฟล์แนบเอกสาร
    - `createdOn` string, date: วันที่แนบไฟล์เอกสาร รูปแบบ yyyy-MM-dd <br> <ex>Example: 2021-01-01</ex>
    - `attachmentName` string: ชื่อไฟล์แนบเอกสาร
    - `orderNumber` integer: ลำดับไฟล์แนบเอกสาร
    - `isDisplay` boolean: สถานะการแสดงไฟล์แนบเอกสาร
    - `attachmentPath` string: path ที่อยู่ไฟล์แนบเอกสาร

## Other responses

- `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)
