0% found this document useful (0 votes)
26 views

WMS API Specification

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

WMS API Specification

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Logistiko WMS API Specification v1.3.

WMS API Specification


Table of contents
1.First steps..........................................................................................................................................2
2.API Authorization.............................................................................................................................2
3.Making calls - general......................................................................................................................2
4.Response status.................................................................................................................................3
5.API nodes.........................................................................................................................................4
5.1.Shipping....................................................................................................................................4
5.2.Orders........................................................................................................................................5
5.2.1.Orders list..........................................................................................................................5
5.2.2.Order details......................................................................................................................7
5.2.3.Creating new order............................................................................................................9
5.2.4.Canceling an order..........................................................................................................11
5.3.Products...................................................................................................................................11
5.3.1.Products list.....................................................................................................................12
5.3.2.Adding product...............................................................................................................13
5.3.3.Editing a product.............................................................................................................14
5.3.4. Deleting product.............................................................................................................15
5.4.Damaged products..................................................................................................................15
5.4.1.Damaged products list.....................................................................................................15
5.5.Deliveries................................................................................................................................16
5.5.1.Deliveries list..................................................................................................................17
5.5.2.Delivery detail.................................................................................................................18
5.5.3.Creating delivery.............................................................................................................20
5.5.4.Canceling delivery..........................................................................................................20
5.6.Returns....................................................................................................................................21
5.6.1.Returns list and details....................................................................................................21
5.6.2. Creating returns..............................................................................................................24
5.6.3. Canceling a return..........................................................................................................25
5.7.Products sets...........................................................................................................................26
5.7.1.Products sets list.….……................................................................................................26
5.7.2.Products set details..……................................................................................................27
6.Multiple warehouses.......................................................................................................................28
7.Appendix A – Errors.......................................................................................................................29

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}";

3.Making calls - general


To retrieve data from API you must specify three more things besides user authorization mentioned
above:
• Request method – one of POST, GET, PUT, DELETE
• Request URL – all available URL are described in following section of this document
• Request parameters – allowed and required parameters are described in following section of
this document.

2 / 29
Logistiko WMS API Specification v1.3.6

Complete API call in PHP example:


$_domain = "api.logistiko.pl";
$_url = '';
$_method = 'GET';
$_params = [];

$privateKey = 'users_private_key';
$publicKey = 'users_public_key';

$curl = curl_init("https://{$_domain}/{$_url}");
$data_string = json_encode($_params);
$encoded = md5($privateKey.$data_string);

curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $_method);


curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
"Content-type: application/json",
"Authorization: WMS {$publicKey}:{$encoded}",
"Content-Length: " . strlen($data_string),
));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_VERBOSE, false);

$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
]
]
];

• country – destination country code according to http://pl.wikipedia.org/wiki/ISO_3166-1


• package – package code: parcel, europallet or halfeuropallet
• npid – systems internal identification code
Response contains shipping methods available for given destination along with their prices and
delivery times. Example:

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
)
...
)
)

All available delivery methods:


• personal_collection – Personal collection
• dpdclassic – DPD Classic
• upsstandard – UPS Standard
• upsexpresssaver – UPS Express Saver
• kexstandard – K-EX Standard
• dhlstandard – DHL Standard
• akpallet – ET Logistik
• fedex – FedEx

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.2.1. Orders list


$_method = 'GET';

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,
]
];

All parameters are optional.

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
)
)

• tracking_number – couriers tracking number for package containing that order


• reference – users identification code
• npid – systems internal identification code

6 / 29
Logistiko WMS API Specification v1.3.6

• status – one of the following:


◦ submited
◦ completing
◦ canceled
◦ closed
◦ draft
◦ arrived
◦ verification
5.2.2. Order details
To retrieve specified information about an order provide its NPID or REFERENCE NUMBER in
params.

$_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
)
)
...
)
)
...
)
)
)

• tracking_number – couriers tracking number for package containing that order


• npid – systems internal identification code
• status – one of the following:
8 / 29
Logistiko WMS API Specification v1.3.6

◦ 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
],
]
]

Response contain created orders NPID. Example:


Array(
[Response] => Array(
[Order] => Array(
[npid] => 'a1b2c3d4'
[created] => '2014-08-01 12:34:56'
)
)
)
• reference – users identification code
• npid – systems internal identification code
• Shipping.method – shipping method allowed for recipients address. Can be obtained using
Shipping Node.

10 / 29
Logistiko WMS API Specification v1.3.6

• Shipping.package – package code: parcel, europallet or halfeuropallet


• Products.[N].Product.npid – products npid code. Can be obtained using Products Node
• Service – contains list of special services assigned to created order. Availability of special
services differes depending on customer, shipping method and many others. Please contact
Logistiko support for details. Example values are as follow:
◦ rod – Return of documents
◦ saturday – delivery on saturday
• Products.is_damaged – Should be set to ‘true’ if order being created contains any damaged
products.

5.2.4. Canceling an order


To cancel an order you must provide its npid or reference number.
Only new orders can be canceled.

$_method = 'DELETE';

$_params = [
'Order' => [
'reference' => 'a1b2c3d4',
'npid' => null,
],
]

• reference – users identification code


• npid – systems internal identification code

Response contains only status code of this operation.

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,
]
];

All params are optional.


If unidentified param is set to 1 only not identified products are listed. Otherwise only
identified are.

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

5.3.2. Adding product


To add new product to users stock specify its name and value.

$_method = 'POST';

$_params = [
'Product' => [
'name' => 'Socks, blue', // required
'value' => 4.50, // float required
'barcode' => '98765421',
'code' => 'socks_blue,
'description' => 'Blue socks’,
]
];

• code – users identification code for this products


Response contains new created products params. Example:
13 / 29
Logistiko WMS API Specification v1.3.6

Array(
[Response] => Array(
[Product] => Array(
[npid] => 'zxywu'
[name] => 'Socks, blue',
[code] => 'socks_blue',
[barcode] => '98765421',
[value] => 4.50 // in PLN
)
)
)

• npid – systems internal identification code


• code – users identification code for this products

5.3.3. Editing a product


To edit an existing product provide its npid number along with new values. You must provide at
least one value.

$_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
)
)
)

• npid – systems internal identification code


• code – users identification code for this products

14 / 29
Logistiko WMS API Specification v1.3.6

5.3.4. Deleting product


To delete a product provide its npid number in parameters.

$_method = 'DELETE';

$_params = [
'Product' => [
'npid' => 'products_npid', // required
],
]

• npid – systems internal identification code

Response contains only status code for this operation.


Array(
[Response] => Array(
[status] => 'OK'
)
)

5.4. Damaged products


Damaged products node allows listing of damaged products. When damaged product is returned by
buyer it's not put back to stock but is market as a damaged product instead and can't be bought
again.

$_url = 'damaged_products';

5.4.1. Damaged products list


$_method = 'GET';

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,
]
];

All params are optional.


Example resonse:

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
)
)
)

• npid – systems internal identification code


• code – users identification code for this products
• damaged_barcode – barcode on damaged product

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';

5.5.1. Deliveries list


$_method = 'GET';

$_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,
]
];

All params are optional.

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
)
];

• tracking_number – couriers tracking number for package containing that delivery


• reference – users identification code
• npid – systems internal identification code
• status – one of the following:
◦ submited
◦ completing
◦ canceled
◦ closed
◦ draft
◦ arrived
◦ verification
5.5.2. Delivery detail
To retrieve specified information about a delivery provide its NPID or REFERENCE NUMBER in
params.

$_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

• reference – users identification


• npid – systems internal identification code

5.5.3. Creating delivery


To create new delivery you must specify its date of arrival (in 'Y-m-d' format) and reference
number. All other params are optional.

$_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

5.5.4. Canceling delivery


To cancel a delivery provide its NPID in params.

$_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';

5.6.1. Returns list and details


Differently than in other nodes in returns list and details are obtained using the same parameters
with only detailed set to true or false. Detailed response contains additional product list and files
list.

$_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,
]
];

• reference – users identification


• tracking_number – couriers tracking number for package containing that return
• parent_tracking_number – couriers tracking number for parent order package
• npid – systems internal identification code
• parent_npid – systems internal identification code for parent order
• status – one of the following:
◦ submited
◦ completing
◦ canceled
◦ closed
◦ draft
◦ arrived
◦ verification

Example list response:

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
)
...
)
)
)
)
)

5.6.2. Creating returns


To create new return specify an order from which products are being returned along with products

24 / 29
Logistiko WMS API Specification v1.3.6

list and the reason of that return.

$_method = 'POST';

$_params = [
'Return' => [
'npid' => 'a1b2c3d4',
'reason' => 'I hate the color',
'reference' => 'return-321',
'date' => '2015-02-27',
],
'Products' => [
[
'npid'=>'zxyw',
'count'=>2
],
// …
],
];

• reference – users identification


• npid – systems internal identification code for parent order

Response contain NPID of newly created return


Array(
[Response] => Array(
[Return] => Array(
[npid] => a1b2c3d4
)
)
)

5.6.3. Canceling a return


To cancel a return you must provide its NPID in params.

$_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'
)
)

5.7 Products sets


Products sets section of Logistiko WMS allows managing of all users products sets.

$_url = 'products-set';

5.7.1 Products sets list

$_method = 'GET';

$_params = [
‘Product’ => product_barcode, // containing product
‘ProductsSet’ => [
‘code’ => xyz
],
‘Paging’ => [
‘page’ => 1,
‘per_page’ => 10
]
];

All parameters are optional.

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)’,
...
)
)
...
)
)
)

5.7.1 Products set details


To retrieve specified information about a products set provide its code in url

$_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

Warehouse_code must be one of the following:

WAREHOUSE_CODE Warehouse address


KUTNO-1 Grunwaldzka 5A, Kutno
KUTNO-2 Grunwaldzka 5A, Kutno– Customs warehouse
KUTNO-3 Grunwaldzka 5A, Kutno– Tax warehouse

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.

[API_0] => Unknown error occurred


[API_1] => Invalid parameters
[API_2] => Error while creating delivery
[API_3] => Delivery cancellation failed
[API_4] => Delivery not found %s
[API_5] => Delivery planned for %s
[API_6] => Delivery is in progress. Can not be deleted
[API_7] => Invalid shipping method
[API_8] => File name is not defined
[API_9] => Insufficient stock count of product %s (%s)
[API_10] => Allekurier Error: %s
[API_11] => Error while creating order
[API_12] => Product not found: %s
[API_13] => Order not found
[API_14] => Order cancellation failed
[API_15] => Product with barcode %s already exists
[API_16] => Product does not exist
[API_17] => Product could not be deleted
[API_18] => Error while creating return
[API_19] => Return cancellation failed
[API_20] => Return not found %s
[API_21] => Return planned for %s
[API_22] => Return is in progress. Can not be deleted
[API_23] => Invalid product params
[API_24] => Allekurier connection error
[API_25] => Delivery history not found
[API_26] => Error while replacing file
[API_27] => Products set not found
[API_28] => File %s has invalid type
[API_29] => Only one invoice per order is allowed

Explanation:
[API_9] code is followed by two params: products barcode and products code

29 / 29

You might also like