Skip to main content
PATCH
Update the purchasing policy draft
Key: Write Scope: Company

Authorizations

Authorization
string
header
required

Use your Primo API key in the Authorization header as Bearer <API_KEY>.

Body

application/json
content
string
required

The COMPLETE new purchasing policy text. This fully replaces the draft — it is not appended.

publish
boolean

Set to true to publish the policy in the same call: the draft is written and immediately copied to the published text the agent reads at runtime. Use it when the user has already confirmed the change — a unitary request such as "raise the approval threshold to €1,000" is that confirmation — so one edit costs one approval instead of two. Leave it out for an open-ended rewrite the user has not seen yet: the draft is saved and stays offline until publishPurchasingPolicy.

Response

default - application/json
id
string
required
status
enum<string>
required

Publication state. "unpublished": never published (or hidden). "pending-changes": the draft has edits not yet published. "published": the draft matches the published text.

Available options:
unpublished,
pending-changes,
published
draft
object
required

The editable draft. This is the text updatePurchasingPolicy writes.

published
object | null
required

The published text the AI agent sees at runtime, or null if never published. Diff it against the draft to surface pending edits.