HL API solution offers a way to retrieve information about existing carts or to create new carts that will automatically be added to the Saved Carts page on the web store.

 

Get /Orders

This function returns the order history data including the order line details. The same functionality could be found on the web store in “My Account > Order History”.

Method

GET

Parameters

The following request parameters are available:

Parameter Required Description Type Data Type
dateFrom No Starting date from which the content will be returned. The following formats are supported ‘mm/dd/yyyy’ and ‘yyyy-mm-dd’. path string
dateTo No End date from which the content will be returned. The following formats are supported ‘mm/dd/yyyy’ and ‘yyyy-mm-dd’. path string
ordersNumbers No Filter the previous result by sale order IDs. IDs must be comma ‘,’ separated. For instance: “12345678,12345689” could be sent. path string
cartIds No Filter the previous result by cart IDs. IDs must be comma ‘,’ separated. For instance: “12345678,12345689” could be sent. path string
pageStartIndex No Refer to the Paging section. path string
pageSize No Refer to the Paging section. path string
language No Refer to the Common section. header String
callerName No Refer to the Common section. header String

HTTP Response Status Codes

Status Code Description
200 Success
204 No Content
400 Bad Request
500 Internal Server Error

Success Response

A list of orders will be returned.

[{
  "OrderId": 0,
  "AccountNo": "string",
  "OrderNumber": "string",
  "OrderDate": "2017-03-21T16:39:36.950Z",
  "OrderDateText": "string",
  "OrderDateHourText": "string",
  "StoreName": "string",
  "ShippingAddress": {
                      "Street": "string",
                      "City": "string",
                      "State": "string",
                      "PostalCode": "string"
                     },
  "CartName": "string",
  "PoNumber": "string",
  "LanguageId": "string",
  "OrderType": "string",
  "OrderStatus": "string" (Processing, Invoiced),
  "SubTotal": 0,
  "PaymentTerms": "string",
  "PaymentMethod": "string",
  "SubmittedBy": "string",
  "NumShipments": 0,
  "OrderLines": [{
                  "LineId": 0,
                  "VariantNo": "string",
                  "Description": "string",
                  "Qty": 0,
                  "NetPrice": 0,
                  "DisplayNetPrice": "string",
                  "Note": "string",
                  "NetAmount": 0,
                  "DisplayNetAmount": "string",
                  "KitVariantNo": "string",
                  "KitSeqNo": "string",
                  "LabelPrice": 0,
                  "LabelPriceFormatted": "string",
                  "DealerBarcode": "string"
                }]
}]

EXAMPLES

  • GET https://[HOST]/Orders/

Get /Orders/Tracking

This function returns carrier tracking numbers associated to orders that haven’t been shipped. The same functionality could be found on the web store in “My Account > Order History -> Track order”.

Method

GET

Parameters

The following request parameters are available:

Parameter Required Description Type Data Type
orderNumbers No Filter the previous result by sale order IDs. IDs must be comma ‘,’ separated. For instance: “12345678,12345689” could be sent. path string
cartIds Yes Filters the results by cart IDs. IDs must be comma ‘,’ separated. For instance: “123456,123457” could be sent. path string
pageStartIndex No Refer to the Paging section. path string
pageSize No Refer to the Paging section. path string
language No Refer to the Common section. header string
callerName No Refer to the Common section. header string

HTTP Response Status Codes

Status Code Description
200 Success
204 No Content
400 Bad Request
500 Internal Server Error

Success Response

A list of carts will be returned.

[{ 
  "OrderNumber": "string", 
  "Carrier": "string", 
  "BoxNumber": "string", 
  "TrackingNumber": "string",  
  "TrakingUrl": "string" 
}]

Examples

  • GET https://[HOST]/orders/tracking?cartids=123456

 

POST /Orders/Create/FulFillment

This function allows to create a doorstep delivery (fulfillment) order. If you want to be fully integrated, the following diagram presents how you should be calling our services.

 

Method

POST

Parameters

The following request parameters are available:

Parameter Required Description Type Data Type
request Yes Object to create :

All fields marked with * are optional.

Concerning the ReturnAddressID, if it is not sent, the service will take by default the address that is set on the My Account > Doorstep Delivery preferences page. Otherwise, the ID should be retrieved by calling the Account/Addresses function, and taking the ID of the address of Type Shipping that you want as a return address.

The State of the DeliveryAddress must be the abbreviated (2 letters) code. Please refer to the State Codes table below.

Please be advised that the Note in the OrderOptions is the equivalent of the Special Processing Instructions in the cart when submitting an order through the website. This means that one of our team members will be required to personally review this order. This may cause a delay in processing, and ultimately, in delivery.

{
 *"OrderOptions":{
    "PONumber": "string",
    "Note": "string" 
 },
 "ShippingOptions":{
    *"CarrierAccountNumber": "string",
    "SignatureRequired": false|true,
    *"DocumentLanguage": "en|fr",
    "DeliveryAddress":{
       "ContactName": "string",
       "Street": "string",
       "City": "string",
       "State": "string",
       "ZipCode": "string",
       "CountryCode": "ca|us",
       *"PrimaryPhoneNumber": "phone"
     }
 },
 "ReturnOptions":{
   *"ReturnAddressID": 1
 }, 
 "Items":[{
   "Sku": "020056-07",
   "Quantity": 0,
   *"Note": "string" 
   }]
}
body Object
language No Refer to the Common section. header string
callerName No Refer to the Common section. header string

STATE CODES

CA US No fulfillment available
AB, BC, MB , NB, NL, NT, NS, NU, ON, PE, QC, SK, YT AL, AK, AS, AZ, AR, CA, CO, CT, DE, DC, FM, FL, GA, GU, HI, ID, IL, IN, IA, KS, KY, LA, ME, MH, MD, MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND, MP, OH, OK, OR, PW, PA, PR, RI, SC, SD, TN, TX, UT, VT, VI, VA, WA, WV, WI, WY AK,HI,PR

HTTP Response Status Codes

Status Code Description
200 Success
400 Bad Request
500 Internal Server Error

Success Response

A list of carts will be returned.

{
  "CartId": 123456,
}

 

Get /Carts

Dealers can get the data about available products (variantIds and quantity) added to their saved carts page on the web store (My Cart > Saved carts) using the cart IDs.

Method

GET

Parameters

The following request parameters are available:

Parameter Required Description Type Data Type
cartIds No Filters the results by cart IDs. IDs must be comma ‘,’ separated. For instance: “12345678,12345689” could be sent. path string
pageStartIndex No Refer to the Paging section. path string
pageSize No Refer to the Paging section. path string
language No Refer to the Common section. header string
callerName No Refer to the Common section. header string

HTTP Response Status Codes

Status Code Description
200 Success
500 Internal Server Error

Success Response

A list of carts will be returned.

[{
  "CartId": 0,
  "PONumber": "string",
  "Note": "string",
  "Items": [{
             "VariantNo": "string",
             "Quantity": 0,
             "Note": "string"
           }]
}]

Examples

  • GET https://[HOST]/Carts?cartIds=123456

 

Post /Carts/Create

Dealers can create a cart via the API service. Upon creating the cart, a saved cart will be added in the web store (My Cart > Saved Carts).

Method

POST

Parameters

The following request parameters are available:

Parameter Required Description Type Data Type
request Yes Object of the cart to create.

All fields marked with * are optional.

{
  *"PONumber": "string",
  *"Note": "string",
  "Items": [{
             "Sku": "020056-07",
             "Quantity": 0,
             *"Note": "string"
           }]
}

*The sku variable could be either the HLC variant number, UPC, EAN or Vendor Number.

body Object
language No Refer to the Common section. header string
callerName No Refer to the Common section. header string

HTTP Response Status Codes

Status Code Description
200 Success
400 Bad Request
500 Internal Server Error

Success Response

Return the cartId with message according to the success or failure while creating cart.

{ 
  "CartId": 0, 
  "ExecutionTime": 0, 
  "Messages": [{ 
                "MessageId": 0, 
                "Message": "string" 
              }] 
}