Shipping

Calculate shipping rates

POST/v2/shipping/ratesTry it

Calculates shipping rates for a list of items. The endpoint computes the total weight and volume of the items (model and optional packaging), selects the appropriate envelope, and returns the carrier services available for the destination with their price. Only services whose price is greater than 0 are returned. To the United Kingdom (GB), the Sendcloud services (Colissimo International…) are not returned: the carrier refuses their label without the sender's UK VAT and EORI numbers, and order creation refuses them (GB_CUSTOMS_NUMBERS_REQUIRED). Use lpf_international to GB. The route stays public; an optional Bearer API key names the account.

Request

Authorization

None: this route answers without an API key.

Body application/json
  • to_countrystringrequired
    ISO 2-letter destination country code.
  • to_postal_codestring
    Destination postal code (reserved for postal-code-aware pricing).
  • itemsarray of objectrequired
    Items to ship. Weight and volume are derived from each model (and optional packaging).
  • items[].productIdstring: pvccard_white, mifare1k_pvccard_white, ntag213_pvccard_white, ntag216_pvccard_white, ntag424_pvccard_white, ntag424_woodcardrequired
    Product ID of the item.
  • items[].packagingIdstring, nullable
    Optional packaging ID, added to the item weight and volume.
  • items[].quantityinteger
    Number of units for this item.

Responses

200Successfully calculated shipping rates
  • successboolean
  • weightinteger
    Total shipping weight in grams (items + envelope).
  • volumenumber
    Total items volume in cm³.
  • countinteger
  • carriersarray of ShippingRate
400Bad request, missing to_country or items

Type: Error

404No matching models found for the provided items

Type: Error

429
500Server error

Type: Error

Request
curl -X POST "https://api.printags.com/v2/shipping/rates" \
  -H "Content-Type: application/json" \
  -d '{"to_country":"FR","to_postal_code":"75001","items":[{"productId":"ntag424_pvccard_white","packagingId":"aluminum_protection","quantity":10}]}'
Response 200
{
  "success": true,
  "weight": 110,
  "volume": 42.5,
  "envelope": {
    "id": "custom",
    "name": "Emballage spécial",
    "weight": 50
  },
  "count": 2,
  "carriers": [
    {
      "id": "lpf_standard",
      "name": "La Poste - Lettre Suivie",
      "code": "laposte",
      "serviceCode": "chrono_18",
      "hasServicePoints": false,
      "price": 3,
      "weightTier": 250
    }
  ]
}