Change Project State API
This API is used to change the state of a project.
Command
"client/changeProjectState/1"
The client controls when to start, pause and close a project via this API. The client must pause a project to update any of its controlling parameters. The client will close the project when appropriate and then upload sesskeys for accepted completes.
Automatic project state changes also occur. A project will be paused when its performance falls below certain thresholds. A project will be closed if paused for more than x days (defaults to 7). A project will be invoiced if closed for more than x days (defaults to 7).
Inputs
The following values are expected in the JSON body:
Name | Type | Required | Description |
---|---|---|---|
command | String | Must be "client/changeProjectState/1" |
|
rfg_id | String | Survey identifier. This is the identifier that you got as response after invoking our submitProject API. |
|
state | Integer |
|
Outputs
The JSON output will always contain the original command and a result. If the result > 0, an error has occurred (refer to Error Codes) and a message field will describe the error. If result = 0, the following is included in the response field:
Name | Type | Description |
---|---|---|
cpi | String | The calculated CPI based on customer's rate card in USD. |
Example Command
{
command: "client/changeProjectState/1",
rfg_id: "RFG12345-001",
state: 2
}
Example Response
"response" : {
cpi: "$2.65"
}