# Get Rates Validates shipment details and returns all available rates. Endpoint: POST /rates Version: 3.0 Security: bearerAuth ## Request fields (application/json): - `name` (string, required) Example: "Pramod Thomson" - `address1` (string, required) Example: "30 Clearview Dr" - `address2` (string,null) Example: "Lot 2" - `city` (string, required) Example: "Rock Springs" - `province_code` (string, required) Example: "WY" - `postal_code` (string, required) Example: "82901" - `country_code` (string, required) Example: "US" - `email` (string) Example: "test@stallionexpress.ca" - `phone` (string) Example: 11231231234 - `weight_unit` (string, required) Enum: "lbs", "kg", "g", "oz" - `weight` (number, required) Example: 0.6 - `length` (number) Example: 9 - `width` (number) Example: 12 - `height` (number) Example: 1 - `size_unit` (string, required) Enum: "cm", "in" - `package_contents` (string, required) Example: "Two pair of socks" - `value` (number, required) Example: 10 - `currency` (string, required) Enum: "CAD", "USD", "EUR", "AUD", "GBP" - `package_type` (any, required) - `postage_types` (array,null) Limit the results to specific postage types Example: [] - `signature_confirmation` (boolean,null) Example: true - `insured` (boolean,null) Example: true - `region` (string,null) Default account region. The region where the shipment will be delivered to Stallion. Ability to change this is needs to be enabled by Stallion. Enum: "ON", "BC", "QC" ## Response 200 fields (application/json): - `success` (boolean) Example: true - `rates` (array) - `rates.postage_type` (string) Enum: "USPS First Class Mail", "USPS Priority Mail", "USPS Priority Mail Express", "USPS Parcel Select Ground", "USPS Media Mail", "USPS Library Mail", "USPS Express Mail International", "USPS Priority Mail International", "USPS First Class Mail International", "FedEx Ground", "UPS Standard", "PostNL International Packet", "PostNL International Packet Tracked", "APC Priority Worldwide", "APC Priority Worldwide Tracked", "APC Priority Worldwide Expedited", "APC Priority Worldwide Expedited(DDP)", "Stallion Economy USA", "Stallion Economy CA", "US Economy" - `rates.package_type` (string) Enum: "Parcel", "Legal Flat Rate Envelope", "Flat Rate PAdded Envelope", "Small Flat Rate Box", "Medium Flat Rate Box 1", "Medium Flat Rate Box 2", "Large Flat Rate Box", "Regional Rate Box A1", "Regional Rate Box A2", "Regional Rate Box B1", "Regional Rate Box B2", "Letter", "Large Envelope Or Flat", "Thick Envelope" - `rates.trackable` (boolean) Example: true - `rates.base_rate` (integer) Example: 10 - `rates.add_ons` (array) Example: [null] - `rates.add_ons.name` (string) Example: "USPS Signature Confirmation" - `rates.add_ons.type` (string) Example: "signature_confirmation" - `rates.add_ons.cost` (number) Example: 2.65 - `rates.add_ons.currency` (string) Enum: "CAD", "USD", "EUR", "AUD", "GBP" - `rates.add_ons.return_address` (object) - `rates.add_ons.return_address.address1` (string) Example: "Unit 5 - 2045 Niagara Falls Blvd" - `rates.add_ons.return_address.address2` (string) Example: "SE" - `rates.add_ons.return_address.city` (string) Example: "Niagara Falls" - `rates.add_ons.return_address.postal_code` (string) Example: "14304" - `rates.add_ons.return_address.province_code` (string) Example: "NY" - `rates.add_ons.return_address.country_code` (string) Example: "US" - `rates.add_ons.return_address.phone` (string) Example: "8778637447" - `rates.rate` (integer) Example: 10 - `rates.tax` (integer) - `rates.total` (integer) - `rates.delivery_days` (string) Example: "2" ## Response 401 fields (application/json): - `message` (string) Example: "Unauthenticated." ## Response 422 fields (application/json): - `success` (boolean) - `errors` (array) Example: ["The data you entered is invalid"] ## Response 500 fields (application/json): - `success` (boolean) - `errors` (array) Example: ["An unknown error occured"]