Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

URL

http://<<ip address>>/rest/order/

Method

GET

Description

Receive a list of all available orders in the PTLControl.

Response

Code Block
languagejson
{
   «orderid»: [
      { "articlearticledescription": «article description», "location": «location», 
          "ordered": «amount ordered», "picked": «amount picked»
      },
      ...
   ],
   ...
}

Note that «amount picked» can be null if the line has not been processed yet.

Possible Error

HTTP404 with no body when no orders found.

Status

Status
colourPurpleYellow
titleDesigndevelop

URL

http://<<ip address>>/rest/order/«orderid»

Method

GET

Description

Receive the lines in order «orderid».

Response

Code Block
languagejson
[
  { "articlearticledescription": «article description», "location": «location», 
      "ordered": «amount ordered», "picked": «amount picked»
  },
  ...
]

Note that «amount picked» can be null if the line has not been processed yet.

Possible Error

HTTP404 with no body when the order was not found.

Status

Status
colourPurpleYellow
titleDesigndevelop

URL

http://<<ip address>>/rest/order/

Method

DELETE

Description

Delete all orders

Response

HTTP204

Status

Status
colourPurpleYellow
titleDesigndevelop

Possble Error

URL

http://<<ip address>>/rest/order/«orderid»

Method

DELETE

Description

Delete order with orderid «orderid». There is no reason not to delete an order, i.e. there are no checks on status, progress, lines, etc.

Response

HTTP204

HTTP404 with no body if order not found

Status

Status
colourPurpleYellow
titleDesigndevelop

URL

http://<<ip address>>/rest/order/

Method

POST

Description

Create a new order.

Request

Code Block
languagejson
{
   «orderid»: { 
      "orderlines": [
        { "articlearticledescription": «article description», "location": «location», 
            "ordered": «amount ordered»
        },
        ...
      ]
   },
   ...
}

Response

HTTP201 without body if created or updated

Status
colourBlue
titleimplemented

Possible Error

HTTP400 if request was invalid (e.g. invalid JSON). A human readable error message can be found in the body.

Status
colourBlue
titleimplemented

HTTP503 if order exists, but has picked lines

Status
colourYellow
titlepending

Status

Status
colourPurpleYellow
titleDesigndevelop