Orders

Orders are a group of items that are picked or put into the storage system. When creating and updating orders, the changes need to be verified and updated asynchronously by PowerPick.

Attributes

  • id string

    Unique identifier for the object.

  • name string

    Non-unique name for the order.

  • status string

    Either queued, or processed. Queued is imported but not fully picked, and processed is fully picked.

  • priority integer

    Number priority for the order. Higher number indicates higher priority.

  • modifedAt datetime

    The date/time this order was last modified. This will either be the creation date if it is still queued, or the processed date.

  • deadline date

    When the order is due.

  • directionType integer

    1 if the order is a put order, 2 if it is a pick order, 3 is a return, 5 is a count order.

  • handlingUnit string

    DEPRECATED.

  • warehouseName string

    Name of the warehouse this order belongs to.

  • errorCode integer

  • errorDescription string

  • Info1 string

    A generic field for custom use.

  • Info2 string

    A generic field for custom use.

  • Info3 string

    A generic field for custom use.

  • Info4 string

    A generic field for custom use.

  • Info5 string

    A generic field for custom use.

  • zones array

    Array of Zone names this order is a part of.

  • number integer

    Non-unique name for the order line.

  • materialName string

  • quantity float

    The quantity on the original order line.

  • quantityRequested float

    The quantity that was requested when processed. Only shows if the order line was processed.

  • quantityConfirmed float

    The quantity that was confirmed on the order line. Only shows if the order line was processed.

  • quantityDeviated float

    The amount that was missing. Only shows if the order line was processed.

  • orderType integer

    Either ManualPut (1), ManualPick (2), OrderPut (3), OrderPick (4), Transfer (5), OrderCount (6), ContextCount(7) - context driven location count during put/pick

Endpoints

List Orders

get /api/orders

Arguments

  • limit integer

    A limit on the number of objects to be returned. Limit can range between 1 and 1000, and the default is 250.

  • offset integer

    Will return items, but only those after the integer amount.

  • orderBy string, array

    Order the response by the selected field. Multiple values can be passed, separated by a comma.

  • countOnly boolean

    When true, will only return a count of the amount of items in the query.

  • status string

    Only return order with a certain status, either pending, failed, queued, or processed. Default is processed.

  • modifiedAt datetime

    Return orders modified on a certain date. Like all date arguments, a [gt], [lt], [lte], for [gte] can be prefixed.

  • name string

    Only return orders that have the given name.

  • priority integer

    Only return orders that have the given priority.

  • handlingUnit string

  • directionType integer

    Only return orders that have the given direction type.

  • [dynamic_field]

    Any dynamic fields that have been set up can be used as a filter.

Request with curl
curl "http://[Your IP] /api/orders" \ -X get \-H "Content-Type: application/json" \-H "Authorization: Bearer [Your JWT Access Token]"
Example Response
{"orders": [{ "id": " AFAC0A52-4677-4D22-B92C-B7AFA3B76947 ", "name": " 40243656 ", "status": " pending ", "priority": " 4 ", "modifedAt": " 2020-02-09 02:57:00.290 ", "deadline": " 2020-02-10 00:36:00.113 ", "directionType": " 1 ", "handlingUnit": " string ", "warehouseName": " Warehouse 1 ", "errorCode": " integer ", "errorDescription": " string ", "Info1": " string ", "Info2": " string ", "Info3": " string ", "Info4": " string ", "Info5": " string ", "zones": " [] ", "order_lines": [{ "number": " 22 ", "materialName": " ITEM00241 ", "quantity": " float ", "quantityRequested": " 10 ", "quantityConfirmed": " 8 ", "quantityDeviated": " 2 ", "orderType": " 3 ", }]}]}

Create Order

post /api/orders

Create an order and get a response.

Body Parameters

  • name string REQUIRED

    The order name/number.

  • priority integer

    Number priority for the order. Defaults to 2.

  • directionType integer

    1 if the order is a put order, 2 if it is a pick order. Defaults to 1.

  • deadline datetime

    When the order is due.

  • [DynamicField] string

    Any of the dynamic order fields from PowerPick.

  • order_lines array REQUIRED

    Any amount of order lines related to this order (see Order Line for more information on fields).

  • quantity integer REQUIRED

    The amount of material on the order line.

  • materialName string REQUIRED

    The name of the material on the order line.

  • number integer REQUIRED

    The line number of the order line. Must be sequential starting from 1.

  • allocate boolean

    Whether this order should be allocated when imported. Defaults to false.

Request with curl
curl "http://[Your IP] /api/orders" \ -X post \-H "Content-Type: application/json" \-H "Authorization: Bearer [Your JWT Access Token]" \-d '{ "name": "string", "order_lines": "array", "quantity": "integer", "materialName": "string", "number": "integer", }'
Example Response
{"order": { "id": " AFAC0A52-4677-4D22-B92C-B7AFA3B76947 ", "name": " 40243656 ", "status": " pending ", "priority": " 4 ", "modifedAt": " 2020-02-09 02:57:00.290 ", "deadline": " 2020-02-10 00:36:00.113 ", "directionType": " 1 ", "handlingUnit": " string ", "warehouseName": " Warehouse 1 ", "errorCode": " integer ", "errorDescription": " string ", "Info1": " string ", "Info2": " string ", "Info3": " string ", "Info4": " string ", "Info5": " string ", "zones": " [] ", "order_lines": [{ "number": " 22 ", "materialName": " ITEM00241 ", "quantity": " float ", "quantityRequested": " 10 ", "quantityConfirmed": " 8 ", "quantityDeviated": " 2 ", "orderType": " 3 ", } }

Show Order

get /api/orders/[id]

Get a specific order from the PPG database and return a JSON response. The order will be pulled either from the MasterOrder table or the HistoryMasterOrder table, depending on whether it's been picked.

Request with curl
curl "http://[Your IP] /api/orders/[id]" \ -X get \-H "Content-Type: application/json" \-H "Authorization: Bearer [Your JWT Access Token]"
Example Response
{"order": { "id": " AFAC0A52-4677-4D22-B92C-B7AFA3B76947 " , "name": " 40243656 " , "status": " pending " , "priority": 4 , "modifedAt": 2020-02-09 02:57:00.290 , "deadline": 2020-02-10 00:36:00.113 , "directionType": 1 , "handlingUnit": " string " , "warehouseName": " Warehouse 1 " , "errorCode": integer , "errorDescription": " string " , "Info1": " string " , "Info2": " string " , "Info3": " string " , "Info4": " string " , "Info5": " string " , "zones": [] , "order_lines": [{ "number": 22 , "materialName": " ITEM00241 " , "quantity": float , "quantityRequested": 10 , "quantityConfirmed": 8 , "quantityDeviated": 2 , "orderType": 3 , } }

Update Order

put /orders/[id]

Update an order and get a response. Each key/value is optional. Only keys sent will be updated, but an object is required to be sent.

Arguments

  • handlingUnit string

  • number string

    This updates the order number.

  • [DynamicField] string

  • allocate boolean

    If true or false, this will either allocate or deallocate the order.

Request with curl
curl "http://[Your IP] /orders/[id]" \ -X put \-H "Content-Type: application/json" \-H "Authorization: Bearer [Your JWT Access Token]"
Example Response
{"order": { "id": " AFAC0A52-4677-4D22-B92C-B7AFA3B76947 ", "name": " 40243656 ", "status": " pending ", "priority": " 4 ", "modifedAt": " 2020-02-09 02:57:00.290 ", "deadline": " 2020-02-10 00:36:00.113 ", "directionType": " 1 ", "handlingUnit": " string ", "warehouseName": " Warehouse 1 ", "errorCode": " integer ", "errorDescription": " string ", "Info1": " string ", "Info2": " string ", "Info3": " string ", "Info4": " string ", "Info5": " string ", "zones": " [] ", "order_lines": [{ "number": " 22 ", "materialName": " ITEM00241 ", "quantity": " float ", "quantityRequested": " 10 ", "quantityConfirmed": " 8 ", "quantityDeviated": " 2 ", "orderType": " 3 ", } }

Delete Order

get /api/orders/[id]/delete

Delete a specific order from the PPG database and return a JSON response. This will also delete the order lines associated with the order.

Request with curl
curl "http://[Your IP] /api/orders/[id]/delete" \ -X get \-H "Content-Type: application/json" \-H "Authorization: Bearer [Your JWT Access Token]"
Example Response
{"deleted": "true"}