FastAPI (0.1.0)

Download OpenAPI specification:

Cases

Get Cases

Retrieve a paginated list of all cases.

Args: db: Database session. page_number: Page number for pagination (default: 0). page_size: Number of items per page (default: 100).

Returns: CaseListResponse: Paginated list of cases.

query Parameters
page_number
integer (Page Number)
Default: 0
page_size
integer (Page Size)
Default: 100

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "item_count": 0,
  • "page_count": 0,
  • "prev_page": 0,
  • "next_page": 0
}

Create Case

Create a new case.

Args: case: Case data to create. db: Database session.

Returns: CaseResponse: The created case.

Request Body schema: application/json
required
status
required
string (Status)
Enum: "Not Started" "In Progress" "Approved" "Denied"
Assigned To (string) or Assigned To (null) (Assigned To)
applicant_id
required
integer (Applicant Id)

Responses

Request samples

Content type
application/json
{
  • "status": "Not Started",
  • "assigned_to": "string",
  • "applicant_id": 0
}

Response samples

Content type
application/json
{
  • "status": "Not Started",
  • "assigned_to": "string",
  • "id": 0,
  • "applicant_id": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Get Case

Retrieve a single case by ID with applicant details.

Args: case_id: ID of the case to retrieve. db: Database session.

Returns: CaseWithApplicant: The requested case with applicant information.

path Parameters
case_id
required
integer (Case Id)

Responses

Response samples

Content type
application/json
{
  • "status": "Not Started",
  • "assigned_to": "string",
  • "id": 0,
  • "applicant_id": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "applicant": {
    }
}

Update Case

Update an existing case.

Args: case_id: ID of the case to update. case: Updated case data. db: Database session.

Returns: CaseResponse: The updated case.

path Parameters
case_id
required
integer (Case Id)
Request Body schema: application/json
required
Status (string) or Status (null) (Status)
Assigned To (string) or Assigned To (null) (Assigned To)

Responses

Request samples

Content type
application/json
{
  • "status": "Not Started",
  • "assigned_to": "string"
}

Response samples

Content type
application/json
{
  • "status": "Not Started",
  • "assigned_to": "string",
  • "id": 0,
  • "applicant_id": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Delete Case

Delete a case.

Args: case_id: ID of the case to delete. db: Database session.

path Parameters
case_id
required
integer (Case Id)

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Applicants

Get Applicants

Retrieve a paginated list of all applicants.

Args: db: Database session. page_number: Page number for pagination (default: 0). page_size: Number of items per page (default: 100).

Returns: ApplicantListResponse: Paginated list of applicants.

query Parameters
page_number
integer (Page Number)
Default: 0
page_size
integer (Page Size)
Default: 100

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "item_count": 0,
  • "page_count": 0,
  • "prev_page": 0,
  • "next_page": 0
}

Create Applicant

Create a new applicant.

Args: applicant: Applicant data to create. db: Database session.

Returns: ApplicantResponse: The created applicant.

Request Body schema: application/json
required
first_name
required
string (First Name) [ 1 .. 50 ] characters
last_name
required
string (Last Name) [ 1 .. 50 ] characters
Middle Name (string) or Middle Name (null) (Middle Name)
gender
required
string (Gender) [ 1 .. 20 ] characters
date_of_birth
required
string <date> (Date Of Birth)
ssn
required
string (Ssn) [ 9 .. 11 ] characters
Email (string) or Email (null) (Email)
Home Phone (string) or Home Phone (null) (Home Phone)
Mobile Phone (string) or Mobile Phone (null) (Mobile Phone)
Address (string) or Address (null) (Address)
City (string) or City (null) (City)
State (string) or State (null) (State)
Zip (string) or Zip (null) (Zip)
country
string (Country) <= 100 characters
Default: "USA"

Responses

Request samples

Content type
application/json
{
  • "first_name": "string",
  • "last_name": "string",
  • "middle_name": "string",
  • "gender": "string",
  • "date_of_birth": "2019-08-24",
  • "ssn": "stringstr",
  • "email": "string",
  • "home_phone": "string",
  • "mobile_phone": "string",
  • "address": "string",
  • "city": "string",
  • "state": "string",
  • "zip": "string",
  • "country": "USA"
}

Response samples

Content type
application/json
{
  • "first_name": "string",
  • "last_name": "string",
  • "middle_name": "string",
  • "gender": "string",
  • "date_of_birth": "2019-08-24",
  • "ssn": "stringstr",
  • "email": "string",
  • "home_phone": "string",
  • "mobile_phone": "string",
  • "address": "string",
  • "city": "string",
  • "state": "string",
  • "zip": "string",
  • "country": "USA",
  • "id": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Get Applicant

Retrieve a single applicant by ID.

Args: applicant_id: ID of the applicant to retrieve. db: Database session.

Returns: ApplicantResponse: The requested applicant.

path Parameters
applicant_id
required
integer (Applicant Id)

Responses

Response samples

Content type
application/json
{
  • "first_name": "string",
  • "last_name": "string",
  • "middle_name": "string",
  • "gender": "string",
  • "date_of_birth": "2019-08-24",
  • "ssn": "stringstr",
  • "email": "string",
  • "home_phone": "string",
  • "mobile_phone": "string",
  • "address": "string",
  • "city": "string",
  • "state": "string",
  • "zip": "string",
  • "country": "USA",
  • "id": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Update Applicant

Update an existing applicant.

Args: applicant_id: ID of the applicant to update. applicant: Updated applicant data. db: Database session.

Returns: ApplicantResponse: The updated applicant.

path Parameters
applicant_id
required
integer (Applicant Id)
Request Body schema: application/json
required
First Name (string) or First Name (null) (First Name)
Last Name (string) or Last Name (null) (Last Name)
Middle Name (string) or Middle Name (null) (Middle Name)
Gender (string) or Gender (null) (Gender)
Date Of Birth (string) or Date Of Birth (null) (Date Of Birth)
Ssn (string) or Ssn (null) (Ssn)
Email (string) or Email (null) (Email)
Home Phone (string) or Home Phone (null) (Home Phone)
Mobile Phone (string) or Mobile Phone (null) (Mobile Phone)
Address (string) or Address (null) (Address)
City (string) or City (null) (City)
State (string) or State (null) (State)
Zip (string) or Zip (null) (Zip)
Country (string) or Country (null) (Country)

Responses

Request samples

Content type
application/json
{
  • "first_name": "string",
  • "last_name": "string",
  • "middle_name": "string",
  • "gender": "string",
  • "date_of_birth": "2019-08-24",
  • "ssn": "string",
  • "email": "string",
  • "home_phone": "string",
  • "mobile_phone": "string",
  • "address": "string",
  • "city": "string",
  • "state": "string",
  • "zip": "string",
  • "country": "string"
}

Response samples

Content type
application/json
{
  • "first_name": "string",
  • "last_name": "string",
  • "middle_name": "string",
  • "gender": "string",
  • "date_of_birth": "2019-08-24",
  • "ssn": "stringstr",
  • "email": "string",
  • "home_phone": "string",
  • "mobile_phone": "string",
  • "address": "string",
  • "city": "string",
  • "state": "string",
  • "zip": "string",
  • "country": "USA",
  • "id": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Delete Applicant

Delete an applicant.

Args: applicant_id: ID of the applicant to delete. db: Database session.

path Parameters
applicant_id
required
integer (Applicant Id)

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Admin

Get Current User

Get the current authenticated user information.

Args: current_user: Validated JWT payload containing user information.

Returns: dict: User information from the JWT token.

Authorizations:
HTTPBearer

Responses

Response samples

Content type
application/json
null

Health

Get Health

Health check endpoint.

Returns: dict: Health status indicator.

Responses

Response samples

Content type
application/json
null