LAA Civil Applications Data Store
This API and documentation are in early development.
This is planned to the be central store of eligibility checks from Check if your client qualifies for legal aid and civil legal advice cases from the Civil Legal Advice call centre.
This API exists as a datastore allowing these resources to be stored and updated by the above services.
In the future this will allow these resources to be accessed throughout the users legal aid journey, reducing the need for users to re-answer questions and re-entry of data.
Responsibilities of this API
This API is responsible for storing and updating records, and for the data governance of these records.
This includes:
- Data security
- Data integrity
- Implementing data retention policies
This API is not responsible for the validity of the data, this is the responsibility of API users.
Data structure
The following is the current data structure for resources accessible in the API.
Support
This API is maintained by the Civil Legal Advice team.
If you require support please reach out to #laa-cla-dev
Test Environments
We plan on supporting the following test environment, with endpoints which will mirror production.
laa-civil-case-api-uat.cloud-platform.service.justice.gov.uk/
To integrate with this environment you will require test credentials.
Access
To use the API you will need a JSON Web Token (JWT) which can be obtained from the /token
endpoint.
You will need to send a POST
request with the following headers:
{
"accept": "application/json",
"Content-Type": "application/x-www-form-urlencoded"
}
and body:
{
"grant_type": "password",
"username": "string",
"password": "string",
"scope": "",
"client_id": "string",
"client_secret": "string"
}
The /token
endpoint generates the required access token to allow a user to access the service. When submitting other requests, the request needs to contain this authorisation bearer token.
All access tokens are valid for 30 minutes on the API.
Cases
Create a case
POST /cases
Scope
create
A case can be created using the following request schema
{
"case_type": "CLA",
"notes": [
{
"note_type": "Operator",
"content": "Initial client contact made via phone."
},
{
"note_type": "Provider",
"content": "Case documents received and filed."
}
],
"people": [
{
"name": "John Doe",
"address": "123 St. James Avenue",
"phone_number": "012334 343495",
"postcode": "SW1A 1AA",
"email": "john.doe@example.com"
},
{
"name": "Jane Doe",
"address": "124 St. James Avenue",
"phone_number": "012334 343465",
"postcode": "SW1A 1AA",
"email": "jane.smith@example.com"
}
]
}
Arguments
Case type (required)
Case type can be either “CLA” or “CCQ”.
Notes
Note type
Note type can be one of “User”, “Provider”, “Operator”, or, “Other”
Content
A string.
Response
You will receive the following response schema:
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"case_type": "CLA",
"created_at": "2024-10-17T09:00:00Z",
"updated_at": "2024-10-17T09:00:00Z",
"notes": [
{
"id": "123e4567-e89b-12d3-a456-426614174001",
"note_type": "Operator",
"content": "Initial client contact made via phone.",
"case_id": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2024-10-17T09:00:00Z",
"updated_at": "2024-10-17T09:00:00Z"
},
{
"id": "123e4567-e89b-12d3-a456-426614174002",
"note_type": "Provider",
"content": "Case documents received and filed.",
"case_id": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2024-10-17T09:00:00Z",
"updated_at": "2024-10-17T09:00:00Z"
}
],
"people": [
{
"id": "123e4567-e89b-12d3-a456-426614174003",
"case_id": "123e4567-e89b-12d3-a456-426614174000",
"name": "John Doe",
"address": "123 St. James Avenue",
"phone_number": "012334 343495",
"postcode": "SW1A 1AA",
"email": "john.doe@example.com",
"created_at": "2024-10-17T09:00:00Z",
"updated_at": "2024-10-17T09:00:00Z"
},
{
"id": "123e4567-e89b-12d3-a456-426614174004",
"case_id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Jane Smith",
"address": "123 St. James Avenue",
"phone_number": "012334 343495",
"postcode": "SW1A 1AA",
"email": "jane.smith@example.com",
"created_at": "2024-10-17T09:00:00Z",
"updated_at": "2024-10-17T09:00:00Z"
}
]
}
Get all case IDs
GET /cases/
Scope
read
Gets all case information for a given case id
GET /cases/{case_id}
Scope
read
Modify a case
PUT /cases/{case_id}
Scope
update
A case can be modified by providing a new case with the following schema.
If an ID of the sub-object is included the object will be updated, if not a new object will be created.
{
"case_type": "CLA",
"notes": [
{
"id": "123e4567-e89b-12d3-a456-426614174003",
"note_type": "Operator",
"content": "Initial client contact made via phone."
},
{
"note_type": "Provider",
"content": "Case documents received and filed."
}
],
"people": [
{
"name": "John Doe",
"address": "123 St. James Avenue",
"phone_number": "012334 343495",
"postcode": "SW1A 1AA",
"email": "john.doe@example.com"
},
{
"name": "Jane Doe",
"address": "124 St. James Avenue",
"phone_number": "012334 343465",
"postcode": "SW1A 1AA",
"email": "jane.smith@example.com"
}
]
}