SIGNALS Documentation
API Reference

Purchase Order Documents

Read-only read-only API projection of rendered purchase order documents with index, show, and PDF endpoints.

Purchase Order Documents API

A purchase order document is a read-only read-only API projection of a rendered PO document. When a purchase order document is generated through the Document Engine, its rendered parts are snapshotted into purchase_order_documents as a {header, body, footer, stylesheet} structure. The table is append-only — there is no create, update, or delete path through the API — and mirrors the industry-standard PO document schema exactly so integrations can read PO paperwork in a stable shape.

This surface complements the writable Purchase Orders API.

Endpoints

Method URL Description
GET /api/v1/purchase_order_documents List purchase order documents
GET /api/v1/purchase_order_documents/{purchase_order_document} Show a document snapshot
GET /api/v1/purchase_order_documents/{purchase_order_document}/pdf Render the snapshot as a PDF
GET /api/v1/purchase_order_documents/{purchase_order_document}.pdf PDF via filename suffix (alias)

Authentication

Requires a Sanctum bearer token with purchase_orders:read. Read access checks purchase_orders.view and the parent purchase order's view policy.

List documents

GET /api/v1/purchase_order_documents

Ransack filters cover purchase_order_id and timestamps.

Response shape

PurchaseOrderDocumentData returns the snapshot data object with header, body, footer, and stylesheet keys, alongside the parent purchase_order_id and optional document_id. Collection key: purchase_order_documents; singular: purchase_order_document. The PDF endpoints re-render the stored snapshot through the existing PDF driver.

Maintenance purchase orders

Maintenance parts procurement raises a maintenance-type purchase order linked to an equipment_test result or asset; receiving lands the parts cost on the asset (feeding TCO). See Purchase Orders and Asset Costs.

Webhooks

purchase_order_document.created — see Webhooks.