1.  Abstract

This document is about the technical details and how you can use Ezishipping Warehouse API to create orders, lookup orders, search orders, stock count global level, stock count specific warehouse level. This document will illustrate how you can use our API technology to perform the above tasks.

2.  Before you start

You need to apply to get a username and key for Warehouse API access. Once your request is approved you will have Username, Key and Customer ID sent to you.

 

PLEASE NOTE:

Any API Integration should not have more than 2 API calls per min. Any accounts that exceed this limit may be notified, and any excessive calls may be blocked.

3.  What Language should I use?

This is a REST API service using Basic authentication method. You can use any language as long as it can make a Rest API call and basic authentication method can be used.

4.  Required Information

 

The client sends EziShipping a request in the following format and if it meets all the criteria the response will be in a JSON format with the tracking information.

The Request details are as below:

HTTP Methods POST
Authentication method Basic Auth
API URL
MRL Logistics
https://api.mrllogistics.com/v3.4/customers/{CustomerID}/orders/
API URL
Sampson Express
https://api.sampsonexpress.com.au/v3.4/customers/{CustomerID}/orders/

The below information will be provided to by the IT department when API access activates on your account.

  • API Username
  • API Key (Password)
  • Customer ID
  • Account Number
  • Account Name
  • Carrier Account Number

5.  Order API Request (Post)

 

Use below POST request to Create an Order in the warehouse via API.

 

Use below URL and below variables to submit your Order. Upon successful submission, the system will respond with your order number autogenerated by our system for that specific order you placed and the order status name and code.

Response will be in JSON.

Variable Description
{customer_id} This is the Customer ID provided to you by the carrier
{APIVersion} Type the API version your using to POST or GET
{accountNumber} Supplied by the carrier
{accountName} Supplied by the carrier
{warehouseAccountNumber} Supplied by the carrier
isDraft “Y”/ ”N”: send Y to send the order as a draft mode
requiredDate Date – Date Order should be processed
deliveryType CP for Customer Pickup

CCP Customer Carrier Pickup

If this field is not provided or its value is blank it will be defaulted to MRL.

pickupFromCompany Pickup company name (You can define the new address on the “Addresses” page on MRL portal)
ref1 Reference 1
ref2 Reference 2
addressCode Unique Address Code
Company Delivery Company Name
Contact Delivery Contact Name
Number Delivery Address Phone Number
address1 Delivery Address–Line 1
address2 Delivery Address–Line 2
suburb Delivery Address-Town
state Delivery Address-State
postcode Delivery Address-Postcode
email Delivery Email Address
sku Sku Code
qty Quantity
expiry Date, serial, other texts
instructions Delivery Instructions

6.  Sample API Request

{
    "accountNumber": "123456",
    "accountName": "Account Name",
    "warehouseAccountNumber": "ABC1234",
    "pickupFromCompany": "Sender Company",
    "requiredDate": "2020-02-01",
    "ref1": "ref1 test",
    "ref2": "ref2 test",
    "addressCode": "",
    "address1": "123 Test street",
    "suburb": "Sydney",
    "state": "NSW",
    "postcode": "2000",
    "company": "Company Name",
    "contact": "Contact",
    "number": "1300 123 456",
    "items": [{
            "sku": "Product1",
            "qty": 3,
            "expiry": "0"
        },
        {
            "sku": "Product2",
            "qty": 5,
            "expiry": "0"
        }
    ]
}

7.  Sample JSON Response

Below is an example of the response the system autogenerate. The response may differ in future should the API system be updated. See below highlighted in yellow.

{
    "success": true,
    "error": {
        "code": 0,
        "message": ""
    },
    "response": {
        "orderNo": "BVW12345",
        "orderDate": "2020-02-01",
        "accountNumber": "1234567",
        "accountName": "API Test",
        " pickupFromCompany ": " Sender Company",
        "warehouseAccountNumber": "ABC1234",
        "status": "Order Placed",
        "statusCode": "ORDPLC",
        "connote": "",
        "ref1": "123123",
        "ref2": "Af asfdasd",
        "requiredDate": "2020-02-01",
        "instructions": "",
        "address": {
            "addressCode": "",
            "address1": "123 street",
            "address2": "",
            "suburb": "Sydney",
            "state": "NSW",
            "postcode": "2000",
            "company": "asdasd",
            "contact": "asdsd",
            "number": "2323423",
            "email": ""
        },
        "items": [{
                "sku": "Product1",
                "productName": "Product 1 - TEST",
                "qty": "3",
                "expiry": "0"
            },
            {
                "sku": "Product2",
                "productName": "Product 2 - TEST",
                "qty": "5",
                "expiry": "0"
            }
        ]
    }
}
Field Description Max Size Type Comment Required Example Value
1.      Line Identifier 1 Char Value must be ‘W’ YES W for Warehouse
2.      API Version 6 Char Type the API version your using to POST or GET YES V2.2
3.      accountNumber 7 Integer Supplied by MRL Logistics. YES 6789141
4.      accountName 50 Char Supplied by MRL Logistics. YES Test Client
5.      warehouseAccountNumber 7 Char Supplied by MRL Logistics. YES WRH9141
6.      requiredDate 8 Date Date – Date Order should be processed YES 20140330
7.      Service Type N/A Char S-Standard

P-Priority

NO S
8.      pickupFromCompany Char Please see the below description (1) NO Sender COmpany
9.      Sender Ref 1 15 Char Customer Value Max 20 Char YES ORD671264
10.  Sender Ref 2 15 Char Customer Value Max 100 Char NO Inv12312
11.  addressCode 7 Char Unique Address Code Yes CLI3265
12.  Delivery Company Name 50 Char NO John Corp
13.  Delivery Contact Name 40 Char YES John Smith
14.  Delivery Address – Phone N/A Char Max 25 char NO 0299224466
15.  Delivery Address–Line 1 30 Char YES Tower Building
16.  Delivery Address–Line 2 30 Char NO level 4
17.  Delivery Address-Town 30 Char Suburb name YES MELBOURNE
18.  Delivery Address-State 3 Integer abbreviation YES VIC
19.  Delivery Address-Postcode 4 Integer 4 digits only YES 3000
20.  Delivery Email Address 60 Char Max 60 Char NO [email protected]
21.  Sku 10 Char Sku code YES MRB001
22.  Product name 20 Char Product name linked to the sku NO MARS BAR
23.  Qty 100 Integer Minimum 1 YES 20
24.  expiry Test Date, serial, other texts YES 0 for blank
25.  Instructions 40 Char Delivery Instrucions No Call prior to delivery

(1) Pickup company name (You can define the new address on the “Addresses” page on MRL portal). Please note The State of this address should be the same as Warehouse Account used on this query.

8.  Lookup Order API Request (Get)

 

Use below GET request to lookup an Order in the warehouse via API.

Use below URL to submit a GET Request and lookup an Order. Upon successful submission, the system will respond with your order number autogenerated by our system for that specific order you placed and the order status name and code.

 

GET URL:  
https://api.mrllogistics.com/{API VERSION}/customers/{CustomerId}/orders/{OrderNo}

 

SAMPLE GET URL:  
https://api.mrllogistics.com/v3.4/customers/330/orders/BVW67398

 

Response will be in JSON.

Sample Response:

{
    "success": true,
    "error": {
        "code": 0,
        "message": ""
    },
    "response": {
        "orderNo": "BVW67398",
        "orderDate": "2018-02-14",
        "accountNumber": "2715915",
        "accountName": "API Test",
        "warehouseAccountNumber": "WRH5916",
        "status": "Order Placed",
        "statusCode": "ORDPLC",
        "connote": "",
        "ref1": "123123",
        "ref2": "Af asfdasd",
        "requiredDate": "2018-02-15",
        "instructions": "",
        "address": {
            "addressCode": "",
            "address1": "123 street",
            "address2": "",
            "suburb": "Sydney",
            "state": "NSW",
            "postcode": "2000",
            "company": "asdasd",
            "contact": "asdsd",
            "number": "2323423",
            "email": ""
        },
        "items": [{
                "sku": "Product1",
                "productName": "Product 1 - TEST",
                "qty": "1",
                "expiry": "0"
            },
            {
                "sku": "Product2",
                "productName": "Product 2 - TEST",
                "qty": "1",
                "expiry": "0"
            }
        ]
    }
}

9.  SEARCH ORDER API REQUEST (GET)

 

Use below GET request to search Order in the warehouse via API using special parameters such as record number start and end, search by reference, search by order date period from and to. See below example.

 

Use below URL to submit a GET Request to Search an Order with specific request. Upon successful submission, the system will respond with your search results autogenerated by our system for that specific order criteria your searched.

 

 

GET URL:  

https://api.mrllogistics.com/{API Version}/customers/{Customer id}/orders/?recordStart={number}&recordEnd={number}&sortDir=[ASC/DESC]&SortBy={Field Name}&searchQuery=&searchBy=&orderDateStart={StartDate}&orderDateEnd={EndDate}

 

Sample GET URL:  

https://api.mrllogistics.com/v3.4/customers/330/orders/?recordStart=1&recordEnd=1000&sortDir=ASC&SortBy=ref1&searchQuery=&searchBy=&orderDateStart=2016-11-24&orderDateEnd=2018-02-17

 

 

Response will be in JSON.

Sample Response:

{
    "success": true,
    "error": {
        "code": 0,
        "message": ""
    },
    "response": {
        "total": "13",
        "recordStart": 1,
        "recordEnd": 2,
        "records": [{
                "row_number": "1",
                "orderNo": "BVW67414",
                "orderDate": "2018-02-14",
                "accountNumber": "2715915",
                "accountName": "API Test",
                "warehouseAccountNumber": "WRH5916",
                "status": "Order Placed",
                "statusCode": "ORDPLC",
                "connote": "",
                "ref1": "123123",
                "ref2": "Af asfdasd",
                "requiredDate": "2018-02-15",
                "instructions": "",
                "address": {
                    "addressCode": "",
                    "address1": "123 street",
                    "address2": "",
                    "suburb": "Sydney",
                    "state": "NSW",
                    "postcode": "2000",
                    "company": "asdasd",
                    "contact": "asdsd",
                    "number": "2323423",
                    "email": ""
                }
            },
            {
                "row_number": "2",
                "orderNo": "BVW67413",
                "orderDate": "2018-02-14",
                "accountNumber": "2715915",
                "accountName": "API Test",
                "warehouseAccountNumber": "WRH5916",
                "status": "Order Placed",
                "statusCode": "ORDPLC",
                "connote": "",
                "ref1": "123123",
                "ref2": "Af asfdasd",
                "requiredDate": "2018-02-15",
                "instructions": "instruct1",
                "address": {
                    "addressCode": "",
                    "address1": "123 street",
                    "address2": "",
                    "suburb": "Sydney",
                    "state": "NSW",
                    "postcode": "2000",
                    "company": "asdasd",
                    "contact": "asdsd",
                    "number": "2323423",
                    "email": ""
                }
            }
        ]
    }
}

10.  STOCK COUNT – AT GLOBAL LEVEL
API REQUEST (GET)

Use below GET request to get the latest stock count of all your sku’s in MRL Logistics warehouse locations through API call. It will provide a response with all the stock counts for all your sku’s in all MRL Logistics warehouse locations.

 

Use below URL to submit a GET Request Stock Count at Global Level. Upon successful submission, the system will respond with the following:
sku code, product name, threshold, On Hold, Balance, Warehouse Account Number,

Warehouse Code.

 

GET Request:

https://api.mrllogistics.com/v3.4/customers/{CustomerId}/stocks/

 

Sample GET Request:

https://api.mrllogistics.com/{API Version}/customers/330/stocks/

Sample Response:

{
    "success": true,
    "error": {
        "code": 0,
        "message": ""
    },
    "response": {
        "total": 2,
        "records": [
            {
                "sku": "Product1",
                "productName": "Product 1 - TEST",
                "threshold": "0",
                "onHold": "8",
                "balance": 492,
                "warehouseAccountNumber": null,
                "warehouse": null
            },
            {
                "sku": "Product2",
                "productName": "Product 2 - TEST",
                "threshold": "0",
                "onHold": "10",
                "balance": 890,
                "warehouseAccountNumber": null,
                "warehouse": null
            }
        ]
    }
}

STOCK COUNT – AT WAREHOUSE LEVEL
API REQUEST (GET)

Use below GET request to get the latest stock count in the selected warehouse via API using special parameters such as warehouse number to identify which warehouse you wish to get the stock count. It will provide a response with all the stock counts for all your sku’s in specific warehouse you have selected.

Use below URL to submit a GET Request Stock Count at Warehouse Account Level. Upon successful submission, the system will respond with the following:
sku code, product name, threshold, On Hold, Balance, Warehouse Account Number,

Warehouse Code, autogenerated by our system for that specific account.

 

Get Request:

http://api.mrllogistics.com/ {APIVersion}/customers/{customer_id}/stocks/{WarehouseId:WRHxxxx}

 

Sample Response Request:

https://api.mrllogistics.com/v2.8/customers/330/stocks/WRH5916

Response will be in JSON.

If you require any further information / assistance, please feel free to contact us through https://www.mrlglobal.com/contact-us/.