ProJect - Get piecework rates

API Url

Used for loading piecework rates.

GET
http://localhost:16010/ProMarkREST/rest/ProJect/projects/{project_id}/activities/{activity_id}/piecework-rates

Permissions: user

Request headers

FieldTypeDescription
Accept-LanguageoptionalString

=en-GB Language use for localization.

X-ClientoptionalString

=Client type.

Allowed values:"Portal""Mobile""Admin"
X-RoleoptionalNumber

ProMark role (1: Employee, 2: User).

Allowed values:{12}
X-WebPart-IdoptionalNumber

Unique web-part identifier.

Path parameters

FieldTypeDescription
activity_IdString

Activity ID.

Query parameters

FieldTypeDescription
fromoptionalDate

The start date of the period.

periodIdoptionalDate

The period profile id.

pieceworkIdoptionalString

Piecework ID.

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    pieceworkRatesObject[]

Collection of piecework rates.

      activityIdString

Activity ID.

      idNumber

Piecework rate ID.

      maxRateNumber

Minimum rate value for the piecework.

      minRateNumber

Maximum rate value for the piecework.

      pieceworkIdString

Piecework ID.

      pieceworkObjIdNumber

Piecework object ID.

      projectIdString

Project ID.

      rateNumber

The rate value for the piecework.

      typeNumber

1 - advance, 2 - uptake, 3 - complete.

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"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

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.