ProJob - Get orders

API Url

Used for loading all the orders.

GET
http://localhost:16010/ProMarkREST/rest/ProJob/orders

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.

Query parameters

FieldTypeDescription
expandoptionalString

Expand schema according to URI.

Default value: schema
fieldsoptionalString

List of fields to return, if empty returns all fields.

filteroptionalString

JSON containing filter fields, their values and conditions.

noSchemaoptionalBoolean

true = The schema property/object will not be returned. Default is false.

skipoptionalNumber

Number of records to skip. Used for pagination.

sortByoptionalString

String with fields to sort on (descending,ascending), where a descending sort is prefixed by minus: -

takeoptionalNumber

Number of records to get. Used for pagination.

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

      typeString

The field variable type.

Allowed values:"string""number""date""boolean"
    ordersObject[]

Collection of orders.

      descriptionString

Order description.

      idString

Order Id.

      itemDescriptionString

Item description

      itemIdString

Item id

      lotIdString

Lot id

      orderNoString

Order number.

      orderTypeDescriptionString

Order type description

      orderTypeIdString

Order type id

      plannedEnddatetime

Planned end time

      plannedStartdatetime

Planned start time

      ref1String

Customer reference 1

      ref2String

Customer reference 2

      ref3String

Customer reference 3

      responsibleString

Who is responsible for the order.

    schemaString

The meta schema URI. Not sent when 'expand=schema'.

      anyObject

Field name, depending on schema type (*: any). It's the object containging settings for this field.

      fieldsObject

Object containing the field objects.

      idString

The field name to use as internal id (value field).

      objectNameString

The json object name containing the data.

      textString

The description to show (used for drop-down, combo-box etc.).

  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": {
"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

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.