Cases
Create and read cases, their parties and actions, and upload documents with multipart/form-data.
The cases module (expedientes) organizes work by matter (law firms, court representatives, accountants, experts…). The organization must have the module; otherwise the API answers 403 module_not_available.
Scopes: cases:read / cases:write. Every path hangs from /expedientes/.
Cases
/api/v1/expedientes/cases/cases:write{
"reference": "EXP-2026-031",
"title": "Debt claim · Talleres Martín",
"customer": 318,
"case_type": 2,
"priority": "high",
"open_date": "2026-11-01",
"description": "Three unpaid 2026 invoices.",
"court_case_number": "",
"tags": [4]
}| Field | Description |
|---|---|
reference | Reference, unique in the organization. |
title | Case title. |
customer | Customer it belongs to. |
status | open, in_progress, suspended, closed, archived. |
priority | low, medium, high, urgent. |
case_type, court, jurisdiction, tags | Catalogs at /expedientes/case-types/, /courts/, /jurisdictions/, /tags/. |
| Operation | Endpoint |
|---|---|
| List / search | GET /expedientes/cases/?search=martín&status=open |
| Read | GET /expedientes/cases/{id}/ |
| Update | PATCH /expedientes/cases/{id}/ |
| Close / reopen | POST /expedientes/cases/{id}/close/ · POST /expedientes/cases/{id}/reopen/ |
| Timeline | GET /expedientes/cases/{id}/timeline/ |
Parties and actions
| Resource | Path |
|---|---|
| Parties | /expedientes/cases/{case_id}/parties/ |
| Actions and deadlines | /expedientes/cases/{case_id}/actions/ (with POST …/{id}/complete/ and …/{id}/reopen/) |
| Folders | /expedientes/cases/{case_id}/folders/ |
| Linked documents (invoices, quotes…) | /expedientes/cases/{case_id}/documents/ |
Uploading files
/api/v1/expedientes/cases/{case_id}/files/cases:writeFiles are uploaded with multipart/form-data. Fields: file (required), name (the file name is used if omitted), folder (id of a folder of the same case) and notes.
curl https://api.billora.app/api/v1/expedientes/cases/57/files/ \
-H "Authorization: Bearer $BILLORA_API_KEY" \
-H "Idempotency-Key: case57-claim-v1" \
-F "file=@claim.pdf;type=application/pdf" \
-F "name=Filed claim.pdf" \
-F "folder=12"import { readFile } from "node:fs/promises";
const form = new FormData();
form.append("file", new Blob([await readFile("claim.pdf")], { type: "application/pdf" }), "claim.pdf");
form.append("name", "Filed claim.pdf");
form.append("folder", "12");
const res = await fetch("https://api.billora.app/api/v1/expedientes/cases/57/files/", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.BILLORA_API_KEY}` }, // don't set Content-Type: fetch adds it with the boundary
body: form,
});
console.log(res.status, await res.json());import os, requests
with open("claim.pdf", "rb") as fh:
res = requests.post(
"https://api.billora.app/api/v1/expedientes/cases/57/files/",
headers={"Authorization": f"Bearer {os.environ['BILLORA_API_KEY']}"},
files={"file": ("claim.pdf", fh, "application/pdf")},
data={"name": "Filed claim.pdf", "folder": "12"},
timeout=120,
)
print(res.status_code, res.json())$ch = curl_init("https://api.billora.app/api/v1/expedientes/cases/57/files/");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("BILLORA_API_KEY")],
CURLOPT_POSTFIELDS => [
"file" => new CURLFile("claim.pdf", "application/pdf", "claim.pdf"),
"name" => "Filed claim.pdf",
"folder" => "12",
],
]);
$file = json_decode(curl_exec($ch), true);The response (201) includes id, file_size, mime_type, version and download_url. To download it later: GET /expedientes/cases/{case_id}/files/{id}/download/. Uploading a new file with PATCH on the same resource stores it as a new version (version + 1).
Files count towards the plan's storage; if it is exceeded, the upload returns 402 quota_exceeded.
Other operations
| Operation | Endpoint |
|---|---|
| Next free reference | GET /expedientes/next-reference/ |
| Document requests to the client | /expedientes/cases/{case_id}/requirements/ (with POST …/{id}/resend/ and …/{id}/cancel/) |
| Actions across all cases and deadline calendar | GET /expedientes/all-actions/ · GET /expedientes/calendar/ |
| Indicators, settings and Google Calendar status | GET /expedientes/dashboard/ · GET /expedientes/settings/ · GET /expedientes/google-calendar/status/ |
| Generate a document from a Word template | POST /expedientes/cases/{case_id}/generate-document/ (templates:read + cases:read, see templates) |
Events
case.created, case.updated, case.closed and case_file.created. See webhooks.
