Grant Policy
Enrol an employee into a policy for a specified coverage period. If policy_id is omitted, the employee is enrolled into all active policies associated with your organisation.
Asynchronous operation
Policy grant is processed asynchronously. The response returns a request_id you can use to track the status of the operation.
Endpoint
POST /v1/policy/grant
Request
Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer YOUR_ACCESS_TOKEN |
Body
{
"employee_id": "ba_emp_01jwz3k...",
"start_date": "2024-07-01",
"end_date": "2024-12-31",
"policy_id": "ba_pol_01k..."
}
Fields
| Field | Type | Required | Description |
|---|---|---|---|
| employee_id | string | Yes | BizzAssure internal employee ID (returned from Create Employee) |
| start_date | string | Yes | Coverage start date in YYYY-MM-DD format |
| end_date | string | Yes | Coverage end date in YYYY-MM-DD format |
| policy_id | string | No | BizzAssure internal policy ID (from List Policies). Omit to use routing logic to assign a policy |
Response
Success (200 OK)
{
"payload": {
"request_id": "ba_req_01k...",
"message": "Policy grant request submitted successfully",
"success": true
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique identifier for this grant request — use it to track status |
| message | string | Human-readable result message |
| success | boolean | true if the grant request was accepted for processing |
Error Responses
Employee Not Found (404)
{
"type": "NOT_FOUND",
"title": "Employee Not Found",
"detail": "No employee found with the given employee_id",
"instance": "/v1/policy/grant"
}
Policy Not Found (404)
{
"type": "NOT_FOUND",
"title": "Policy Not Found",
"detail": "No active policy found with the given policy_id",
"instance": "/v1/policy/grant"
}
Validation Error (400 Bad Request)
{
"type": "VALIDATION_ERROR",
"title": "Validation Failed",
"detail": "start_date must be before end_date",
"instance": "/v1/policy/grant"
}
Unauthorized (401)
{
"type": "UNAUTHORIZED",
"title": "Unauthorized",
"detail": "Missing or invalid access token",
"instance": "/v1/policy/grant"
}