---
title: "Attach file to purchase order V3"
method: POST
path: "/api/v3/purchaseOrders/{id}/files"
tags: ["PurchaseOrder"]
---

# Attach file to purchase order V3

`POST /api/v3/purchaseOrders/{id}/files`

This endpoint requires the following scopes: `purchaseOrder:update`.

Attach a file to a purchase order.

## Path parameters

- `id` string, required

## Request body

- object
  - `title` string — Title of the file
  - `description` string — Description of the file
  - `keyword` 'otherFile' | 'coverPage' | 'attachment' | 'eInvoice' | 'receipt' | 'paymentReceipt', required — Document keyword/type
  - `fileName` string, required — Name of the file
  - `fileContent` string, required — Base64 encoded file content

## Response `201`

Attach a file to a purchase order.

- object
  - `data` object — File attached to a business object
    - `id` integer — File ID

## Other responses

- `400` — Failed validation
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `429` — Too Many Requests

---

[API](https://skmtc.net/xentral/apis/xentral-api.md) · [All operations](https://skmtc.net/xentral/apis/xentral-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/xentral/xentral-api/versions/8a27ba392442/schema)
