Case Raffle
Raffling is the process of randomly assigning a case record to one of the available court branches within its court station. Every endpoint on this page requires the Case Raffle permission.
The case raffle model
- Name
id- Type
- string
- Description
Unique UUID identifier for the raffle record.
- Name
case_id- Type
- string
- Description
The case record being raffled.
- Name
branch_id- Type
- string
- Description
The court branch this raffle entry refers to.
- Name
user_id- Type
- string
- Description
The user who initiated the raffle.
- Name
purpose- Type
- string | null
- Description
Free-text purpose/notes for the raffle.
- Name
status- Type
- string
- Description
One of
pending,inhibit,received.
- Name
created_at- Type
- timestamp
- Description
Timestamp when the raffle record was created, formatted as
Y-m-d H:i a.
List raffle records
Retrieve a paginated list of raffle records, 50 per page.
Optional attributes
- Name
status- Type
- string
- Description
Filter to an exact
statusmatch (pending,inhibit, orreceived).
Request
curl -G https://your-domain.com/api/backoffice/case-raffles \
-H "Accept: application/json" \
-H "X-XSRF-TOKEN: {token}" \
--cookie "cms_admin_session={session}" \
--data-urlencode "status=pending"
Response
{
"data": [
{
"id": "7b6c5d4e-3f2a-1908-7b6c-5d4e3f2a1908",
"author": {"id": "1a2b3c4d-...", "full_name": "Maria Santos"},
"case": {"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "case_number": "2026-CIV-000045"},
"branch": null,
"purpose": "Initial raffle",
"status": "pending",
"created_at": "2026-02-20 10:30 am"
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 50,
"total": 1
}
}
Enter a case into the raffle pool
Create a raffle entry for a case record against a specific branch.
Required attributes
- Name
case_id- Type
- string
- Description
The UUID of an existing case record.
- Name
branch_id- Type
- string
- Description
The UUID of an existing court branch.
Optional attributes
- Name
purpose- Type
- string
- Description
Free-text purpose/notes.
- Name
status- Type
- string
- Description
Defaults to
pendingif omitted.
Request
curl -X POST https://your-domain.com/api/backoffice/case-raffles \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "X-XSRF-TOKEN: {token}" \
--cookie "cms_admin_session={session}" \
-d '{"case_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "branch_id": "9c8d7e6f-5a4b-3210-9c8d-7e6f5a4b3210"}'
Response
{
"data": {
"id": "7b6c5d4e-3f2a-1908-7b6c-5d4e3f2a1908",
"case_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"branch_id": "9c8d7e6f-5a4b-3210-9c8d-7e6f5a4b3210",
"status": "pending",
"created_at": "2026-02-20 10:30 am"
}
}
Retrieve a pending raffle by case
Retrieve the pending raffle entry for a given case. Note: despite the route parameter name, this is looked up by case_id, not the raffle record's own id, and only matches entries with status = pending.
Path parameters
- Name
caseId- Type
- string
- Description
The UUID of the case record.
Request
curl https://your-domain.com/api/backoffice/case-raffles/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
-H "Accept: application/json" \
-H "X-XSRF-TOKEN: {token}" \
--cookie "cms_admin_session={session}"
Response
{
"data": {
"id": "7b6c5d4e-3f2a-1908-7b6c-5d4e3f2a1908",
"case_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "pending"
}
}
Raffle a case
Randomly assign a case to an eligible court branch within its court station. Branches that already have an inhibit-status raffle entry for the case are excluded, and — for cases with has_jdr set — the current branch is excluded so JDR is handled elsewhere. On success, the case record's branch_id (or jdr_id, if this is a JDR raffle) is set to the winning branch.
Required attributes
- Name
case_id- Type
- string
- Description
The UUID of the case record to raffle.
Request
curl -X POST https://your-domain.com/api/backoffice/raffle \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "X-XSRF-TOKEN: {token}" \
--cookie "cms_admin_session={session}" \
-d '{"case_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"}'
Response
{
"data": {
"case_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"branch_id": "9c8d7e6f-5a4b-3210-9c8d-7e6f5a4b3210",
"branch_name": "Branch 12"
}
}
Error - No Eligible Branch (422)
{
"message": "No available branch to raffle this case to."
}