Batch Pick API

The RESTful API groups customer orders into batches and generate pick list for each batch. For the API to work properly, create a warehouse profile to obtain API key and warehouse ID, and configure layout. To familiarize with the API features, you may use the online picker in your warehouse profile for testing.

Pick requests are stored for 48 hours before automatic deletion.

Hash Types

The common hash types referenced in the API are:

Item Hash
sku
string
Item SKU.
name
string, optional
Item name.
qty
integer, optional
default 1
Item quantity.
weight
float, optional
default 0.0001
The weight of each unit of item.
weightUnit
string, optional
default lb
The weight unit of item is "kg", "g", "oz" or "lb".
dimensions
list, optional
default length 0.0001
default width 0.0001
default height 0.0001
A list of dimension hashes. Each dimension hash has attributes:
length
float
Item length.
width
float
Item width.
height
float
Item height.
Maximum 2 dimension hashes allowed.
dimensionUnit
string, optional
default in
The dimension unit of item is "m", "cm", "mm", "ft" or "in".
shelf
string
Shelf ID as defined in warehouse layout where item is stored.
level
string, optional
Shelf Level where item is stored.
position
string, optional
Position where item is stored at shelf level.
barcode
string, optional
Barcode of item.
barcodeType
string, optional
Barcode type is "upc", "code_39", "code_128", "ean_8", "ean_13", "itf", "upc_a" or "upc_e".
Order Hash
id
string
Customer order ID must consist of alphanumeric, underscore or minus character.
items
list
A list of item hashes describing items in the customer order.
Pick Cart Hash
zone
string
Assigned zone for pick cart.
maxBins
integer
Number of pick bins for pick cart.
maxWeight
float
Max weight allowed by each pick cart bin.
weightUnit
string
The weight unit of item is "kg" or "lb".
maxVolume
float
Max cubic volume allowed by each pick cart bin.
volumeUnit
string
The dimension unit of item is "m", "ft" or "in".
Pick Request Hash
id
string
Pick request ID assigned by system.
status
string
Request status is "processing", "ready" or "error".
messages
list, optional
A list of status messages of type string.
batches
list
A list of batches. Each batch is a list of zone batch hashes.
distance
integer
Total pick route distance for all batches.
Pick Shelf Hash
shelf
string
Shelf ID to pick items from.
items
list
A list of item hashes. Each hash has attributes:
level
string, optional
Shelf level.
position
string, optional
Shelf level position.
barcode
string, optional
Barcode.
barcodeType
string, optional
Barcode type.
sku
string
Item SKU.
name
string
Item name.
qty
integer
Quantity to pick.
order
string
Order ID to which item belongs.
bin
list
Cart bin indices (comma separated) to place item to.
Status Hash
success
boolean
Status of API request.
messages
list
List of messages of type string.
Zone Batch Hash
id
string
Batch ID.
zone
string
Pick zone.
picking
list
A list of up to 99 pick shelf hashes ordered by route visit.
distance
integer
Pick route distance for the batch.
orders
list
A list of order IDs and assigned cart bins.
id
string
Order ID.
bins
list
List of integer indices.
complete
boolean
All items are picked after this batch for this order.
map
string
URI of pick route image.
Create a Batch Pick Request

Create a non-blocking request to generate pick lists for customer orders.

URI
http(s)://api.solvingmaze.com/pick/key/API_KEY/warehouse/WAREHOUSE_ID
Input Parameters
batchSize
integer
Maximum number of orders in a batch or pick list.
pickCarts
list, optional
A list of pick cart hashes describing pick cart for each pick zone.
orders
list
A list of maximum 300 order hashes describing customer orders.
Output Parameters
status
API request status and messages.
Pick request ID and status.
Input Example
 {
    "batchSize": 10,
    "pickCarts": [
	{
	    "zone": "A",
	    "maxBins": 1,
	    "maxWeight": 100,
	    "weightUnit": "lb",
	    "maxVolume": 75,
	    "volumeUnit": "ft"
	}
    ]
    "orders": [
	{
	    "id": "order-1",
	    "items": [
		{
		    "sku": "item1",
		    "shelf": "A-10-W",
		    "qty": 1,
		    "weightUnit": "lb",
		    "weight": 0.5,
		    "dimensionUnit": "in",
		    "dimensions": [
                        {
                            "length": 8,
                            "width": 7,
                            "height": 6
                        }
                    ]
		}
	    ]
	}
    ]
 }
Output Example
 {
    "status": {
	"success": true,
	"messages": ["Data saved succesfully."]
    },
    "request": {
	"id": "pick_68744279",
	"status": "processing"
    }
 }
Retrieve a Batch Pick Request

Retrieve the status and output of a pick request with given ID.

URI
http(s)://api.solvingmaze.com/pick/key/API_KEY/warehouse/WAREHOUSE_ID/request/REQUEST_ID
Output Parameters
status
API request status and messages.
Pick request ID and status. Pick lists are included in the hash if pick status is "ready".
Output Example
 {
    "status": {
	"success": true,
	"messages": []
    },
    "request": {
	"id": "pick_68744279",
	"status": "ready"
	"distance": 378,
	"batches":
            [
                [
		    {
			"id": "0",
                        "zone": "A",
			"picking": [
			    {
				"shelf": "H",
				"items": [
				    {
					"sku": "item1",
					"qty": 2,
                                        "order": "order-1",
                                        "bin": [0, 1]
				    }
			        ]
		            },
			    {
				"shelf": "K",
				"items": [
				    {
					"sku": "item2",
					"qty": 1,
                                        "order": "order-2",
                                        "bin": [2]
				    }
				]
			    }
			],
			"orders": [
                            {
                                "id": "order-1",
                                "bins": [0, 1],
                                "complete": false
                            },
                            {
                                "id": "order-2",
                                "bins": [2],
                                "complete': true
                            }
                        ],
		    	"map": "solvingmaze.com/resource/type/pick_map/id/100-batch-0-zone-A-route.jpg"
		    },
		    {
			"id": "0",
                        "zone": "B",
		    	"picking": [
			    {
			    	"shelf": "M",
				"items": [
				    {
					"sku": "item3",
				    	"qty": 1,
                                        "bin": [0],
                                        "order": "order-1",
				    }
				]
			    }
			],
			"orders": [
                            {
                                "id": "order-1",
                                "bins": [0],
                                "complete": true,
                            }
                        ],
			"map": "solvingmaze.com/resource/type/pick_map/id/100-batch-0-zone-B-route.jpg"
		    }
                ],
                [
    		    {
			"id": "1",
                        "zone": "A",
			"picking": [
			    {
				"shelf": "K",
				"items": [
				    {
					"sku": "item7",
					"qty": 2,
                                        "bin": [0],
                                        "order": "order-3",
				    }
				]
			    }
			],
			"orders": [
                            {
                                "id": "order-3",
                                "bins": [0],
                                "complete": true,
                            }
                        ],
			"map": "solvingmaze.com/resource/type/pick_map/id/100-batch-1-zone-A-route.jpg"
		    }
                ]
	    ]
    }
}
List Batch Pick Requests

List all pick request IDs and their statuses.

URI
http(s)://api.solvingmaze.com/pick/key/API_KEY/warehouse/WAREHOUSE_ID
Output Parameters
status
API request status and messages.
requests
list
A list of pick request hashes. Each hash contains pick request ID and status.
Output Example
 {
    "status": {
	"success": true,
	"messages": []
    },
    "requests": [
	{
	    "id": "pick_43468534",
	    "status": "processing"
	},
	{
	    "id": "pick_68744279",
	    "status": "ready"
	}
    ]
 }
Code Examples:   PHP

The following code creates a pick request. It assumes shelf A-10-M is defined in warehouse layout.

<?php

// customer orders
$orders = array();
$orders[] = array(
	'id' => 'order1',
	'items' => array(
		array(
			'sku' => 'item1',
			'name' => 'A Book',
			'qty' => 2,
			'shelf' => 'A-10-M',
			'weightUnit' => 'lb',
			'weight' => 0.5,
			'dimensionUnit' => 'in',
			'dimensions' => array(
                            array(
                                'length' => 8,
                                'width' => 7,
                                'height' => 6
                            )
                        )
		)
	)
);

// pick carts
$pickCarts = array();
$pickCarts[] = array(
    'zone' => 'A',
    'maxBins' => 1,
    'maxWeight' => 100,
    'maxVolume' => 75,
    'weightUnit' => 'lb',
    'volumeUnit' => 'ft',
);

// submit pick request
$ch = curl_init("http://api.solvingmaze.com/pick/key/$apiKey/warehouse/$warehouseId");
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_POST, true);
$params = array(
	'batchSize' => 10,
	'orders' => $orders,
        'pickCarts' => $pickCarts
);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);

// print response
echo $response . "\n";

?>

The following code retrieves a pick request.

<?php

// retrieve pick request
$uri = "http://api.solvingmaze.com/pick/key/$apiKey/warehouse/$warehouseId/request/$requestId";
$ch = curl_init($uri);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);

// parse response
$responseJson = json_decode($response, true);
if ($responseJson['request']['status'] == 'ready') {

    // print pick batches
    foreach ($responseJson['request']['batches'] as $batch) {
        foreach ($batch as $zoneBatch) {
            $batchId = $zoneBatch['id'];
            $zone = $zoneBatch['zone'];
            echo "Batch $batchId Zone $zone:\n";

            // print pick item and location
            foreach ($zoneBatch['picking'] as $pick) {
                $shelf = $pick['shelf'];
                foreach ($pick['items'] as $pickItem) {
                    $sku = $pickItem['sku'];
                    $qty = $pickItem['qty'];
                    echo " pick $qty pcs of item#$sku from $shelf\n";
                }
            }
        }
    }
}

?>


UPS, FedEx, DHL, Spee-Dee, USPS, Shopify trademarks are property of their respective owners.
SolvingMaze Ltd, Company No. 11016672, Copyright © 2024  
    Contact  -  FAQ  - Knowledge Base  -  Terms Of Service  -  Privacy Policy