Schedule a meeting

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

user_info

Object - Required

User Info Definition.

weight

Double - Required

Weight of package.

weight_type

String - Required

Can be LB = pounds and KG = kilograms.

merchandise_value

Double - Required

Unitary value of each detail.

copa_id

Integer - Required

Client identificator in SkyPostal system.

country_code

Integer - Required

Code of the country.

city_code

Integer - Required

Code of the city.

fmpr_cdg

String

Product Clasification (TEL,VYC,OTR,etc.).

height_dim

Double - Required

Package Height.

length_dim

Double - Required

Package Length.

width_dim

Double - Required

Package Width.

dim_type

String - Required

cm (centimeters) or in (inches).

coupon_code

String - Required

Code of coupon (special cases).

iata_code_origin

String - Required

Departure gateway or origin country.

zip_code

String - Conditional

Destination zipcode. Required if your zipcode is USA.

rate_service_code

Integer - Required

Rate Service Code Definition. Value matching any of the list.

zone

String

In case your rates are zone based use this field.

import_service_code

String

DDU or DDP, each copa has it's default in case this is not sent.

iata_code_destination

String

Destination Point of Entry.

apply_discount

Integer

If want to apply rate discount for merchant.

first_mile_options

Object

Calculate rate quote for a first-mile label3

local_options

Object

Calculate rate quote for US local

rate_service_code

Object

Value matching any of the list, reference at: Reference

sender

Object

Entity Definition, reference at: Reference

consignee

Object

Entity Definition, reference at: Reference

User Info Definition

Parameters

user_code

Integer - Required

This is the user code provided by Skypostal.

user_key

String - Required

This is the app key provided by Skypostal.

app_key

String - Required

This is the app key provided by Skypostal.

Rate Service Code Definition.

General Services - Integer value matching any of the following list:

Value

Description

1.

Courier Clearance / Courier Standard Plus.

2.

Courier Clearance / Postal Delivery.

3.

Postal Clearance / Postal Delivery.

4.

Postal Clearance / Courier Standard.

5.

Courier Clearance / Advanced.

6.

ePacket / epacket.

7.

Courier Clearance / Courier Standard.

8.

Courier Clearance / Postal Economy.

9.

Postal Clearance / Postal Economy.

10.

ePacket / Local optimized.

11.

Office of Exchange. - *2kg max

12.

Postal Clearance/Postal Express.

13.

Courier Clearance / Courier Economy.

14.

Courier Clearance / Courier Express.

 

LATAM Only Services - Integer value matching any of the following list:

Value

Description

102

Courier Clearance / Courier Delivery For Credit Cards - AR Only (Restricted to "family_product": "CCS" only).

103

Postal Clearance / Postal Delivery Unregistered - PE Only.

 

US Only Services - Integer value matching any of the following list:

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

207.

USPS Parcel Select.

208

UPS 2nd Day Air A.M.

209

UPS 3-Day Select.

 

BR Only Services - Integer value matching any of the following list:

Value

Description

301.

Packet Standard.

302.

Packet Express.

303.

Packet Mini.

 

CA Only Services - Integer value matching any of the following list:

Value

Description

401.

Semi Tracked.

402.

Delivery Tracked.

 

MX Only Services - Integer value matching any of the following list:

Value

Description

501

Courier Clearance / Courier Standard Plus - Supplements - (Restricted to "family_product": "HBS" only).

502

Courier Clearance / Courier Standard - Supplements - (Restricted to "family_product": "HBS" only).

503

Courier Clearance / Courier Lightweight Deferred - (Restricted, max weight of 200 grams).

504

Courier Clearance / Courier Standard Deferred.

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
}