curl \
-d ' {
"username":"xyz",
"email":"[email protected] ",
"password":"1234567890",
"passwordConfirm":"1234567890",
"firstname":"ABC",
"lastname":"XYZ",
"phoneNumber":"1234567390",
"DOB":"01/01/2001",
"address":"abc"
}' \
-H ' Content-Type: application/json' \
https://twainlabassignment.herokuapp.com/v1/users/signup
curl \
-d ' {"username":"xyz","password":"1234567890"}' \
-H ' Content-Type: application/json' \
https://twainlabassignment.herokuapp.com/v1/users/login
Export the Token Created at a time of Login
export TOKEN = Token which you get after Login
curl -d ' {
"partyName":"BJP",
"logo":"Kamal",
"headquater":"India",
"motive":"Sabka sath sabka vikas"
}' -H ' Content-Type: application/json' -H " Authorization: Bearer $TOKEN " https://twainlabassignment.herokuapp.com/v1/party
curl -X PATCH -H " Content-Type: application/json" \
-H " Authorization: Bearer $TOKEN " -d ' {
"logo":"kamal",
"headquater":"Irndrria",
"motive":"vikas"
}' https://twainlabassignment.herokuapp.com/v1/party/BJP
curl -X DELETE -H " Authorization: Bearer $TOKEN " \ https://twainlabassignment.herokuapp.com/v1/party/BJP
Upload Rating of a Political Party
curl -X PATCH -H " Content-Type: application/json" \
-H " Authorization: Bearer $TOKEN " \
-d ' {
"rating":5
}' \
https://twainlabassignment.herokuapp.com/v1/party/uploadRating/608fd0bac4211d0015c01a5e
Create Application in a Party
curl -d ' {
"application":"true",
"aadharCardNo":"123456yy7df899"
}' -H ' Content-Type: application/json' -H " Authorization: Bearer $TOKEN " https://twainlabassignment.herokuapp.com/v1/party/BJP/application
Filter Application on a Party Name
curl -H "Authorization: Bearer $TOKEN" https://twainlabassignment.herokuapp.com/v1/party/Congress/application
Change Application Status from Waiting to Working to Accpeted (0,1,-1)
curl -X PATCH -d ' {
"status":1
}' -H ' Content-Type: application/json' -H " Authorization: Bearer $TOKEN " \
https://twainlabassignment.herokuapp.com/v1/party/BJP/application/changeAppStatus/608fd368c4211d0015c01a60
curl -d ' {
"title" : "xyz",
"description" : "xyz"
}' -H ' Content-Type: application/json' -H " Authorization: Bearer $TOKEN " \
https://twainlabassignment.herokuapp.com/v1/work
curl -X PATCH -d ' {
"rating" : 5
}' -H ' Content-Type: application/json' -H " Authorization: Bearer $TOKEN " \
https://twainlabassignment.herokuapp.com/v1/work/608fd5fec4211d0015c01a61
Upload Rating of the Politician
curl -X PATCH -d ' {
"rating" : 5
}' -H ' Content-Type: application/json' -H " Authorization: Bearer $TOKEN " \
https://twainlabassignment.herokuapp.com/v1/users/uploadRating/608fc3021d2e3f0015b6f0ac