Client is an individual or organization that post job on exchange
To create new client:
POST /client
Payload:
{
"email":"tt@org.com",
"balance":2000000, // amount in cents
}
Response:
HTTP 200
{"id":"{client_id"}
To retrieve client info:
GET /client/{id}
Response:
HTTP 200
{
"id":"{client_id}",
"balance":200000,
"email":"tt@org.com"
}
Task is a unit of a job that can be posted on exchanged and performed by Freelancer
NOTE: When client creates a task, funds will be locked from client's account
POST /task
Payload:
{
"description":"golang app",
"fee":2000, //amount in cents
"deadline":40000, //duration in seconds
"client_id":"client-uuid",
}
Response:
HTTP 200
{"id":"{task_id"}
NOTE: When task's status changes to closed
, funds will be unlocked and transfered to freelancer's account
PUT /task/{id}
Payload:
{
"description":"golang app",
"fee":2000,
"deadline":40000,
"status":"started",
"freelancer_id":"freelancer-uuid"
}