Creating Orders & Order Lines

Adding a new Order (POST)

To create an order, "name" (the order name or number) is required in the body of the request. Other order body params are optional. A unique ID for the order will be generated automatically.

The order also needs to have at least one order line, which requires a material and a quantity. As you look through other order lines body params, note that the orderId is only required when creating order lines for an order that already exists.

Direction Types

Determine the type of order by setting the directionType.

  • 1: Put
  • 2: Pick
  • 3: Return
  • 4: Transport/Transfer
  • 5: Count
  • 7: Production

Here's an example of a pick order using lot numbers:

Body:

{
    "name": "Sample Pick Order",
    "directionType": 2,
    "warehouseName": "Warehouse",
    "order_lines": [
        {
            "materialId": "EBD286D1-4D5A-41C3-B24A-E62FC1008E57",
            "quantity": 24,
            "lotNumber": "Lot12"

        },
        {
            "materialId": "9EBE3A8B-3DAF-4C68-BB82-BFFC8218900D",
            "quantity": 45,
            "lotNumber": "Lot34"
        }
    ],
    "Info2": "These materials have lot numbers."
}

Response:

{
    "order": {
        "unit": null,
        "modifiedDate": "2022-03-22T20:41:56.220000",
        "storageUnits": [],
        "id": "068119BB-C482-4346-833E-0FA207FBA525",
        "name": "Sample Pick Order",
        "warehouseName": "Warehouse",
        "priority": 2,
        "order_lines": [
            {
                "lot": "Lot12",
                "quantityConfirmed": 0.0,
                "modifiedDate": "2022-03-22T20:41:56.357000",
                "materialName": "Renamed Sample Material",
                "id": "BE2059B6-C69C-45C0-A081-B56C1D902FCB",
                "quantity": 24.0,
                "quantityDeviated": 24.0,
                "quantityRequested": 0.0,
                "serialNumber": null,
                "number": 1
            },
            {
                "lot": "Lot34",
                "quantityConfirmed": 0.0,
                "modifiedDate": "2022-03-22T20:41:56.417000",
                "materialName": "Test Material 1",
                "id": "29D62C38-BAF8-4F0D-9076-0AA4237E8EAD",
                "quantity": 45.0,
                "quantityDeviated": 45.0,
                "quantityRequested": 0.0,
                "serialNumber": null,
                "number": 2
            }
        ],
        "deadline": null,
        "Info1": null,
        "Info2": "These materials have lot numbers.",
        "status": "Untouched",
        "type": 1,
        "Info3": null,
        "incompleteAllocations": 0,
        "hasStock": 0,
        "Info5": null,
        "Info4": null,
        "directionType": 2,
        "handlingUnit": null
    }
}

Here's an example of a put order using serial numbers:

Body:

{
    "name": "Sample Put Order",
    "directionType": 1,
    "warehouseName": "Warehouse",
    "order_lines": [
        {
            "materialId": "EBD286D1-4D5A-41C3-B24A-E62FC1008E57",
            "quantity": 1,
            "serialNumber": "SN12345"
        },
        {
            "materialId": "9EBE3A8B-3DAF-4C68-BB82-BFFC8218900D",
            "quantity": 1,
            "serialNumber": "SN67890"
        }
    ],
    "Info2": "These materials have serial numbers."
}

Response:

{
    "order": {
        "unit": null,
        "modifiedDate": "2022-03-22T20:31:12.130000",
        "storageUnits": [],
        "id": "AB5655FA-7674-4414-A4E7-1B9E07EF55C7",
        "name": "Sample Put Order",
        "warehouseName": "Warehouse",
        "priority": 2,
        "order_lines": [
            {
                "lot": null,
                "quantityConfirmed": 0.0,
                "modifiedDate": "2022-03-22T20:31:12.327000",
                "materialName": "Renamed Sample Material",
                "id": "6EE78399-4F6B-42EF-BC0F-36418F0BE130",
                "quantity": 1.0,
                "quantityDeviated": 1.0,
                "quantityRequested": 0.0,
                "serialNumber": "SN12345",
                "number": 1
            },
            {
                "lot": null,
                "quantityConfirmed": 0.0,
                "modifiedDate": "2022-03-22T20:31:12.390000",
                "materialName": "Test Material 1",
                "id": "2C91E81F-70C9-4928-AA0D-669AC75890AC",
                "quantity": 1.0,
                "quantityDeviated": 1.0,
                "quantityRequested": 0.0,
                "serialNumber": "SN67890",
                "number": 2
            }
        ],
        "deadline": null,
        "Info1": null,
        "Info2": "These materials have serial numbers.",
        "status": "Untouched",
        "type": 1,
        "Info3": null,
        "incompleteAllocations": 0,
        "hasStock": 0,
        "Info5": null,
        "Info4": null,
        "directionType": 1,
        "handlingUnit": null
    }
}

Updating an Order (PUT)

To update an order, pass the order's ID and enter new values for any of the keys. If updating a dynamic field, pass your dynamic field name and value. (For adding new order lines to the order, see below for using the /order_lines endpoint.)

Body:

{
    "name": "Renamed Put Order",
    "priority": 1,
    "Info1": "This put order has two lines.",
    "Info3": "This order is high priority."
}

Response:

{
    "order": {
        "unit": null,
        "modifiedDate": "2022-03-22T20:31:12.130000",
        "storageUnits": [],
        "id": "AB5655FA-7674-4414-A4E7-1B9E07EF55C7",
        "name": "Renamed Put Order",
        "warehouseName": "Warehouse",
        "priority": 1,
        "order_lines": [
            {
                "lot": null,
                "quantityConfirmed": 0.0,
                "modifiedDate": "2022-03-22T20:31:12.327000",
                "materialName": "Renamed Sample Material",
                "id": "6EE78399-4F6B-42EF-BC0F-36418F0BE130",
                "quantity": 1.0,
                "quantityDeviated": 1.0,
                "quantityRequested": 0.0,
                "serialNumber": "SN12345",
                "number": 1
            },
            {
                "lot": null,
                "quantityConfirmed": 0.0,
                "modifiedDate": "2022-03-22T20:31:12.390000",
                "materialName": "Test Material 1",
                "id": "2C91E81F-70C9-4928-AA0D-669AC75890AC",
                "quantity": 1.0,
                "quantityDeviated": 1.0,
                "quantityRequested": 0.0,
                "serialNumber": "SN67890",
                "number": 2
            }
        ],
        "deadline": null,
        "Info1": "This put order has two lines.",
        "Info2": "These have serial numbers.",
        "status": "Untouched",
        "type": 1,
        "Info3": "This order is high priority.",
        "incompleteAllocations": 0,
        "hasStock": 0,
        "Info5": null,
        "Info4": null,
        "directionType": 1,
        "handlingUnit": null
    }
}

Order Status Types

An order's status is automatically set to "Untouched" when it is created, but these values can be helpful when updating or searching for the status of an order.

  • 1: “Untouched"
  • 2: "Ready for Allocation" (when reverted from "Is Allocated”)
  • 10: "Is Allocated”
  • 11: "In Process" (order is imported but not fully picked/put)
  • "Processed" (order is fulfilled and can be found via name or orderId in the History/Transactions list)

Adding a new Order Line (POST)

To create an order line, the ID of the order being added to is required in the body of the request. Each order line also requires a material and quantity. Other order lines body params are optional.

Body:

{
    "orderId": "AB5655FA-7674-4414-A4E7-1B9E07EF55C7",
    "materialId": "C6607DB2-CE96-4888-82A5-71E36EBF2785",
    "quantity": 1,
    "lot": "Lot42",
    "number": 3,
    "Info1": "This material has a lot number."
}

Response:

{
    "order_line": {
        "modifiedDate": "2022-03-22T20:43:54.773000",
        "progressType": 1,
        "storageUnits": [],
        "id": "DF74472B-829D-46DC-BD99-BA8AD4C36627",
        "orderId": "AB5655FA-7674-4414-A4E7-1B9E07EF55C7",
        "quantityRequested": 0.0,
        "serialNumber": null,
        "number": 3,
        "pickLocation": null,
        "lot": "Lot42",
        "pickBinName": null,
        "quantityConfirmed": 0.0,
        "qualification": null,
        "costCenterName": null,
        "putDate": null,
        "putLocation": null,
        "quantityDeviated": 1.0,
        "hostIdentification": null,
        "putBinName": null,
        "Info1": "This material has a lot number.",
        "releaseDate": null,
        "materialName": "SampleMaterial",
        "productionDate": null,
        "quantity": 1.0,
        "Info2": null,
        "status": "queued",
        "expiryDate": null,
        "incompleteAllocations": 0,
        "hasStock": 0,
        "putHeight": null,
        "materialId": "C6607DB2-CE96-4888-82A5-71E36EBF2785",
        "Info5": null,
        "Info4": null,
        "directionType": 1,
        "owner": "sys",
        "Info3": null
    }
}