curl --request GET \
--url "https://api.roe-ai.com/v1/policies/versions/VERSION_ID/?organization_id=YOUR_ORG_ID" \
--header "Authorization: Bearer YOUR_API_KEY"
{
"id": "456e7890-e89b-12d3-a456-426614174001",
"version_name": "version 2",
"content": {
"guidelines": {
"categories": [
{
"title": "Document Verification",
"description": "Rules for verifying document authenticity",
"rules": [
{
"title": "Check signatures",
"description": "Verify all required signatures are present",
"flag": "RED_FLAG",
"sub_rules": [
{
"title": "Authorized signatories",
"description": "Signatures must match authorized personnel list"
}
]
},
{
"title": "Verify dates",
"description": "All dates must be within valid ranges",
"flag": "GREEN_FLAG"
}
]
}
]
},
"instructions": "Review all documents for compliance with company policy. Flag any discrepancies.",
"dispositions": {
"classifications": [
{
"name": "Approved",
"description": "Document meets all requirements",
"prompt": "Select this when all compliance checks pass"
},
{
"name": "Rejected",
"description": "Document fails one or more requirements",
"prompt": "Select this when any critical rule is violated"
},
{
"name": "Needs Review",
"description": "Document requires manual review",
"prompt": "Select this for edge cases or unclear situations"
}
]
},
"summary_template": {
"template": "## Review Summary\n\n**Decision**: {{disposition}}\n\n**Findings**:\n{{#each findings}}\n- {{this}}\n{{/each}}"
}
},
"updated_at": "2024-01-20T15:45:00Z",
"policy": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Compliance Review Policy",
"description": "Policy for reviewing documents against compliance requirements",
"organization_id": "org-12345678-1234-1234-1234-123456789012",
"current_version_id": "456e7890-e89b-12d3-a456-426614174001",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T15:45:00Z"
}
}
{
"detail": "Policy has no current version set"
}
Policies
Retrieve Policy Version
Get a policy version by ID. Supports two lookup methods:
- Direct PolicyVersion ID lookup
- Policy ID lookup using the policy’s current_version_id
GET
/
policies
/
versions
/
{id}
/
curl --request GET \
--url "https://api.roe-ai.com/v1/policies/versions/VERSION_ID/?organization_id=YOUR_ORG_ID" \
--header "Authorization: Bearer YOUR_API_KEY"
{
"id": "456e7890-e89b-12d3-a456-426614174001",
"version_name": "version 2",
"content": {
"guidelines": {
"categories": [
{
"title": "Document Verification",
"description": "Rules for verifying document authenticity",
"rules": [
{
"title": "Check signatures",
"description": "Verify all required signatures are present",
"flag": "RED_FLAG",
"sub_rules": [
{
"title": "Authorized signatories",
"description": "Signatures must match authorized personnel list"
}
]
},
{
"title": "Verify dates",
"description": "All dates must be within valid ranges",
"flag": "GREEN_FLAG"
}
]
}
]
},
"instructions": "Review all documents for compliance with company policy. Flag any discrepancies.",
"dispositions": {
"classifications": [
{
"name": "Approved",
"description": "Document meets all requirements",
"prompt": "Select this when all compliance checks pass"
},
{
"name": "Rejected",
"description": "Document fails one or more requirements",
"prompt": "Select this when any critical rule is violated"
},
{
"name": "Needs Review",
"description": "Document requires manual review",
"prompt": "Select this for edge cases or unclear situations"
}
]
},
"summary_template": {
"template": "## Review Summary\n\n**Decision**: {{disposition}}\n\n**Findings**:\n{{#each findings}}\n- {{this}}\n{{/each}}"
}
},
"updated_at": "2024-01-20T15:45:00Z",
"policy": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Compliance Review Policy",
"description": "Policy for reviewing documents against compliance requirements",
"organization_id": "org-12345678-1234-1234-1234-123456789012",
"current_version_id": "456e7890-e89b-12d3-a456-426614174001",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T15:45:00Z"
}
}
{
"detail": "Policy has no current version set"
}
Retrieve a specific policy version with its full content.
This endpoint supports two lookup methods:
- Direct lookup: Provide a policy version ID to retrieve that specific version
- Policy lookup: Provide a policy ID to retrieve its current version
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | uuid | Yes | UUID of the policy version OR the policy (to get current version) |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | uuid | Yes | UUID of the organization for access control |
Response Fields
| Field | Type | Description |
|---|---|---|
id | uuid | Unique identifier for this version |
version_name | string | Human-readable version name |
content | object | The policy content (guidelines, instructions, dispositions, summary_template) |
updated_at | datetime | When this version was last updated |
policy | object | The parent policy object |
curl --request GET \
--url "https://api.roe-ai.com/v1/policies/versions/VERSION_ID/?organization_id=YOUR_ORG_ID" \
--header "Authorization: Bearer YOUR_API_KEY"
{
"id": "456e7890-e89b-12d3-a456-426614174001",
"version_name": "version 2",
"content": {
"guidelines": {
"categories": [
{
"title": "Document Verification",
"description": "Rules for verifying document authenticity",
"rules": [
{
"title": "Check signatures",
"description": "Verify all required signatures are present",
"flag": "RED_FLAG",
"sub_rules": [
{
"title": "Authorized signatories",
"description": "Signatures must match authorized personnel list"
}
]
},
{
"title": "Verify dates",
"description": "All dates must be within valid ranges",
"flag": "GREEN_FLAG"
}
]
}
]
},
"instructions": "Review all documents for compliance with company policy. Flag any discrepancies.",
"dispositions": {
"classifications": [
{
"name": "Approved",
"description": "Document meets all requirements",
"prompt": "Select this when all compliance checks pass"
},
{
"name": "Rejected",
"description": "Document fails one or more requirements",
"prompt": "Select this when any critical rule is violated"
},
{
"name": "Needs Review",
"description": "Document requires manual review",
"prompt": "Select this for edge cases or unclear situations"
}
]
},
"summary_template": {
"template": "## Review Summary\n\n**Decision**: {{disposition}}\n\n**Findings**:\n{{#each findings}}\n- {{this}}\n{{/each}}"
}
},
"updated_at": "2024-01-20T15:45:00Z",
"policy": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Compliance Review Policy",
"description": "Policy for reviewing documents against compliance requirements",
"organization_id": "org-12345678-1234-1234-1234-123456789012",
"current_version_id": "456e7890-e89b-12d3-a456-426614174001",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T15:45:00Z"
}
}
{
"detail": "Policy has no current version set"
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Organization ID. This is required for access control. It can be provided via query or request body depending on the endpoint.
Response
200 - application/json
Policy version serializer for public API.
Exposes auto-generated structure IDs (category/rule/sub-rule IDs) in responses so users can reference specific rules. IDs are immutable - any IDs provided in create/update requests are ignored and regenerated by the backend.
Maximum string length:
255Policy serializer
Show child attributes
Show child attributes
Minimal user serializer for audit metadata on policy versions.
Show child attributes
Show child attributes