ProJob - Get orders
API Url
Used for loading all the orders.
http://localhost:16010/ProMarkREST/rest/ProJob/orders
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. |
Query parameters
| Field | Type | Description |
|---|---|---|
expandoptional | String | Expand schema according to URI. schema |
fieldsoptional | String | List of fields to return, if empty returns all fields. |
filteroptional | String | JSON containing filter fields, their values and conditions. |
noSchemaoptional | Boolean | true = The schema property/object will not be returned. Default is false. |
skipoptional | Number | Number of records to skip. Used for pagination. |
sortByoptional | String | String with fields to sort on (descending,ascending), where a descending sort is prefixed by minus: - |
takeoptional | Number | Number of records to get. Used for pagination. |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| type | String | The field variable type. "string""number""date""boolean" |
| orders | Object[] | Collection of orders. |
| description | String | Order description. |
| id | String | Order Id. |
| itemDescription | String | Item description |
| itemId | String | Item id |
| lotId | String | Lot id |
| orderNo | String | Order number. |
| orderTypeDescription | String | Order type description |
| orderTypeId | String | Order type id |
| plannedEnd | datetime | Planned end time |
| plannedStart | datetime | Planned start time |
| ref1 | String | Customer reference 1 |
| ref2 | String | Customer reference 2 |
| ref3 | String | Customer reference 3 |
| responsible | String | Who is responsible for the order. |
| schema | String | The meta schema URI. Not sent when 'expand=schema'. |
| any | Object | Field name, depending on schema type (*: any). It's the object containging settings for this field. |
| fields | Object | Object containing the field objects. |
| id | String | The field name to use as internal id (value field). |
| objectName | String | The json object name containing the data. |
| text | String | The description to show (used for drop-down, combo-box etc.). |
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": {"orders": [{"id": "0-SB-II","description": "Bay's","orderNo": "0-SBA-I","lotId": "A","itemId": "D","responsible": "AP1","plannedStart": "2012-01-03T05:10:00.000","plannedEnd": "2013-12-31T05:00:00.000","orderTypeId": "BH","orderTypeDescription": "Bo's ordretype"},{"id": "00033124","description": "test order B","orderNo": "00033124","lotId": "C","itemId": "A","itemDescription": "Vare beskriv","plannedStart": "2003-11-01T12:00:00.000","plannedEnd": "2004-11-20T18:00:00.000","orderTypeId": "BH","orderTypeDescription": "Bo's ordretype"}],"schema": {"objectName": "orders","id": "id","text": "description","fields": {"id": {"type": "string","title": "ID"},"description": {"type": "string","title": "Description"},"orderNo": {"type": "string","title": "Order Number"},"lotId": {"type": "string","title": "Lot ID"},"itemId": {"type": "string","title": "Item ID"},"itemDescription": {"type": "string","title": "Item Description"},"responsible": {"type": "string","title": "Responsible"},"plannedStart": {"type": "date","title": "From"},"plannedEnd": {"type": "date","title": "To"},"ref1": {"type": "string","title": "Ref1"},"ref2": {"type": "string","title": "Ref2"},"ref3": {"type": "string","title": "Ref3"},"orderTypeId": {"type": "string","title": "Order type ID"},"orderTypeDescription": {"type": "string","title": "Order type description"}}}]},"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. |