Commerce

Inspect the selected Commerce Gate policy configuration

GET
/v1/protocol/policies/commerce/readiness

Source candidate requiring the matching backend. Requires VIEWER access and policy:read, policy:* or org:* scope for the requested organization. Unknown or duplicate query fields are rejected. Reports configuration only; HTTP 200 does not approve an action, activate policy or prove connector or release readiness. Responses are private and must not be cached.

Authorization

ApiKeyAuth
AuthorizationBearer <token>

An organization API key. Its scopes decide what it may call; decision:shadow is the narrowest: SHADOW evaluations through POST /v1/authority/grants or its alias POST /v1/authority/enforce-and-bind only (DECISION_SHADOW_MODE_DENIED in any other mode; DECISION_SHADOW_FIELD_DENIED for a body carrying context.decionis_policy, evidence or escalation), with no integration dispatch. A key whose only scope is decision:shadow (an AgentSafe hosted gateway's) reaches exactly those two, POST /v1/auth/credential-context, POST /v1/hosted-gateway/keys/confirm and POST /v1/hosted-gateway/keys/revoke-self; every other route answers 403 HOSTED_GATEWAY_KEY_PATH_DENIED. decision:enforce is an enforced hosted gateway's key: evaluations in SHADOW or ENFORCEMENT through POST /v1/authority/grants or its alias (400 DECISION_ENFORCE_FIELD_DENIED for a body carrying context.decionis_policy; it never holds policy:write), and the grants and managed escalations they bind. A key whose scopes are decision:enforce (with or without decision:shadow) reaches exactly POST /v1/authority/enforce-and-bind, POST /v1/authority/grants, GET /v1/authority/grants/{grant_id}, POST /v1/authority/grants/{grant_id}/claims, POST /v1/authority/grants/{grant_id}/receipts, POST /v1/authority/grants/{grant_id}/reconciliations, POST /v1/execution/verify-token, POST /v1/execution/claim-token, POST /v1/execution/consume-token, POST /v1/execution/finalize-token, GET /v1/authority/escalations/{escalation_id}, DELETE /v1/authority/escalations/{escalation_id}, POST /v1/auth/credential-context, POST /v1/hosted-gateway/keys/confirm and POST /v1/hosted-gateway/keys/revoke-self, each id a UUID; every other route answers 403 HOSTED_GATEWAY_KEY_PATH_DENIED.

In: header

Query Parameters

org_id*string
Formatuuid
policy_version?string

Trimmed, nonempty policy version. When omitted, select the newest active bundle.

Length1 <= length <= 100

Response Body

application/json

curl -X GET "https://example.com/v1/protocol/policies/commerce/readiness?org_id=497f6eca-6276-4993-bfeb-53cbbbba6f08"
{  "version": "commerce-preflight-readiness-v1",  "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",  "checked_at": "2019-08-24T14:15:22Z",  "preflight_version": "commerce-preflight-v2",  "evaluator_version": "policy-graph/1.1+commerce-preflight/2.0",  "policy_resolution": {    "requested_policy_version": "string",    "resolved_policy_version": "string",    "status": "exact_match"  },  "selected_policy": {    "bundle_id": "fc6f5a67-caa1-4339-9c14-a67826143b60",    "version": "string",    "effective_from": "2019-08-24T14:15:22Z",    "effective_to": "2019-08-24T14:15:22Z",    "rules_sha256": "string",    "parameters_sha256": "string",    "commerce_preflight_digest": "string"  },  "configuration": {    "version": "commerce-preflight-v2",    "max_fact_age_seconds": 1,    "allowed_sources": [      "string"    ],    "checks": {      "P01": {        "enabled": false      },      "P02": {        "enabled": false      },      "P03": {        "enabled": false      },      "P04": {        "enabled": false      },      "P05": {        "enabled": false      },      "P06": {        "enabled": false      },      "P07": {        "enabled": false      },      "P08": {        "enabled": false      },      "P09": {        "enabled": false      },      "P10": {        "enabled": false      },      "P11": {        "enabled": false      },      "P12": {        "enabled": false      },      "P13": {        "enabled": false      },      "P14": {        "enabled": false      },      "P15": {        "enabled": false      },      "P16": {        "enabled": false      }    }  },  "checks": [    {      "id": "P01",      "status": "enabled"    },    {      "id": "P01",      "status": "enabled"    },    {      "id": "P01",      "status": "enabled"    },    {      "id": "P01",      "status": "enabled"    },    {      "id": "P01",      "status": "enabled"    },    {      "id": "P01",      "status": "enabled"    },    {      "id": "P01",      "status": "enabled"    },    {      "id": "P01",      "status": "enabled"    },    {      "id": "P01",      "status": "enabled"    },    {      "id": "P01",      "status": "enabled"    },    {      "id": "P01",      "status": "enabled"    },    {      "id": "P01",      "status": "enabled"    },    {      "id": "P01",      "status": "enabled"    },    {      "id": "P01",      "status": "enabled"    },    {      "id": "P01",      "status": "enabled"    },    {      "id": "P01",      "status": "enabled"    }  ],  "counts": {    "enabled": 0,    "disabled": 0,    "missing": 0,    "unsupported": 0,    "unavailable": 0  },  "configuration_complete": true,  "all_disabled": true,  "diagnostics": [    {      "code": "MISSING_ORG_POLICY_BUNDLE",      "path": "string"    }  ]}