Get Rates

Generate rates for all enabled carriers by providing a route (A to B)

Get Rates

POST https://api-sandbox.shiplemon.com/v1/rates

This method returns all the rates available in order to create a shipment

Request Body

Name
Type
Description

items

array

This is an array that describes more details about the items that will be sent in the shipment and that you want to get rates for. Each item in this array is an object in the following format (all the dimensions are in cm and the weight in grams) For domestic and EU shipments the value parameter is optional. {"weight":1000, "height":20, "width":20, "length":20, "value":20, "notes":"nike air max"}

address_from

object

This object describes where the pickup of the item will happen. This is the starting point (point A) of the shipment. This object requires the following details: {"country": "GR","zip": "14451"} OR {"country": "AE","city": "Dubai"} In cases where zip is available, zip is required. If country doesn't support zip code or postal code, then the city parameter is required. Here's a list that we adhere to for zip rules per country: https://cfg.weship.gr/countries-postal-rules.json In the country parameter we accept the ALPHA-2 code format. You can find more here: https://www.iban.com/country-codes)

address_to

object

The same format as the address_from in order to define the destination of the shipment (point B)

Specific examples per language

curl --location --request POST 'https://api-sandbox.shiplemon.com/v1/rates' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "address_from": {
        "country": "GR",
        "zip": "14451"
    },
    "address_to": {
        "country": "DE",
        "zip": "81667"
    },
    "items": [
        {
            "weight": 2000,
            "height": 10,
            "width": 10,
            "length": 10,
            "notes": "",
            "value": 20
        }
    ]
}'

Example data for request

  • Weight : Weight of package in grams (int)

  • Height : Height of package in cm (int)

  • Width : Widht of package in cm (int)

  • Lenght : Length of package in cm (int)

  • Value : Value of package in designated currency (int)

  • Currency : Designated currency. Supports all of ISO currency strings. Default is EUR

{
    "items": [
        {
            "weight": 3000,
            "height": 10,
            "width": 30,
            "length": 20,
            "notes": "Nike air max",
            "value": 10,
            "currency": "EUR"
        }
    ],
    "address_from": {
        "country": "GR",
        "zip": "11111",
        "name": "John Doe",
        "state": "I",
        "city": "Athens",
        "address": "Jane Street 1",
        "email": "john@mail.com",
        "phone": "+3000000000",
        "notes": ""
    },
    "address_to": {
        "name": "SG2",
        "country": "GR",
        "state": "I",
        "city": "Athens",
        "zip": "11111",
        "address": "Jane Street 2",
        "email": "mary@mail.com",
        "phone": "+3000000000"
    }
}

Example response

Returns an array of rates for each carrier.

{
    "id": "dhl_N_eea60867-02d5-4795-b27d-87f85685465c",
    "friendly_name": null,
    "driver": "dhl",
    "provider": {
        "name": "DHL Express",
        "image": "https://static.shiplemon.com/providers/dhl.svg"
     },
     "service": {
        "code": "dhl_express_domestic",
        "name": "Domestic Express",
        "estimated_delivery_in_days": 4
      },
      "total_amount": 11.47,
      "total_without_tax_amount": 9.25,
      "tax_amount": 2.22,
      "currency": "EUR",
      "has_cash_on_delivery": false,
      "has_custom_credentials": false,
      "has_shipment_pickup_combined": false,
      "has_pickup": true,
      "transportation": "road",
      "has_mass_printing": true,
      "has_customs_invoice_upload": true,
      "has_insurance_ability": false,
      "has_saturday_delivery": false,
      "has_same_day_pickup": true,
      "pickup_slot_length_in_hours": 2,
      "pickup_same_day_latest_at": "17:00",
      "pickup_earliest_at": "13:00",
      "pickup_latest_at": "17:00",
      "metadata": {
        "items": [
          {
            "weight": 3000,
            "height": 10,
            "width": 30,
            "length": 20,
            "notes": "Nike air max",
            "value": 10,
            "currency": "EUR"
          }
         ],
        "address_from": {
          "country": "GR",
          "zip": "11111",
          "name": "John Doe",
          "state": "I",
          "city": "Athens",
          "address": "Jane Street 1",
          "email": "john@mail.com",
          "phone": "+3000000000",
          "notes": ""
        },
        "address_to": {
          "name": "SG2",
          "country": "GR",
          "state": "I",
          "city": "Athens",
          "zip": "11111",
          "address": "Jane Street 2",
          "email": "mary@mail.com",
          "phone": "+3000000000"
        }
      }
}

Last updated