WMS API Specification
WMS API Specification
1 / 29
Logistiko WMS API Specification v1.3.6
1.First steps
WMS API allows developers to connect their applications to LogistikoWMS. Data transferred both
ways is JSON-formatted which makes it easily accessible in vast majority of programming
languages.
API calls are invoked using HTTPS requests to a specific node.
Available API nodes:
• Shipping
• Orders
• Products
• Damaged Products
• Returns
• Deliveries
• Products sets
2.API Authorization
WMS API uses header authorization method. Every call must have 'Authorization' header set in
folowing format:
Authorization: WMS PUBLIC_KEY:SECURITY_STRING
where SECURITY_STRING is MD5 checksum of users private key and calls JSON params
MD5(PRIVATE_KEY + JSON)
PHP Example:
$privateKey = 'users_private_key';
$publicKey = 'users_public_key';
$_params = ['param'=>'value'];
$data_string = json_encode($_params);
$security = md5($privateKey.$data_string);
$header = "Authorization: WMS {$publicKey}:{$security}";
2 / 29
Logistiko WMS API Specification v1.3.6
$privateKey = 'users_private_key';
$publicKey = 'users_public_key';
$curl = curl_init("https://{$_domain}/{$_url}");
$data_string = json_encode($_params);
$encoded = md5($privateKey.$data_string);
$response = curl_exec($curl);
curl_close($curl);
Variables
• $_url – API Node
• $_method – method in API Node
• $_params – request parameters
have values specified in each of nodes descriptions. Just replace their values in script above to make
a valid API call.
4.Response status
Every API call returns operation status along with other data specific to each node.
Example:
Array(
[Response] => Array(
[NODE] => NodeResponse,
[status] => 'OK'
)
)
When error occurs response contains only status code and error text content. Example error
response:
3 / 29
Logistiko WMS API Specification v1.3.6
Array(
[Response] => Array(
[status] => 'ERROR',
[error] => 'Error content',
[errorCode] => 'API_ERROR_CODE',
[params] => [param1, ...],
)
)
Error – contains a format string of error content. List of errors with corresponding errorCodes can
be found in Appendix A
Params – array of format strings arguments in order of appearance.
5.API nodes
All examples here are prepared to work with with API Call example in paragraph 2.
5.1. Shipping
Shipping node is responsible for checking shipping rates for order packages being prepared.
To price a shipping you must provide all destination parameters along with products being shipped.
$_url = 'shipping';
$_method = 'GET';
$_params = [
'Shipping' => [
'postal' => '03-980',
'country' => 'PL',
'package' => 'parcel',
'code' => 'parcel', // alias for package field. DEPRECATED
],
'Products' => [
[
'npid' => 'zxyvw',
'quantity' => 4
]
]
];
4 / 29
Logistiko WMS API Specification v1.3.6
Array(
[Response] => Array(
[Shipping] => Array(
[0] => Array(
[delivery_method] => 'ups'
[name] => 'UPS Service'
[time] => 1 // in workdays
[net_price] => 15.24 // in PLN
[gross_price] => 18.75 // in PLN
)
...
)
)
5.2. Orders
Orders section of LogistikoWMS represents all shipments from WMS User to his/hers clients.
Orders node allows to list User orders, retrieve detailed order info, create new ones and cancel
created orders.
$_url = 'orders';
5 / 29
Logistiko WMS API Specification v1.3.6
$_params = [
'Orders' => [
'date_from' => '2014-12-30',
'date_to' => '2014-12-31,
'draft_date_from' => '2015-01-01',
'draft_date_to' => '2015-01-31',
'status' => closed,
'tracking_number' => '0123456789',
'name' => 'John Doe',
'comment' => 'Warning! Glass!',
],
'Paging' => [
'page' => 1,
'per_page' => 5,
]
];
Example response:
Array(
[Response] => Array(
[Orders] => Array(
[0] => Array(
[Order] => Array(
[npid] => 'abcdefgh',
[status] => 'closed',
[date] => '2014-12-31',
[draft-date] => '2015-01-05',
[reference] => 'ORDERNO1234567890',
[recipient_name] => 'John Doe',
[tracking_number] => '0123456789',
[count] => 1,
[draft_count] => 1
)
)
[1] => Array(
[Order] => Array(...)
)
...
)
[Paging] => Array(
[total] => 1234
[count] => 5
)
)
[Params] => Array(
RequestParamsArray
)
)
6 / 29
Logistiko WMS API Specification v1.3.6
$_method = 'GET';
$_params = [
'Orders' => [
'npid' => 'abcdefghi',
'reference' => null,
]
];
Example response:
7 / 29
Logistiko WMS API Specification v1.3.6
Array(
[Response] => Array(
[Orders] => Array(
[0] => Array(
[Order] => Array(
[npid] => 'abcdefghi',
[status] => 'closed',
[tracking_number] => '0123456789',
[date] => '2014-12-31',
[draft_date] => '2015-01-05',
[expire_at] => '2015-01-08 12:34:56',
)
[Delivery] => Array(
[name] => 'UPS-Express',
[address] => '10 Second Street'
[postal] => 'CA 90210'
[city] => 'Beverly Hills'
[country_code] => 'US'
[weight] => '9' // kilograms
)
[Products] => Array(
[0] => Array(
[Product] => Array(
[npid] => 'zxyw'
[name] => 'Socks, one pair, black'
[barcode] => '01298348'
[serial_numbers] => Array(
[0] => '123456'
[1] => '121212'
...
)
[count] => 1
)
...
[DraftProducts] => Array(
[0] => Array(
[Product] => ProductDetailsArrayAsInProducts
)
...
[Service] => Array(
[rod] => 1,
[saturday] => 1
...
[Packages] => Array(
[0] => Array(
[Package] => Array(
[number] => 000000000123456,
[weight] => 0.2 // kilograms
)
)
...
)
)
...
)
)
)
◦ submited
◦ completing
◦ canceled
◦ closed
◦ draft
◦ arrived
◦ verification
5.2.3. Creating new order
To create a new order you must provide all its details in params.
To attach files to order provide file content encoded using base64 and its name.
When order is created for personal collection only name and reference params are required in
Order section.
$_method = 'POST';
9 / 29
Logistiko WMS API Specification v1.3.6
$_params = [
'Order' => [
'name' => 'John Doe', // required
'reference' => 'ORDER987654321', // required
'address' => '11 Second Street'
'zip' => 'CA 90210',
'city' => 'Beverly Hills',
'country' => 'US',
'message' => 'Caution! Glass!', // optional
'phone' => '+48123456789', // optional
'email' => '[email protected]', // optional
'cod' => '1.23', // optional in PLN
'insurance' => '1.23', // optional in PLN
'expire_at' => '2015-01-20 18:00:00' // date as 'Y-m-d H:i:s'
],
'Shipping' => [
'method' => 'ups_express',
'package' => 'package'
],
'Service' => [
'rod',
'saturday',
],
'Products' => [
[
'npid'=>'zxyw', // Product npid or ProductsSet code
'count'=> 2,
'is_damaged'=> 1 //only when making an order with damaged product
],
],
'Files' => [ // optional
[
'content' => base64_encoded_file_content,
'name' => 'file_name'
'type' => 'invoice' // only for UPS export, one per order is allowed
],
]
]
10 / 29
Logistiko WMS API Specification v1.3.6
$_method = 'DELETE';
$_params = [
'Order' => [
'reference' => 'a1b2c3d4',
'npid' => null,
],
]
Array(
[Response] => Array(
[status] => 'OK'
)
)
5.3. Products
Products section of Logistiko WMS represents all products available in stock.
Products node allows listing, adding and editing of products in user stock.
When product arrives to warehouse and it doesn't match any product listed in delivery it marked as
unidentified.
11 / 29
Logistiko WMS API Specification v1.3.6
$_url = 'products';
5.3.1.Products list
$_method = 'GET';
$_params = [
'Products' => [
'npid' => 'zxyw',
'name' => 'Socks, one pair, black',
'barcode' => '01298348',
'code' => 'socks_black',
'unidentified' => false,
],
'Paging' => [
'page' => 1,
'per_page' => 5,
]
];
Example response:
12 / 29
Logistiko WMS API Specification v1.3.6
Array(
[Response] => Array(
[Products] => Array(
[0] => Array(
[Product] => Array(
[npid] => 'zxyw'
[name] => 'Socks, one pair, black',
[code] => 'socks_black',
[barcode] => '01298348',
[value] => 5.00 // in PLN
[quantity] => 12
[product_in_warehouse] => Array(
[0] => Array(
[warehouse_name] => 'Ożarów',
[quantity] => 8
)
) ...
)
[Files] => Array(
[0] => 'https://klient.logistiko.pl/product/zxyw/scan.pdf'
...
)
[Photos] => Array(
[0] => 'https://klient.logistiko.pl/product/zxyw/image.jpg'
) ...
)
)
...
[Paging] => Array(
[total] => 1234
[count] => 5
)
)
)
• npid – systems internal identification code
• code – users identification code for this products
$_method = 'POST';
$_params = [
'Product' => [
'name' => 'Socks, blue', // required
'value' => 4.50, // float required
'barcode' => '98765421',
'code' => 'socks_blue,
'description' => 'Blue socks’,
]
];
Array(
[Response] => Array(
[Product] => Array(
[npid] => 'zxywu'
[name] => 'Socks, blue',
[code] => 'socks_blue',
[barcode] => '98765421',
[value] => 4.50 // in PLN
)
)
)
$_method = 'PUT';
$_params = [
'Product' => [
'npid' => 'zxywu' // required
'name' => 'Socks, light blue',
'value' => 4.60, // float
'code' => 'socks_lblue,
'description' => 'Blue socks’,
]
];
Example response:
Array(
[Response] => Array(
[Product] => Array(
[npid] => 'zxywu'
[name] => 'Socks, light blue',
[code] => 'socks_lblue',
[barcode] => '98765421',
[value] => 4.60 // in PLN
)
)
)
14 / 29
Logistiko WMS API Specification v1.3.6
$_method = 'DELETE';
$_params = [
'Product' => [
'npid' => 'products_npid', // required
],
]
$_url = 'damaged_products';
15 / 29
Logistiko WMS API Specification v1.3.6
$_params = [
'Products' => [
'npid' => 'abcd',
'name' => 'Shirt',
'barcode' => '88888888',
'code' => 'shirt',
'damaged_barcode' => '888888881',
],
'Paging' => [
'page' => 1,
'per_page' => 5,
]
];
Array(
[Response] => Array(
[Products] => Array(
[0] => Array(
[Product] => Array(
[npid] => 'zxyw'
[name] => 'Socks, one pair, black',
[code] => 'socks_black',
[barcode] => '01298348',
[damaged_barcode] => '888888881'
[value] => 5.00 // in PLN
[quantity] => 12
)
[Files] => Array(
[0] => 'https://klient.logistiko.pl/product/zxyw/image.jpg
...
)
)
...
)
[Paging] => Array(
[total] => 12
[count] => 5
)
)
)
5.5. Deliveries
Deliveries section of Logistiko WMS is responsible for managing any deliveries of products to
warehouse. When product arrives to our warehouse it's put on its place and its quantity in users
16 / 29
Logistiko WMS API Specification v1.3.6
stock is increased.
$_url = 'deliveries';
$_params = [
'Deliveries' => [
'date_from' => '2014-12-30',
'date_to' => '2014-12-31,
'draft_date_from' => '2015-01-01',
'draft_date_to' => '2015-01-31',
'status' => closed,
'tracking_number' => 0123456789,
'name' => 'John Doe',
'comment' => 'Warning! Glass!',
],
'Paging' => [
'page' => 1,
'per_page' => 5,
]
];
Example response:
17 / 29
Logistiko WMS API Specification v1.3.6
Array(
[Response] => Array(
[Deliveries] => Array(
[0] => Array(
[Delivery] => Array(
[npid] => 'abcdefgh',
[status] => 'closed',
[date] => '2014-12-31',
[draft-date] => '2015-01-05',
[tracking_number] => 'asadfsdfasdfas'
[delivery_method] => 'courier'
[delivery_details] => 'Drivers name'
[count] => 3
[draft_count] => 3
[damaged_count] => 0
[unidentified_count] => 0
[is_damaged] => false
)
)
[1] => Array(
[Delivery] => DeliveryDataArray
)
...
)
[Paging] => Array(
[total] => 1234
[count] => 5
)
];
$_method = 'GET';
18 / 29
Logistiko WMS API Specification v1.3.6
$_params = [
'Deliveries' => [
'npid' => 'abcdefgh',
'reference' => null,
]
];
Example response:
Array(
[Response] => Array(
[Deliveries] => Array(
[0] => Array(
[Delivery] => Array(
[npid] => 'abcdefgh',
[name] => 'New delivery',
[status] => 'closed',
[date] => '2014-12-31',
[draft-date] => '2015-01-05',
[tracking_number] => 'asadfsdfasdfas'
[damaged_count] => 0
[is_damaged] => false
)
[Files] => Array(
[0] =>'https://klient.logistiko.pl/delivery/abcdefgh/file.jpg'
...
)
[Products] => Array(
[0] => Array(
[Product] => [Product] => Array(
[npid] => 'zxyw'
[name] => 'Socks, one pair, black',
[code] => 'socks_black',
[barcode] => '01298348',
[quantity] => 12
)
[Files] => Array(
[0] => 'https://klient.logistiko.pl/product/zxyw/scan.pdf
...
)
[Photos] => Array(
[0] => 'https://klient.logistiko.pl/product/zxyw/image.jpg
...
)
)
...
[DraftProducts] => Array(
[0] => Array(
[Product] => ProductDetailsArray
[Files] => ProductFilesArray
...
)
)
)
)
)
• tracking_number – couriers tracking number for package containing that delivery
19 / 29
Logistiko WMS API Specification v1.3.6
$_method = 'POST';
$_params = [
'Delivery' => [
'date' => '2014-10-20', // required
'reference' => '', //required
'name' => 'Another Delivery',
'tracking_number' => 'UPS123456789',
'reference_details' => '',
'message' => 'Should be wrapped in green paper',
],
'Products' => [
[
'npid'=>'zxyw',
'count'=> 15
],
// …
]
]
Response
Array(
[Response] => Array(
[Delivery] => Array(
[npid] => a1b2c3d4
)
)
)
sdasfsadf
• tracking_number – couriers tracking number for package containing that delivery
• reference – users identification
• npid – systems internal identification code
• reference_detail – additional info describing delivery
$_method = 'DELETE';
20 / 29
Logistiko WMS API Specification v1.3.6
$_params = [
'Delivery' => [
'npid' => 'a1b2c3d4', // required
],
]
Response contains only of status code and error description if any errors occurred.
Array(
[Response] => Array(
[status] => 'OK'
)
)
5.6. Returns
Returns section of Logistiko WMS allows managing of all product returns from users client to user.
Every return is bound to a parent order.
$_url = 'returns';
$_method = 'GET';
21 / 29
Logistiko WMS API Specification v1.3.6
$_params = [
'Returns' => [
'parent_npid' => 'a1b2c3d4',
'date_from' => '2015-02-14',
'date_to' => '2015-02-15',
'draft_date_from' => '2015-02-20',
'draft_date_to' => '2015-02-25',
'status' => 'closed',
'reference' => '',
'tracking_number' => 'UPC987654321',
'parent_tracking_number' => 'UPC987654321',
'name' => '',
'reason' => 'Didn't fit',
'detailed' => true,
],
'Paging' => [
'page' => 2,
'per_page' => 10,
]
];
22 / 29
Logistiko WMS API Specification v1.3.6
Array(
[Response] => Array(
[Returns] => Array(
[0] => Array(
[Return] => Array(
[npid] => 'a1b2c3d4'
[status] => 'completed'
[date] => '2015-02-14'
[draft_date] => '2015-02-22'
[name] => 'John Doe'
[tracking_number] => 'UPC987654321'
[delivery_method] => 'courier'
[delivery_details] => ''
[count] => 1
[damaged_count] => 0
[is_damaged] => false
[reason] => 'Didnt fit'
)
[Order] => Array(
[npid] => 'abdefghi'
[tracking_number] => 'UPC123456789'
[reference] => 'order-1234'
[count] => 1
)
)
)
)
)
If detailed param is set to true then response contains detailed information about returns.
Example:
23 / 29
Logistiko WMS API Specification v1.3.6
Array(
[Response] => Array(
[Returns] => Array(
[0] => Array(
[Return] => Array(
[npid] => 'a1b2c3d4'
[status] => 'completed'
[date] => '2015-02-14'
[draft_date] => '2015-02-22'
[name] => 'John Doe'
[tracking_number] => 'UPC987654321'
[delivery_method] => 'courier'
[delivery_details] => ''
[count] => 1
[damaged_count] => 0
[is_damaged] => false
[reason] => 'Didn't fit'
)
[Order] => Array(
[npid] => 'abdefghi'
[tracking_number] => 'UPC123456789'
[reference] => 'order-1234'
[count] => 1
)
[Files] => Array(
[0] => 'https://klient.logistiko.pl/return/a1b2c3d4/file.jpg'
...
)
[Products] => Array(
[0] => Array(
[Product] => [Product] => Array(
[npid] => 'zxyw'
[name] => 'Socks, one pair, black',
[code] => 'socks_black',
[barcode] => '01298348',
[quantity] => 1
)
[Files] => Array(
[0] => 'https://klient.logistiko.pl/product/zxyw/image.jpg
...
)
)
...
[DraftProducts] => Array(
[0] => Array(
[Product] => ProductDetailsArray
[Files] => ProductFilesArray
)
...
)
)
)
)
)
24 / 29
Logistiko WMS API Specification v1.3.6
$_method = 'POST';
$_params = [
'Return' => [
'npid' => 'a1b2c3d4',
'reason' => 'I hate the color',
'reference' => 'return-321',
'date' => '2015-02-27',
],
'Products' => [
[
'npid'=>'zxyw',
'count'=>2
],
// …
],
];
$_method = 'DELETE';
$_params = [
'Return' => [
'npid' => 'a1b2c3d4', // required
],
]
Response contain only status code of this operation with error contents if any occurred.
25 / 29
Logistiko WMS API Specification v1.3.6
Array(
[Response] => Array(
[status] => 'OK'
)
)
$_url = 'products-set';
$_method = 'GET';
$_params = [
‘Product’ => product_barcode, // containing product
‘ProductsSet’ => [
‘code’ => xyz
],
‘Paging’ => [
‘page’ => 1,
‘per_page’ => 10
]
];
Example response:
26 / 29
Logistiko WMS API Specification v1.3.6
Array(
[Response] => Array(
[ProductsSets] => Array(
[code] => Array(
[Products] => Array(
[0] => ‘2 x product_name (product_barcode)’,
...
)
)
...
)
)
)
$_url = ‘products-set/code’;
$_method = ‘GET’;
Example response:
Array(
[Response] => Array(
[products] => Array(
[0] => Array(
[npid] => ‘zxyw’,
[code] => ‘123’,
[name] => ‘Product A’,
[quantity_in_set] => 10
)
...
),
[max_available_in_warehouse_quantity] => 4
)
)
27 / 29
Logistiko WMS API Specification v1.3.6
6.Multiple warehouses
When user stores his products in more than one of Logistikos warehouses additional header is
required to provide context of WMS API request. Specifying the context is NOT required when
only one warehouse is used.
Additional header must be set in following format:
Logistiko-Warehouse: WAREHOUSE_CODE
28 / 29
Logistiko WMS API Specification v1.3.6
7.Appendix A – Errors
Listing of error strings with corresponding errorCodes used in error response status.
Explanation:
[API_9] code is followed by two params: products barcode and products code
29 / 29