---
title: "Upload Po Document"
method: POST
path: "/api/v1/payments/po-document"
tags: ["payments"]
---

# Upload Po Document

`POST /api/v1/payments/po-document`

Stream a PO document to R2 server-side (firewall-safe upload proxy).

Replaces the browser's direct PUT to ``*.r2.cloudflarestorage.com``.
The client POSTs the file as ``multipart/form-data`` with the
``project_id`` as a query parameter; the API streams it straight to
R2 and returns the ``r2_key``. The client passes that key back as
``po_document_r2_key`` on the subsequent ``POST /payments/purchase-order``
call.

Authorization: the project must be owned by the current user and have
the same approved, human-reviewed quote required for PO submission.
The file is written to a key namespaced under the user's id — the
client cannot choose an arbitrary key.

## Query parameters

- `project_id` string, uuid, required

## Response `200`

Successful Response

- POUploadResponse — Response from the PO-document upload proxy endpoint. Carries the R2 key the streamed file was written to. The client passes it back as ``po_document_r2_key`` on the subsequent ``POST /payments/purchase-order`` call.
  - `r2_key` string, required
  - `document_id` string, uuid, nullable
  - `extraction_status` string
  - `latest_extraction_id` string, uuid, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/prototyping/apis/prototyping-io-api.md) · [All operations](https://skmtc.dev/prototyping/apis/prototyping-io-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/prototyping/prototyping-io-api/revisions/f4a0079fbb57/schema)
