ProJect - Get piecework rates
API Url
Used for loading piecework rates.
http://localhost:16010/ProMarkREST/rest/ProJect/projects/{project_id}/activities/{activity_id}/piecework-rates
Permissions: user
Request headers
| Field | Type | Description |
|---|---|---|
Accept-Languageoptional | String | =en-GB Language use for localization. |
X-Clientoptional | String | =Client type. "Portal""Mobile""Admin" |
X-Roleoptional | Number | ProMark role (1: Employee, 2: User). {12} |
X-WebPart-Idoptional | Number | Unique web-part identifier. |
Path parameters
| Field | Type | Description |
|---|---|---|
| activity_Id | String | Activity ID. |
Query parameters
| Field | Type | Description |
|---|---|---|
fromoptional | Date | The start date of the period. |
periodIdoptional | Date | The period profile id. |
pieceworkIdoptional | String | Piecework ID. |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| pieceworkRates | Object[] | Collection of piecework rates. |
| activityId | String | Activity ID. |
| id | Number | Piecework rate ID. |
| maxRate | Number | Minimum rate value for the piecework. |
| minRate | Number | Maximum rate value for the piecework. |
| pieceworkId | String | Piecework ID. |
| pieceworkObjId | Number | Piecework object ID. |
| projectId | String | Project ID. |
| rate | Number | The rate value for the piecework. |
| type | Number | 1 - advance, 2 - uptake, 3 - complete. |
messageoptional | Object | Object containing response messages. |
| code | Number | Message code. |
| text | String | Message text. |
| type | String | Type of message. "warning""info" |
Success example:
HTTP/1.1 200 OK{"response": {"data": {"pieceworkRates": [{"projectId": "COLOR","activityId": "GREEN","pieceworkId": "100","id": 2154011114,"pieceworkObjId": 2148980594,"type": 1,"rate": 100,"minRate": 50,"maxRate": 400},{"projectId": "COLOR","activityId": "GREEN","pieceworkId": "100","id": 2154011115,"pieceworkObjId": 2148980594,"type": 2,"rate": 145,"minRate": 50,"maxRate": 400},{"projectId": "COLOR","activityId": "GREEN","pieceworkId": "100","id": 2154011116,"pieceworkObjId": 2148980594,"type": 3,"rate": 180,"minRate": 50,"maxRate": 400}]},"errorCode": 0,"errorMessage": ""}}
Error 4xx
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data (empty). |
| errorCode | Number | Error code. |
| errorMessage | String | Error description. |