---
title: Module 4(Client CRUD)
tags: general
---
# List of APIs
### Module 4: Clients Module
#### Prerequisites
**New Tables**
- Client
- id: uuid
- name: string
- nickName: string
- bio: Text
- address
- email
- phoneNumber
- POC_name (optional)
- POC_email (optional)
- POC_phoneNumber (optional)
- isDisabled (true/false)
##### 1) Create client
**Endpoint:**: POST '/clients'
**Requirement**: isCCAdminOrSuperAdmin
Process:
1) Create a platform super admin clientId & client Secret in env file.
2) Take that super admin clientId & secret and use that to create a super admin for the first time with a very strong password (so proper validations for that are required).
##### 2) Get All Clients
**Endpoint:**: GET '/clients'
**Response**:
```
{
meta: {
...
},
data: [{
clientData: {
name, nickName etc.
},
stats: {
openedJobs: 4(Hardcode for this module),
closedJobs: 25(Hardcode for this module),
totalJobs: 29 (Hardcode for this module)
}
}, ...]
}
```
##### 3) Edit Client
**EndPoint**: PUT 'clients/:client_id'
**Required**: isCCAdminOrCCSuperAdmin
Process:
Same as other Edit table functions.
##### 5) Disable Clients
**EndPoint**: POST 'clients/disable'
**Required**: isCCAdminOrCCSuperAdmin
Process:
Same as recruiter members, will work with the given client_id.
Request Body:
```
[{
clientId: {client's id},
disable: true/false
}]
```
If disable == true then disable the client else enable it.