Skip to main content

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

HeaderValue
Content-Typeapplication/json
AuthorizationBearer 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

FieldTypeRequiredDescription
employee_idstringYesBizzAssure internal employee ID (returned from Create Employee)
start_datestringYesCoverage start date in YYYY-MM-DD format
end_datestringYesCoverage end date in YYYY-MM-DD format
policy_idstringNoBizzAssure 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

FieldTypeDescription
request_idstringUnique identifier for this grant request — use it to track status
messagestringHuman-readable result message
successbooleantrue 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"
}