Partners and sister companies can read the same shipping fees we publish on the shipping rates page and charge at checkout. When we update the Admin matrix, this API returns the new values (after a short cache window).
No account token is required. Abuse is limited by an IP rate limit and HTTP caching.
A PDF version of this page is available for your developers: Shipping Rates API v1.0 (PDF).
1. Environments
| Environment | Base URL |
|---|---|
| Production | https://cosmeticwholesale.eu/api/v1 |
| Staging | https://cosmeticwholesale1.bookgurusapi.com/api/v1 |
2. Full matrix
GET /shipping-rates
No Authorization header. Response is JSON.
Example
curl -sS https://cosmeticwholesale.eu/api/v1/shipping-rates
{
"currency": "EUR",
"priceType": "net",
"mode": "weight",
"defaultUnitKg": 0.45,
"bands": [
{ "bandKey": "0-2", "minKg": 0, "maxKg": 2, "label": "0 – 2 kg" },
{ "bandKey": "2-5", "minKg": 2, "maxKg": 5, "label": "2 – 5 kg" }
],
"rates": [
{
"countryCode": "DE",
"countryName": "Germany",
"fees": { "0-2": "4.95", "2-5": "6.50" }
}
]
}
| Field | Meaning |
|---|---|
currency | Always EUR. |
priceType | Always net (excluding VAT). |
mode | weight = kg-band matrix (current live tariff). pack = legacy pack-of-N fee (emergency rollback only). |
defaultUnitKg | Hint used when estimating kg from unit quantity (qty × 0.45). |
bands | Ordered weight bands. Half-open [minKg, maxKg) except the last band, whose max is inclusive. |
rates[].fees | Net fee in EUR for that country and bandKey. |
Cache the matrix in your system and refresh on a schedule (hourly is enough). Do not poll every request.
3. Quote a single shipment
GET /shipping-rates/quote?country=DE&kg=3.2
GET /shipping-rates/quote?country=DE&qty=10
| Query | Required | Meaning |
|---|---|---|
country | yes | ISO 3166-1 alpha-2 (DE, NL, …). UK is normalised to GB (and GB is not a shippable country). |
kg | one of kg / qty | Total shipment weight in kilograms. |
qty | one of kg / qty | Unit count; we estimate kg as qty × defaultUnitKg (0.45). |
Example
curl -sS "https://cosmeticwholesale.eu/api/v1/shipping-rates/quote?country=DE&kg=3.2"
{
"currency": "EUR",
"priceType": "net",
"mode": "weight",
"countryCode": "DE",
"countryName": "Germany",
"kg": 3.2,
"bandKey": "2-5",
"parcels": 1,
"feeNet": "6.50",
"feeString": "6.50"
}
Shipments over 31.5 kg are split into parcels (parcels > 1); feeString is the total net charge.
4. Caching and rate limits
| Response | Meaning |
|---|---|
200 | Current tariff / quote. |
304 | Your If-None-Match matched the matrix ETag — nothing changed. Does not count against the rate limit. |
400 | Missing or invalid query (country_required, kg_or_qty_required, invalid_kg, invalid_qty, …). |
404 | country_not_found — we do not ship to that country. |
429 | Rate limit: 60 requests per hour per IP (matrix + quote share the window). Retry-After: 3600. |
Matrix responses include:
Cache-Control: public, max-age=60, s-maxage=3600, stale-while-revalidate=86400
ETag: "…"
Send If-None-Match on the next matrix pull. Prefer the matrix endpoint for sync; use quote only when you need a computed fee for one basket.
5. How this relates to checkout
This API mirrors the Admin kg shipping table and the public /shipping-rates page. It is the authoritative tariff for partners that calculate shipping on their own storefront. Product cost prices still come from the catalog feed; orders still go through the Partner Order API or the WooCommerce / CW Sync plugins.
