Pirate Ship
Free multi-carrier (USPS/UPS) shipping rate comparison and label tool.
Domain: pirateship.com
Also known as: Pirate Ship, PirateShip
Call it directly
bowmark.providers.pirateship.getRates(originZip: string, destination: string, weightOz: number, dimensions: PirateshipDimensions, isResidential?: boolean): Promise<PirateshipRate[]>Functions
| Function | What it does |
|---|---|
getRates | Compares live shipping rates across USPS and UPS for a package, the way pirateship.com/rates' own calculator does — Pirate Ship's pitch is pre-negotiated commercial discounts with no… |
Types
interface PirateshipDimensions {
length: number;
width: number;
height: number;
}
interface PirateshipRate {
title: string;
carrier: { carrierKey: string; title: string };
mailClassKey: string;
international: boolean;
packageTypeKey: string;
zone: string;
totalPrice: number;
basePrice: number;
crossedTotalPrice: number;
surcharges: Array<{ title: string; price: number }>;
deliveryDescription: string;
cheapest: boolean;
fastest: boolean;
best: boolean;
learnMoreUrl: string;
}Examples
const rates = await bowmark.providers.pirateship.getRates(
"10001", "90001", 32, { length: 10, width: 8, height: 6 },
);
const cheapest = rates.find((r) => r.cheapest);
log(`cheapest: ${cheapest.title} — $${cheapest.totalPrice}`);// international: destination is a country name, not a zipcode
const intl = await bowmark.providers.pirateship.getRates(
"10001", "Canada", 32, { length: 10, width: 8, height: 6 },
);