Upload transaction, event or audit records to a policy
The owner's door into the central policy intake. Account session of the policy's POLICY_OWNER or SOURCE_CUSTODIAN; same-site JSON and an Idempotency-Key are required. The records are assessed and signed exactly as on /v1/assessments/{assessmentId}/records, and the upload is recorded on the policy's access chain. The findings stay with this policy, and its authors (the desk on a MANAGED policy) receive the findings case. Uploading changes no revision, so the uploader never becomes an author. A policy_id in the body must name this policy.
Authorization
AccountSessionCookie The signed HttpOnly account session the web app holds after sign-in (also accepted as a Bearer acct_ token).
In: cookie
Path Parameters
uuidHeader Parameters
Request Body
application/json
decionis.assessments.records/1. Records inline or one JSON Lines file, never both. A commerce record is a commerce-preflight-v2 action with its facts as they stood, its time and its transaction-time money; identifiers in the action should be opaque digests.
uuidValue in
- "commerce"
- "cards"
- "agents"
Value in
- "transaction"
- "event"
- "audit"
^[a-z0-9][a-z0-9-]{0,99}$date-timeThe policy the findings are for; its desk receives them. Without it they go to the workspace's commerce draft (a policy created MANAGED first, then a MANAGED one). Must name a commerce policy in the organization.
uuid0 <= value1 <= items <= 5000Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/policies/497f6eca-6276-4993-bfeb-53cbbbba6f08/records" \ -H "Content-Type: application/json" \ -d '{ "version": "decionis.assessments.records/1", "assessment_id": "9f60a03f-b3de-4b19-9361-0380d9aa1e9e", "domain": "commerce", "kind": "transaction", "platform": "string", "producer": { "product": "agentsafe", "surface": "cli", "version": "string" }, "as_of": "2019-08-24T14:15:22Z", "window": { "from": "2019-08-24T14:15:22Z", "to": "2019-08-24T14:15:22Z" }, "total": 0, "truncated": true }'{ "version": "decionis.assessments.records/1", "assessment_id": "9f60a03f-b3de-4b19-9361-0380d9aa1e9e", "domain": "commerce", "policy_id": "ee9b03e0-6495-427a-85a5-34444d24ae04", "received": 0, "assessed": 0, "findings": { "artifact": { "assessment_id": "9f60a03f-b3de-4b19-9361-0380d9aa1e9e", "platform": "string", "evaluator": { "platform": "string", "methodology": "string" }, "source": { "kind": "connected_history", "connection_id": "d3547de1-d1f2-4344-b4c2-17169b7526f9", "company_id": "string", "revision": "string", "as_of": "2019-08-24T14:15:22Z", "window": { "from": "2019-08-24T14:15:22Z", "to": "2019-08-24T14:15:22Z" } }, "status": "complete", "coverage": { "assessed": 0, "total": 0, "limit": 0, "truncated": true, "complete": true, "reasons": [ "string" ], "gaps": [ { "code": "string", "finding_types": [ "string" ] } ] }, "findings": [ { "finding_id": "string", "type": "string", "check_id": "P01", "record_digest": "string", "occurred_at": "2019-08-24T14:15:22Z", "amount": { "currency": "string", "scale": 0, "amount_minor": 0 }, "measurements": { "property1": 0, "property2": 0 }, "basis": "source_record" } ], "records": [ { "record_digest": "string", "occurred_at": "2019-08-24T14:15:22Z", "amount": { "currency": "string", "scale": 0, "amount_minor": 0 }, "replay": { "action": { "actor": { "type": "HUMAN", "id": "string" }, "platform": "string", "idempotency_key": "string", "action_type": "PRICE_CHANGE", "payload": { "sku": "string", "from_price": 0, "to_price": 0, "estimated_cost": 0, "currency": "string" } }, "facts": { "observed_at": "2019-08-24T14:15:22Z", "source": "string", "currency": "string", "pricing": { "gross_amount": 0, "discount_amount": 0, "estimated_cost": 0 }, "cost_basis": { "source_cost": 0, "system_of_record_cost": 0 }, "inventory": { "source_on_hand": 0, "system_on_hand": 0, "reserved_quantity": 0, "requested_quantity": 0 }, "region": { "country": "string" }, "discounts": { "count": 0, "sources": [ "string" ] }, "contract": { "account_type": "retail", "offered_price": 0, "contract_price": 0 }, "promotion": { "discount_codes": [ "string" ], "prior_redemptions": 0, "account_age_days": 0, "identity_hash": "string" }, "refund": { "remaining_refundable": 0, "prior_refund_count": 0 }, "lifecycle": { "current_state": "created", "delivered_at": "2019-08-24T14:15:22Z", "return_eligible": true }, "payment": { "prior_payment_count": 0, "approver_authority_limit": 0 }, "beneficiary": { "changed_at": "2019-08-24T14:15:22Z", "verification": "verified" }, "treasury": { "cash_position": 0, "run_total": 0, "cost_of_funds_percent": 0 } } } } ], "version": "decionis.assessments.findings/1", "findings_id": "49cc7d7a-341d-4557-bfde-ce7a8ead8d58", "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b", "submitted_at": "2019-08-24T14:15:22Z", "submission_sha256": "string", "totals": [ { "type": "string", "check_id": "P01", "currency": "string", "scale": 0, "amount_minor": 0, "count": 0 } ] }, "artifact_sha256": "string", "canonicalization": "RFC8785/JCS", "verification": "signed", "signature": { "algorithm": "Ed25519", "keyId": "string", "value": "string" }, "public_jwks_path": "/.well-known/decision-dossier-jwks.json" }}
