Employee Directory and Branch Management API Documentation (1.0.0)

Download OpenAPI specification:

This is the API documentation for the Employee Directory and Branch Management application.

Branches

Retrieve all branches

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new branch

Request Body schema: application/json
required
name
required
string
address
required
string
phone
required
string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "address": "string",
  • "phone": "string"
}

Response samples

Content type
application/json
{
  • "id": "g9sdfh4nc85hd47bvn",
  • "name": "Winnipeg Branch",
  • "address": "1 Portage Ave, Winnipeg, MB, R3B 2B9",
  • "phone": "204-988-2402"
}

Retrieve a branch by ID

path Parameters
id
required
string

The Firestore document ID of the branch

Responses

Response samples

Content type
application/json
{
  • "id": "g9sdfh4nc85hd47bvn",
  • "name": "Winnipeg Branch",
  • "address": "1 Portage Ave, Winnipeg, MB, R3B 2B9",
  • "phone": "204-988-2402"
}

Update an existing branch

path Parameters
id
required
string

The Firestore document ID of the branch to update

Request Body schema: application/json
required
name
string
address
string
phone
string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "address": "string",
  • "phone": "string"
}

Response samples

Content type
application/json
{
  • "id": "g9sdfh4nc85hd47bvn",
  • "name": "Winnipeg Branch",
  • "address": "1 Portage Ave, Winnipeg, MB, R3B 2B9",
  • "phone": "204-988-2402"
}

Delete a branch by ID

path Parameters
id
required
string

The Firestore document ID of the branch to delete

Responses

Employees

Retrieve all employees

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new employee

Request Body schema: application/json
required
name
required
string
position
required
string
department
required
string
email
required
string
phone
required
string
branchId
required
integer

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "position": "string",
  • "department": "string",
  • "email": "string",
  • "phone": "string",
  • "branchId": 0
}

Response samples

Content type
application/json
{
  • "id": "fe4ghb67dg2d1ac1",
  • "name": "Alice Johnson",
  • "position": "Branch Manager",
  • "department": "Management",
  • "email": "alice.johnson@example.com",
  • "phone": "604-555-0148",
  • "branchId": 1
}

Retrieve a single employee by ID

path Parameters
id
required
string

The Firestore document ID of the employee

Responses

Response samples

Content type
application/json
{
  • "id": "fe4ghb67dg2d1ac1",
  • "name": "Alice Johnson",
  • "position": "Branch Manager",
  • "department": "Management",
  • "email": "alice.johnson@example.com",
  • "phone": "604-555-0148",
  • "branchId": 1
}

Update an existing employee

path Parameters
id
required
string

The Firestore document ID of the employee to update

Request Body schema: application/json
required
position
string
phone
string

Responses

Request samples

Content type
application/json
{
  • "position": "string",
  • "phone": "string"
}

Response samples

Content type
application/json
{
  • "id": "fe4ghb67dg2d1ac1",
  • "name": "Alice Johnson",
  • "position": "Branch Manager",
  • "department": "Management",
  • "email": "alice.johnson@example.com",
  • "phone": "604-555-0148",
  • "branchId": 1
}

Delete an employee by ID

path Parameters
id
required
string

The Firestore document ID of the employee to delete

Responses

Get employees for a specific branch

path Parameters
branchId
required
integer

Numeric branch identifier to filter employees

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get employees for a specific department

path Parameters
department
required
string

Department name to filter employees (case-insensitive)

Responses

Response samples

Content type
application/json
[
  • {
    }
]