Shipment
Get shipment rate
This endpoint returns the complete rate information including shipping and customs values based on shipment characteristics and the origin and destination of the shipment.
URL
PROD https://api.skypostal.com
TEST https://api-test.skypostal.com
Endpoint
POST /wcf-services/service-shipment.svc/shipment/get-shipment-rate
Request Parameters
Parameters | |
---|---|
| Object - Required User Info Definition. |
| Double - Required Weight of package. |
| String - Required Can be LB = pounds and KG = kilograms. |
| Double - Required Unitary value of each detail. |
| Integer - Required Client identificator in SkyPostal system. |
| Integer - Required Code of the country. |
| Integer - Required Code of the city. |
| String Product Clasification (TEL,VYC,OTR,etc.). |
| Double - Required Package Height. |
| Double - Required Package Length. |
| Double - Required Package Width. |
| String - Required cm (centimeters) or in (inches). |
| String - Required Code of coupon (special cases). |
| String - Required Departure gateway or origin country. |
| String - Conditional Destination zipcode. Required if your zipcode is USA. |
| Integer - Required Rate Service Code Definition. Value matching any of the list. |
| String In case your rates are zone based use this field. |
| String DDU or DDP, each copa has it's default in case this is not sent. |
| String Destination Point of Entry. |
| Integer If want to apply rate discount for merchant. |
| Object Calculate rate quote for a first-mile label3 |
| Object Calculate rate quote for US local |
| Object Value matching any of the list, reference at: Reference |
| Object Entity Definition, reference at: Reference |
| Object Entity Definition, reference at: Reference |
User Info Definition
Parameters | |
---|---|
| Integer - Required This is the user code provided by Skypostal. |
| String - Required This is the app key provided by Skypostal. |
| String - Required This is the app key provided by Skypostal. |
Rate Service Code Definition.
Value | Description |
---|---|
1 | Courier Clearance / Courier Standard. |
2 | Courier Clearance / Postal Delivery. |
3 | Postal Clearance / Postal Delivery Standard. |
4 | Postal Clearance / Courier Standard. |
7 | Courier Expedited. |
11 | Office of Exchange. - *2kg max |
12 | Postal Clearance/Postal Delivery Express. |
13 | Courier Clearance / Courier Economy. |
14 | Courier Clearance / Courier Express. |
15 | Postal Clearance / Courier Standard Deferred. |
Value | Description |
---|---|
102 | Courier Clearance / Courier Delivery For Credit Cards - (Restricted to "family_product": "CCS" only). |
103 | Postal Clearance / Postal Delivery Unregistered - PE Only. |
Value | Description |
---|---|
201 | UPS Ground. |
202 | UPS Next Day Air Saver. |
203 | UPS 2nd Day Air. |
204 | UPS Next Day Air. |
205 | USPS Priority Mail. |
206 | USPS - Ground Advantage |
208 | UPS 2nd Day Air A.M. |
209 | UPS 3-Day Select. |
Value | Description |
---|---|
301 | Packet Standard. |
302 | Packet Express. |
Value | Description |
---|---|
401 | Postal Option. |
402 | Last mile only / Private. |
Value | Description |
---|---|
502 | Courier Clearance / Courier Delivery for Regulated Products - (Restricted to family products: "HBS", "BBC", "CSM", "AYB"). |
Remember
user_code
, user_key
and app_key
are generic credentials, make sure to request your own for TEST
and PROD
environemnts.
The command should be run as in the following example:
{
"user_info": {
"user_code":396,
"user_key":"",
"app_key":""
},
"weight":2,
"weight_type":"kg",
"merchandise_value": 300.50,
"copa_id":616,
"country_code":155,
"city_code": 95812,
"fmpr_cdg": "VYC",
"height_dim":20,
"length_dim":15.5,
"width_dim":32,
"dim_type":"cm",
"coupon_code":"",
"iata_code_origin":"MIA",
"zip_code":"12345",
"rate_service_code":5,
"zone":"",
"import_service_code":"",
"iata_code_destination":"",
"apply_discount":0,
"first_mile_options": {
"rate_service_code": 1,
"sender": {
"name": "COPA NAME",
"email": null,
"address": {
"country_code": null,
"country_iso_code": "US",
"country_name": null,
"state_code": null,
"state_name": "TEXAS",
"state_abbreviation":"TX",
"county_code": null,
"county_name": null,
"city_code": 0,
"city_name": "San Antonio",
"zip_code": "78205",
"neighborhood": null,
"address_01": "318 E. Houston Street",
"address_02": null,
"address_03": null
},
"return_address": {
"country_code": null,
"country_iso_code": "US",
"country_name": null,
"state_code": null,
"state_name": "TEXAS",
"state_abbreviation":"TX",
"county_code": null,
"county_name": null,
"city_code": 0,
"city_name": "San Antonio",
"zip_code": "78205",
"neighborhood": null,
"address_01": "318 E. Houston Street",
"address_02": null,
"address_03": null
},
"phone": [
{
"phone_type": 1,
"phone_number": "1800987654321"
}
]
}
},
"local_options": {
"rate_service_code": 1,
"sender": {
"name": "SENDER NAME",
"address": {
"country_code": null,
"country_iso_code": "US",
"country_name": null,
"state_code": null,
"state_name": "TEXAS",
"state_abbreviation":"TX",
"county_code": null,
"county_name": null,
"city_code": 0,
"city_name": "San Antonio",
"zip_code": "78205",
"neighborhood": null,
"address_01": "318 E. Houston Street",
"address_02": null,
"address_03": null
}
},
"consignee": {
"name": "CONSIGNEE NAME",
"address": {
"country_code": null,
"country_iso_code": "US",
"country_name": null,
"state_code": null,
"state_name": "TEXAS",
"state_abbreviation":"TX",
"county_code": null,
"county_name": null,
"city_code": 0,
"city_name": "San Antonio",
"zip_code": "78205",
"neighborhood": null,
"address_01": "318 E. Houston Street",
"address_02": null,
"address_03": null
}
}
}
}
The command will return the following format:
{
"data": [
{
"_verify": true,
"additional_discount": 0,
"custom_value": 48.08,
"custom_value_additional": 0,
"extra_value": 0,
"fmpr_cdg": "OTR",
"fuel_surcharge": 0,
"handling_fee": 0,
"insurance_value": 0,
"is_100pre_discount": 0,
"promotion_code": "",
"rate_dis_com_part": 5946,
"rate_dsc_beyond": 0,
"rate_dsc_commercial_partner": "",
"rate_dsc_gateway": 0,
"rate_dsc_value_commercial_partner": 0,
"rate_vlr_gatewaty": 13.05,
"ship_discount": 0,
"ship_subtotal_rate": 13.05,
"ship_total_rate": 13.05,
"total_customs": 48.08,
"total_shipping": 13.05,
"total_value": 13.05,
"default_rate_applied": false,
"first_mile_rate":{
"weight": 3.0,
"weight_unit": "lb",
"pricing_weight": 3.0,
"pricing_cubic_ft": null,
"value": 0.0,
"postage_amount": 12.25,
"fees_amount": 0.0,
"discounted_amount": 0.0,
"total_amount": 12.25,
"estimated_delivery_days": 5.0,
}
"additional_info": null,
"error": null
}
],
"additional_info": null,
"error": null
}