Approve an exact cart, sign an Intent Certificate and reserve budget
Approve an exact cart, sign an Intent Certificate and reserve budget. Requires the OWNER role. Idempotent: send an Idempotency-Key.
Session cookie set by sign-in on HTTPS deployments (the hosted demo).
In: cookie
Path Parameters
Resource id (UUID).
uuidHeader Parameters
CSRF guard: must be quartermaster on every mutation.
A unique key per user action; retries with the same key return the first result.
8 <= length <= 128Request Body
application/json
The owner's approval of one exact proposal, bound to the cart hash they saw.
The owner's approval of one exact proposal, bound to the cart hash they saw.
Id of the related purchase order.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$uuidSHA-256 of the canonical cart, bound into the Intent Certificate.
^sha256:[a-f0-9]{64}$items <= 32[]Optional note.
length <= 500Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/procurement/requests/0f8fad5b-d9cb-469f-a165-70867728950e/approve" \ -H "X-Requested-With: quartermaster" \ -H "Idempotency-Key: 3b8c2c1e-6f6d-4a59-9a43-8f0c2a9e1d22" \ -H "Content-Type: application/json" \ -d '{ "purchase_order_id": "0f8fad5b-d9cb-469f-a165-70867728950e", "cart_hash": "sha256:9f9f9f9f9f9f9f9f9f9f9f9f9f9f9f9f9f9f9f9f9f9f9f9f9f9f9f9f9f9f9f9f", "acknowledged_review_codes": [ "MARKET_REFERENCE_UNAVAILABLE" ] }'{ "purchase_order": { "id": "string", "number": "string", "request_id": "string", "supplier_id": "string", "supplier_name": "string", "status": "PROPOSED", "currency": "string", "subtotal_minor": 0, "shipping_minor": 0, "tax_minor": 0, "fees_minor": 0, "total_minor": 0, "cart_hash": "string", "items": [ { "id": "string", "kind": "PRODUCT", "sku": "string", "description": "string", "category": "food_packaging", "quantity": 0, "unit_price_minor": 0, "line_total_minor": 0, "inventory_item_id": "string", "pack_quantity": 0 } ], "policy_decision": { "id": "string", "purchase_order_id": "string", "decision": "ALLOW", "violations": [ { "code": "MANDATE_INACTIVE", "severity": "BLOCK", "message": "string", "evidence": {} } ], "checks": [ { "code": "string", "passed": true, "detail": "string" } ], "human_approval_required": true, "mandate_version": 0, "policy_version": "string", "input_digest": "string", "evaluated_at": "string" }, "certificate": { "id": "string", "status": "ACTIVE", "payload": { "certificate_version": 1, "intent_id": "string", "organization_id": "string", "buyer_id": "string", "purchase_order_id": "string", "supplier_id": "string", "cart_hash": "string", "mandate_id": "string", "mandate_version": 0, "policy_decision_id": "string", "currency": "string", "approved_amount_minor": 0, "approved_at": "string", "expires_at": "string", "nonce": "string", "key_id": "string" }, "key_id": "string", "signature": "string", "algorithm": "Ed25519", "issued_at": "string", "expires_at": "string" }, "payment": { "id": "string", "intent_id": "string", "purchase_order_id": "string", "status": "CREATED", "paypal_order_id": "string", "paypal_capture_id": "string", "amount_minor": 0, "currency": "string", "captured_amount_minor": 0, "refunded_amount_minor": 0, "failure_code": "string", "failure_message": "string", "created_at": "string", "updated_at": "string", "completed_at": "string" }, "delivery": { "id": "string", "purchase_order_id": "string", "supplier_id": "string", "status": "SCHEDULED", "expected_date": "string", "original_expected_date": "string", "delivered_at": "string", "delay_reason": "string", "data_source": "SYNTHETIC" }, "created_at": "string" }, "certificate": { "id": "string", "status": "ACTIVE", "payload": { "certificate_version": 1, "intent_id": "string", "organization_id": "string", "buyer_id": "string", "purchase_order_id": "string", "supplier_id": "string", "cart_hash": "string", "mandate_id": "string", "mandate_version": 0, "policy_decision_id": "string", "currency": "string", "approved_amount_minor": 0, "approved_at": "string", "expires_at": "string", "nonce": "string", "key_id": "string" }, "key_id": "string", "signature": "string", "algorithm": "Ed25519", "issued_at": "string", "expires_at": "string" }}