POST get_rates
USPS and UPS services with price for one package, cheapest first.
read
Returns each service Pirate Ship offers for this package with its price. Rates change with weight, size, ZIP and packaging, so call it again if any of them changes. Nothing is bought.
POST /api/v1/pirate-ship/get_rates
Input
| Parameter | Type | Description |
|---|---|---|
| to_address required | object | name, street1, street2, city, state, zip, country. |
| from_address_id | string | Ship From Address ID. Default: your default Ship From Address. |
| package | object | weight_oz, and length, width, height in inches. Use this or saved_package_id. |
| saved_package_id | string | ID of one of your Saved Packages from list_saved_packages. Its size, weight and extra services such as insurance apply. |
| packaging | string | Type of Packaging as the app lists it, e.g. a box or a poly mailer. Priority Mail packaging works only with Priority Mail. |
Example response
{
"rates": [
{
"rate_id": "r_01UG",
"carrier": "USPS",
"service": "Ground Advantage",
"price_usd": 7.12
},
{
"rate_id": "r_02PM",
"carrier": "USPS",
"service": "Priority Mail",
"price_usd": 9.86
},
{
"rate_id": "r_03UP",
"carrier": "UPS",
"service": "Ground",
"price_usd": 11.4
}
]
}