✦ Free until 30 June 2027 — then €39/month ex. VAT · Wholesale min €500
cosmeticwholesale

Cosmetic Wholesale

Shipping rates API

Pull our live shipping tariff as JSON — country × kg bands, no authentication.

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

EnvironmentBase URL
Productionhttps://cosmeticwholesale.eu/api/v1
Staginghttps://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" }
    }
  ]
}
FieldMeaning
currencyAlways EUR.
priceTypeAlways net (excluding VAT).
modeweight = kg-band matrix (current live tariff). pack = legacy pack-of-N fee (emergency rollback only).
defaultUnitKgHint used when estimating kg from unit quantity (qty × 0.45).
bandsOrdered weight bands. Half-open [minKg, maxKg) except the last band, whose max is inclusive.
rates[].feesNet 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
QueryRequiredMeaning
countryyesISO 3166-1 alpha-2 (DE, NL, …). UK is normalised to GB (and GB is not a shippable country).
kgone of kg / qtyTotal shipment weight in kilograms.
qtyone of kg / qtyUnit 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

ResponseMeaning
200Current tariff / quote.
304Your If-None-Match matched the matrix ETag — nothing changed. Does not count against the rate limit.
400Missing or invalid query (country_required, kg_or_qty_required, invalid_kg, invalid_qty, …).
404country_not_found — we do not ship to that country.
429Rate 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.