Entities - Create entity
API Url
Create a new entity record.
GET
http://localhost:16010/ProMarkREST/web/Entity/data/{entity}
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 |
|---|---|---|
| entity | String | Name of the entity. |
Parameter
| Field | Type | Description |
|---|---|---|
| request | Object | Main object containing the request data. |
| data | Object | Object containg data to be uploaded. |
Request example for creating a department:
{"request": {"data": {"departments": [{"id": "TEX","description": "Texas production","inactive": false,"inScrollList": false,"suppressAtTerminal": false,"sendToApproval": false,"sendTo2ndLevelApproval": false,"categories": [{"id": "BLUE","description": "Blue collar employees"}]}]}}}
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. |