ProJect - Save favourite selections
API Url
Used for upsarting employee favourite project selection (templates). For now, only send one record at a time, or else make sure 'favourites.id' is unique.
http://localhost:16010/ProMarkREST/rest/ProJect/employees/{id}/favourites
Permissions: user
Path parameters
| Field | Type | Description |
|---|---|---|
| id | String | Employee ID for whom to save favourites. |
Parameter
| Field | Type | Description |
|---|---|---|
| request | Object | Main object containing the request data. |
| data | Object | Object containg data to be uploaded. |
| favourites | Object[] | Collection of project favourites. |
| activityId | String | The Activity identifier. |
extraInfooptional | Object[] | Collection of project extra info. Needs to be last in JSON. |
| info | String | Extra info type (ex: "DEPT:", "GROUP:", "FREE"). |
| valueId | String | Extra info value identifier, related to 'extraInfo.info'. |
idoptional | Number | Unique identifier of the favourite record. |
pieceworkIdoptional | String | The piecework identifier. |
| projectId | String | The Project identifier. |
| registeredTime | Number[] | Default registration time in seconds for one week, starting with Monday. |
timeTypeIdoptional | String | The Time type identifier. |
Request example for new record:
{"request": {"data": {"favourites": [{"projectId": "Aarsleff","activityId": "ACT1","timeTypeId": "Machine","extraInfo": [{"info": "MACHINE","valueId": "MACH1"}]}]}}}
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| favourites | Object[] | Collection of project favourites. |
| activityId | String | The Activity identifier. |
extraInfooptional | Object[] | Collection of project extra info. Needs to be last in JSON. |
| info | String | Extra info type (ex: "DEPT:", "GROUP:", "FREE"). |
| valueId | String | Extra info value identifier, related to 'extraInfo.info'. |
idoptional | Number | Unique identifier of the favourite record. |
pieceworkIdoptional | String | The piecework identifier. |
| projectId | String | The Project identifier. |
| registeredTime | Number[] | Default registration time in seconds for one week, starting with Monday. |
timeTypeIdoptional | String | The Time type identifier. |
messageoptional | Object | Object containing response messages. |
| code | Number | Message code. |
| text | String | Message text. |
| type | String | Type of message. "warning""info" |
Success example for a new record:
{"response": {"data": {"favourites": [{"id": 12345678,"projectId": "Aarsleff","activityId": "ACT1","timeTypeId": "Machine","extraInfo": [{"info": "MACHINE","valueId": "MACH1"}]}]}}}
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. |