Creates a new user
- Request Body : JSON Object with following keys
{
"name":"string",
"email":"string",
"address": {
"line1":"string",
"line2":"string",
"locality":"string",
"city":"string",
"state":"string",
"pin":"string"
}
}
Required keys :
- name
Response :
- returns id of user
Creates a new worker
- Request Body : JSON Object with following keys
{
"name":"string",
"username":"string",
"age":"number",
"gender":"string",
"address": {
"line1":"string",
"line2":"string",
"locality":"string",
"sity":"string",
"state":"string",
"pin":"string"
},
"jobtypes": "List <string>"
}
Required keys :
- name
- username
- age
- gender
Jobtypes is a list which can hold any of the following values :
Code | Jobtype |
---|---|
WFM | Maids |
WFC | Chefs |
WFD | Drivers |
WFE | Electricians |
WFP | Plumbers |
Response :
- returns id of user
Find history
Arguments :
- usertype : can be either 'user' or 'worker'
- userid : id returned at the time of creation
Response :
- Returns a list of "placements" of the user/worker.
- Returns empty list if no history exists
Common Response Codes :
- 200: SUCCESS
- 400: Bad Request
- 500: Internal Server Error (or Application Error)