Get Shipping Methods
During the checkout process of creating a new order in the Customer Care UI, the user can select how they want the order to be delivered. By providing order item details and a shipping destination to the Get Shipping Methods API, a list of the possible shipping options can be retrieved and displayed. These options include all of the possible methods that are available to fulfill that particular case, and specify the shipping cost of each method as well.
Version 1.0 Call https://integration.shopatron.com/api/snap/v1/shipping/methods Supported Formats JSON HTTP Method GET Schema https://integration.shopatron.com/api/snap/v1/shipping/methods.json
The .json address above can be used to access the schema within Postman.
Example
The example case creates an API call to get shipping methods of an order that has the following properties:
Product ID VRX33151 Being shipped to California
This guide will demonstrate how to put together each section of the request.
Header
Note that all PerfectSync integration APIs use Basic Authorization , a Base64 encoded string of the username and password combination separated by a colon. This authorization will be included in the header for every API call, along with the following:
Header Name Description Data Type Kibo-Manufacturer-Id This contains the Kibo OMS manufacturer identifier Integer Kibo-Catalog-Id This contains the Kibo OMS product catalog identifier Integer Kibo-Currency-Code The product catalog currency ISO code String Kibo-Locale The product catalog locale ISO code String
Required Parameters
The minimum required parameters, besides those provided in the header as explained in the PerfectSync Overview, are shown below. There are no additional optional parameters.
Parameter Type Description orderItems array A list of order item objects included in the order. shipToAddress object The street address that the shipment will be delivered to.
See the sections below for more information on the data that makes up these parameters.
Order Items
The Order Item block contains specific details about the products. This can be repeated for as many items in the order as necessary.
The required and optional parameters for an order item object are listed below. UPC, SKU, itemTax, imageURL, and productAdditions are all optional.
Parameter Type Description productID string The product identifier of the item. name string The name of the product. description string A short description of the product. upc string The Universal Product Code of the item. sku string The Stock Keeping Unit code of the item. quantity integer The quantity of the item. price number The item price. currency string The ISO currency code (e.g. “USD”). itemTax number The item tax override. imageUrl string An image thumbnail URL. productAdditions array A list of product additions for this order item.
If applicable to the order, a productAdditions object within the array requires the following data points:
Parameter Type Description price number The price of the addition. name string The display name of the addition. additionID string A product addition identifier.
The order item data used in this example is shown below.
"orderItems": [{
"productID": "VRX33151",
"name": "18K Yellow Gold and Stainless Steel Datejust Automatic",
"imageUrl": "url.com/images/image.png",
"quantity": 1,
"price": 3650.0,
"currency": "USD",
"productAdditions": [{
"additionID": "000",
"name": "None",
"price": 0.0
}]
}],
Shipping Information
The shipToAddress object provides detailed information about the shipping destination of the order, which is necessary for routing the order and determining what methods the carrier can provide.
The required and optional parameters for the shipToAddress object are listed here. The state, postalCode, and address lines 2 and 3 are all optional.
Parameter Type Description firstName string The first name of the recipient. lastName string The last name of the recipient. phone string The phone number of the recipient. addressLine1 string The first line of the street address. addressLine2 string The second line of the street address. addressLine3 string The third line of the street address. city string The city that the street address is located in. state string The state that the street address is located in. postalCode string The postal code for the street address. countryCode string The country code for the street address.
The shipping data used in this example is shown below.
"shipToAddress": {
"firstName": "",
"lastName": "",
"addressLine1": "1234 Fake St",
"addressLine2": "",
"city": "San Luis Obispo",
"state": "CA",
"postalCode": "93405",
"countryCode": "US",
"phone": "8055500123"
}
The Full Request
This is the entire request that will get the possible shipping methods of the scenario.
{
"orderItems": [{
"productID": "VRX33151",
"name": "18K Yellow Gold and Stainless Steel Datejust Automatic",
"imageUrl": "https://staging-web-tourneau.demandware.net/on/demandware.static/-/Sites-master-catalog/default/dwb159e2d1/images/large/VRX33151.png",
"quantity": 1,
"price": 3650.0,
"currency": "USD",
"productAdditions": [{
"additionID": "000",
"name": "None",
"price": 0.0
}]
}],
"shipToAddress": {
"firstName": "",
"lastName": "",
"addressLine1": "1234 Fake St",
"addressLine2": "",
"city": "San Luis Obispo",
"state": "CA",
"postalCode": "93405",
"countryCode": "US",
"phone": "8055500123"
}
}
The Full Response
The response will provide a list of possible shipping methods and their associated costs.
{
"shippingMethods": [{
"name": "UPS - Standard Ground",
"description": "UPS - Standard Ground",
"price": 0.0,
"shippingType": "REGULAR",
"deliveryMethod": "SHIP_TO_HOME"
}, {
"name": "UPS Three Day Delivery",
"description": "UPS Three Day Delivery",
"price": 20.0,
"shippingType": "EXPRESS_3_DAY",
"deliveryMethod": "SHIP_TO_HOME"
}, {
"name": "UPS Two Day Delivery",
"description": "UPS Two Day Delivery",
"price": 25.0,
"shippingType": "EXPRESS_2_DAY",
"deliveryMethod": "SHIP_TO_HOME"
}, {
"name": "Next Day Delivery",
"description": "Next Day Delivery",
"price": 35.0,
"shippingType": "EXPRESS_1_DAY",
"deliveryMethod": "SHIP_TO_HOME"
}, {
"name": "In Store Pick Up",
"price": 0.0,
"shippingType": "REGULAR",
"deliveryMethod": "IN_STORE_PICKUP"
}]
}