Order Get Warehouse Routing Explanation

GET{{api_url}}/shop/order/{{orderid}}/warehouse_routing_explanation

Returns the step-by-step record of how InfiPlex routed each item on an order to a warehouse: which warehouses were valid, which rules were checked, how much inventory each warehouse had at that moment, and where any quantity no warehouse could fill was sent.

Each record is written once, when routing runs, and is never changed afterward, so it shows exactly what the system saw and decided at that moment. It is a record only. Nothing reads it for processing.

The response is an array with one entry per order line, in the order routing processed them. An order with two lines for the same SKU returns two entries.

Path parameters

ParameterTypeDescription
orderidintegerThe InfiPlex order ID (shop_orderid), not the marketplace order number.

Response fields

FieldDescription
shop_order_historical_data_idThe record ID, returned as a string.
sohd_order_idThe order the record belongs to, returned as a string.
data_typeThe record type. Always item_warehouse_routing for this endpoint.
data_dateWhen routing ran and the record was saved, as YYYY-MM-DD HH:MM:SS.
data_valueThe routing record for one order line, as a JSON-encoded string. Decode it to read the fields below.

data_value fields

FieldDescription
skuThe SKU on the order line.
product_name_in_systemThe product name in InfiPlex, or null.
infiplex_order_idThe InfiPlex order ID, returned as a number.
infiplex_product_idThe InfiPlex product ID, returned as a string.
infiplex_sku_idThe InfiPlex SKU ID, or null when the item is a parent product.
order_ship_zipThe order's ship-to zip code.
order_qtyThe quantity ordered on the line, returned as a string.
forced_warehouse_idThe warehouse the line was forced to, or 0 when none was forced.
process_eventsThe routing steps in the order they ran. Each has event (the step name) and most have note (a plain-English description of what happened).

Routing events

EventDescription
Determine valid warehousesWhich warehouses the line is allowed to use.
Initial processing startedWhether a parent product or a SKU is being processed.
Search for Item WarehousesHow many warehouses carry the item.
Valid Warehouse FoundA warehouse being checked for the line, with warehouseid and warehouse_identifier. The checks run against it are in child_events.
Zip Code RulesChild event. Whether zip code rules apply to the item and whether the warehouse can be used.
Default WarehouseChild event. The warehouse that takes any quantity no warehouse can fill, in default_warehouseid, default_warehouse_name, default_warehouse_identifier, default_bin_location, and default_drop_shipper_id.
Inventory Quantity AdjustmentChild event. The warehouse's inventory before routing (quantity_in_warehouse_before_process), the inventory change applied to it for this line (quantity_to_process_at_warehouse, negative for the units taken, 0 when none were), and the quantity still left to route (quantity_left_to_process_from_ordered_amount), with warehouseid, warehouse_name, warehouse_identifier, and bin_location.
Overflow Inventory Quantity AdjustmentThe quantity no warehouse could fill, taken from the default warehouse. quantity_to_process_at_warehouse is the inventory change applied there, negative for the units taken.

Decoded data_value example:

{
    "sku": "8100327398",
    "product_name_in_system": null,
    "infiplex_order_id": 104404,
    "infiplex_product_id": "2259",
    "infiplex_sku_id": null,
    "order_ship_zip": "40219",
    "order_qty": "24",
    "forced_warehouse_id": 0,
    "process_events": [
        {
            "event": "Determine valid warehouses",
            "note": "All warehouses can be used"
        },
        {
            "event": "Initial processing started",
            "note": "We are processing a parent product"
        },
        {
            "event": "Search for Item Warehouses",
            "note": "1 possible warehouse(s) found for item."
        },
        {
            "event": "Valid Warehouse Found",
            "note": "Warehouse: Secondary Warehouse (West) being checked for processing inventory",
            "warehouseid": "4",
            "warehouse_identifier": "secondary",
            "child_events": [
                {
                    "event": "Zip Code Rules",
                    "note": "Not used for item. Warehouse will be used"
                },
                {
                    "event": "Default Warehouse",
                    "note": "This is the first valid warehouse found for item. If total ordered quantity can not be completely filled from all warehouses, this warehouse will be used to fill any 'unfulfillable' quantity.",
                    "default_warehouseid": "4",
                    "default_warehouse_name": "Secondary Warehouse (West)",
                    "default_warehouse_identifier": "secondary",
                    "default_bin_location": null,
                    "default_drop_shipper_id": null
                },
                {
                    "event": "Inventory Quantity Adjustment",
                    "quantity_in_warehouse_before_process": "758",
                    "quantity_to_process_at_warehouse": 0,
                    "quantity_left_to_process_from_ordered_amount": "24",
                    "warehouseid": "4",
                    "warehouse_name": "Secondary Warehouse (West)",
                    "warehouse_identifier": "secondary",
                    "bin_location": null
                }
            ]
        },
        {
            "event": "Overflow Inventory Quantity Adjustment",
            "note": "Total ordered quantity could not be completely filled from all warehouses, the default warehouse (from Event: \"Default Warehouse\") is used to fill 'unfulfillable' quantity.",
            "quantity_to_process_at_warehouse": -24,
            "quantity_left_to_process_from_ordered_amount": 0,
            "warehouseid": "4",
            "warehouse_name": "Secondary Warehouse (West)",
            "warehouse_identifier": "secondary",
            "bin_location": null
        }
    ]
}

Authorization

Bearer token, sent in the Authorization header. Inherited from the collection.

Example Request

curl --location --request GET '{{api_url}}/shop/order/{{orderid}}/warehouse_routing_explanation' \
--header 'Authorization: Bearer {{auth_token}}'

Example Responses

Order Get Warehouse Routing Explanation

Request

curl --location --request GET 'https://example.com/api/admin/shop/order/104404/warehouse_routing_explanation' \
--header 'Authorization: Bearer YOUR_API_KEY'

Response 200 OK

{
    "sku": "8100327398",
    "product_name_in_system": null,
    "infiplex_order_id": 104404,
    "infiplex_product_id": "2259",
    "infiplex_sku_id": null,
    "order_ship_zip": "40219",
    "order_qty": "24",
    "forced_warehouse_id": 0,
    "process_events": [
        {
            "event": "Determine valid warehouses",
            "note": "All warehouses can be used"
        },
        {
            "event": "Initial processing started",
            "note": "We are processing a parent product"
        },
        {
            "event": "Search for Item Warehouses",
            "note": "1 possible warehouse(s) found for item."
        },
        {
            "event": "Valid Warehouse Found",
            "note": "Warehouse: Secondary Warehouse (West) being checked for processing inventory",
            "warehouseid": "4",
            "warehouse_identifier": "secondary",
            "child_events": [
                {
                    "event": "Zip Code Rules",
                    "note": "Not used for item. Warehouse will be used"
                },
                {
                    "event": "Default Warehouse",
                    "note": "This is the first valid warehouse found for item. If total ordered quantity can not be completely filled from all warehouses, this warehouse will be used to fill any 'unfulfillable' quantity.",
                    "default_warehouseid": "4",
                    "default_warehouse_name": "Secondary Warehouse (West)",
                    "default_warehouse_identifier": "secondary",
                    "default_bin_location": null,
                    "default_drop_shipper_id": null
                },
                {
                    "event": "Inventory Quantity Adjustment",
                    "quantity_in_warehouse_before_process": "758",
                    "quantity_to_process_at_warehouse": 0,
                    "quantity_left_to_process_from_ordered_amount": "24",
                    "warehouseid": "4",
                    "warehouse_name": "Secondary Warehouse (West)",
                    "warehouse_identifier": "secondary",
                    "bin_location": null
                }
            ]
        },
        {
            "event": "Overflow Inventory Quantity Adjustment",
            "note": "Total ordered quantity could not be completely filled from all warehouses, the default warehouse (from Event: \"Default Warehouse\") is used to fill 'unfulfillable' quantity.",
            "quantity_to_process_at_warehouse": -24,
            "quantity_left_to_process_from_ordered_amount": 0,
            "warehouseid": "4",
            "warehouse_name": "Secondary Warehouse (West)",
            "warehouse_identifier": "secondary",
            "bin_location": null
        }
    ]
}