---
# System prepended metadata

title: Module 3(CC CRUD)
tags: [general]

---

---
title: Module 3(CC CRUD)
tags: general
---

# List of APIs

### Module 3: Coordinators and sub-coordinators Module

##### 1) Create Super Coordinator(Not related to frontend)

**Endpoint:**: POST '/cc/super-admin'

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) Login Company Coordinator

**Endpoint:**: POST '/auth/login'

Process:

The normal flow that we currently have for login.


##### 3) Create CC Members

**EndPoint**: POST 'cc/members'

**Required**: isCCAdminOrCCSuperAdmin

Process:

1) Normal form Submit just like recruiter members, exact same just the role requirement will change from recruiter admin to ccAdmin as stated above in "Required" section.


##### 4) Get All CC Members

**EndPoint**: GET 'cc/members'

**Required**: isCCAdminOrCCSuperAdminOrCCMember

Process:

1) Fetch all the Cc members from db


##### 5) Edit CC Members

**EndPoint**: PUT 'cc/members/:user_id'

**Required**: isCCAdminOrCCSuperAdmin

Process:

Same as recruiter members, will work with the given user_id.

##### 6) Disable CC Members

**EndPoint**: POST 'cc/members/disable'

**Required**: isCCAdminOrCCSuperAdmin

Process:

Same as recruiter members, will work with the given user_id.

Request Body: 
```
[{
    userId: {user's id}, 
    disable: true/false
}, ...]
```

If disable == true then disable the user else enable it.

##### 7) Filter Member List

**Endpoint**: POST 'cc/members/filterBy'

**Required**: CCMember or CCAdmin or CCSuperAdmin

**Request**:

```
{
    filterBy: [{
        "key": value
    }],
    
    sortBy: {
        "key": "asc" || "desc"
    },
    
    search: {
        text: "text"
    }
}

PS: "key" can be "role", "name", or any field in this model
```



