Shipping Calculator Reference, version 2


The St Regis Group Core Shipping Calculator (version 2) provides rate estimates and an FOB point given an array of products and quantities, and a valid address.

Endpoint

https://api.stregisgrp.com/core/shipping/rates

Request

All requests must be valid JSON data. Starred fields are required.

Body

id * (String)
Your St Regis Group API ID
password * (String)
Your St Regis Group API Password
version * (String)
The version of the API to use. This documentation is for version "2"
shippers (Array of String, String)
One or more shipping providers to display results from. Valid options are "ups" and "fedex". Default "all"
items * (Array of Item objects)
The items to be quoted
address * (Address object)
Describes the destination

Address object

city (String)
The city being shipped to
stateOrProvinceCode (String, ISO 3166-2)
The state or province being shipped to
country * (String, ISO 3166-1)
The country being shipped to
postalCode * (String)
The postal code or ZIP being shipped to

Item object

sku (String)
The SKU of the product being quoted
quantity (Integer)
The quantity of the product being quoted

Example request

{ "id": "api@stregisgrp.com", "password": "XXXXXX", "version": "2", "shippers": "ups", "items": [ { "sku": "MUG101", "quantity": 4 }, { "sku": "AWJ122", "quantity": 4 } ], "address": { "city": "Markham", "stateOrProvinceCode": "ON", "postalCode": "L6G1A6", "country": "CA" } }

Response (Successful)

Body

shipment (Shipment object)
Describes the shipment
rates (Array of Rate objects)
An array of quoted rates
messages (Array of Strings)
If the request only partially completes, any errors will list here.

Shipment object

fobs (Array of FOB objects)
Describes one or more FOB points that the quoted products will ship from
totalWeight (String)
The total weight of the shipment
totalWeightUom (String)
The unit of measurement for the weight
cartons (Array of Carton objects)
The cartons in the shipment
items (Array of Item objects)
Describes the items quoted

FOB Object

addressLines (Array of Strings)
The origin address
city (String)
The origin city
stateOrProvinceCode (String)
The origin state or province
country (String)
The origin country
postalCode (String)
The origin postal code or ZIP

Carton Object

width (String)
The width of the carton
height (String)
The height of the carton
length (String)
The length of the carton
dimensionUom (String)
The unit of measure for the carton's dimensions
quantity (Integer)
The number of products in the carton
quantityUom (String)
The unit of measure for the product
weight (String)
The weight of the carton
weightUom (String)
The unit of measure for the weight of the carton
items (Array of Item objects)
The items shipping in the carton

Item object

sku (String)
The SKU of the product
quantity (Integer)
The quantity of the product

Rate Object

service (String)
The name of the service
carrierCode (String)
The carrier's internal code for the service.
cost (String)
The cost of shipping with the given service
currency (String)
The currency the cost is displayed in

Example response

{ "shipment": { "totalWeight": "21.51", "totalWeightUom": "LB", "cartons": [ { "width": "13", "height": "11", "length": "10", "dimensionUom": "IN", "weight": "6.51", "weightUom": "LB", "items": [ { "sku": "MUG101", "quantity": 4 } ] }, { "width": "20", "height": "14", "length": "13", "dimensionUom": "IN", "weight": "15.00", "weightUom": "LB", "items": [ { "sku": "AWJ122", "quantity": 4 } ] } ], "items": [ { "sku": "MUG101", "quantity": 4 }, { "sku": "AWJ122", "quantity": 4 } ], "fobs": [ { "addressLines": [ "271 Yorktech Drive" ], "city": "Markham", "stateOrProvinceCode": "ON", "countryCode": "CA", "postalCode": "L6G1A6" } ] }, "rates": [ { "service": "UPS Standard", "carrierCode": "UPS Standard", "cost": "15.40", "currency": "CAD" }, { "service": "UPS 2nd Day", "carrierCode": "UPS 2nd Day Air", "cost": "21.66", "currency": "CAD" } ], "messages": [ "Rates could not be returned from Fedex." ] }

Response (Unsuccessful)

Body

message
A string detailing the error that occurred while processing your request

If you have any questions or concerns, please contact our team at api@stregisgrp.com