Rate
GET /v2/getRate
Returns calculated shipping rate.
- URL:
https://parcelconnect.apc-pli.com/v2/getRate/ - Auth: HTTP Basic — see Authentication.
Request
- cURL
- Node.js
- Python
curl -X GET -H "Authorization: Basic {{basic_token}}" \
"https://parcelconnect.apc-pli.com/v2/getRate/?country={{country}}&service={{service}}&value={{value}}&postalCode={{postalCode}}&weight={{weight}}&length={{length}}&width={{width}}&height={{height}}¤cy={{currency}}&shipDate={{shipDate}}"
// Requires Node.js 18+ (built-in fetch).
const auth = Buffer
.from(`${process.env.APC_ACCOUNT_NUMBER}:${process.env.APC_PASSCODE}`)
.toString("base64");
const params = new URLSearchParams({
country: "CA",
service: "26",
value: "25.00",
postalCode: "M5V3L9",
weight: "2.25",
length: "10.00",
width: "8.50",
height: "6.25",
currency: "USD",
shipDate: "01/01/2026",
});
const res = await fetch(
`https://parcelconnect.apc-pli.com/v2/getRate/?${params}`,
{ headers: { Authorization: `Basic ${auth}` } }
);
const data = await res.json();
console.log(data.rate, data.dimsFactor);
import os
import requests
resp = requests.get(
"https://parcelconnect.apc-pli.com/v2/getRate/",
params={
"country": "CA",
"service": "26",
"value": "25.00",
"postalCode": "M5V3L9",
"weight": "2.25",
"length": "10.00",
"width": "8.50",
"height": "6.25",
"currency": "USD",
"shipDate": "01/01/2026",
},
auth=(os.environ["APC_ACCOUNT_NUMBER"], os.environ["APC_PASSCODE"]),
)
resp.raise_for_status()
data = resp.json()
print(data["rate"], data["dimsFactor"])
Response
{
"rate": 16.59,
"dimsFactor": 139.00
}
Request parameters
All parameters are case-sensitive.
| Parameter | Type | Description | Required | Example |
|---|---|---|---|---|
country | string | Destination 2-letter ISO country code | Yes | CA |
service | string | Service code (e.g., 26) | Yes | 26 |
value | decimal | Declared value of the shipment. In USD unless currency is provided. | Yes | 25.00 |
postalCode | string | Destination postal or ZIP code. Required for destinations that are priced by postal zone; recommended for all requests. | Conditional | M5V3L9 |
weight | decimal | Total weight of the shipment (in pounds). Required unless length, width, and height are all provided. | Conditional | 2.25 |
length | decimal | Longest parcel dimension (in inches). Required together with width and height when weight is omitted. | Conditional | 10.00 |
width | decimal | Second longest parcel dimension (in inches). See length. | Conditional | 8.50 |
height | decimal | Shortest parcel dimension (in inches). See length. | Conditional | 6.25 |
currency | string | ISO 4217 currency code for value and the returned rate. Defaults to USD. | No | CAD |
shipDate | string | Shipment date (MM/DD/YYYY) | No | 01/01/2026 |
Response fields
| Field | Type | Description |
|---|---|---|
rate | decimal | Calculated shipping rate. In USD unless a currency conversion was requested. |
dimsFactor | decimal | Dimensional weight factor used in the calculation. |
currency | string | Currency of the returned rate. Present only when currency was supplied on the request. |
exchangeRate | decimal | Exchange rate applied to convert the rate. Present only when currency was supplied. |
convertedRate | decimal | Rate converted into the requested currency. Present only when currency was supplied. |
currencyConversionWarning | string | Warning about the currency conversion, if any. Present only when currency was supplied. |
All numeric values accept up to two decimal places. Available
servicecodes can be retrieved from the Services endpoint.