---
title: "Generate Packing Slip"
method: POST
path: "/api/v1/admin/projects/{project_id}/packing-slip"
tags: ["admin-packing-slips"]
---

# Generate Packing Slip

`POST /api/v1/admin/projects/{project_id}/packing-slip`

Generate (or regenerate) the packing slip for an order.

Idempotent — if a packing slip already exists for the project, this
updates the admin-input override fields and re-renders the PDF
(preserving the original ``PS-{YYYY}-{NNNNN}`` number).

Returns 202 immediately; the Temporal workflow handles the actual
PDF render + R2 upload in the background. Frontend re-fetches the
parent admin-payment detail query to see the populated PDF URL.

Requires ``payments:edit`` permission.

## Path parameters

- `project_id` string, uuid, required

## Request body

- PackingSlipCreate — Body for ``POST /admin/projects/{id}/packing-slip``. All fields are optional. The endpoint is idempotent — calling it a second time updates the override values on the existing row and re-renders the PDF (preserving ``packing_slip_number``). Carrier + tracking are intentionally NOT included here — they live on the ``Shipment`` row and are surfaced via the existing "Create / Edit Shipment" admin flow. The packing slip PDF reads them at render time when a Shipment exists.
  - `total_weight` union
    - number
    - string
  - `total_weight_unit` 'kg' | 'lbs', nullable
  - `package_count` integer, nullable
  - `ship_date_override` string, date, nullable
  - `notes` string, nullable

## Response `202`

Successful Response

- PackingSlipGenerateResponse — 202 Accepted response from ``POST .../packing-slip``. The actual PDF render runs asynchronously in the Temporal worker. Frontend re-fetches the parent detail query to surface the new ``packing_slip_pdf_url``.
  - `packing_slip_id` string, uuid, required
  - `packing_slip_number` string, required
  - `status` string, required

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