Skip to Content
API ReferenceGet Shipping Rates

Get Shipping Rates

Retrieve the available carrier contracts and pricing for a given shipment configuration.

POST /shipping/rates

Request

Headers

HeaderValue
AuthorizationBearer <your_api_token>
Content-Typeapplication/json

Body Parameters

FieldTypeRequiredDescription
packagesPackage[]YesArray of package dimensions and weight
shipFromAddressYesSender address
shipToAddressYesRecipient address
notesstringYesShipment notes
insuranceValuenumberYesInsurance value (use 0 for none)
codValuenumberYesCash-on-delivery value (use 0 for none)
accessoriServicesstring[]YesAdditional services (use [] for none)

Package Object

FieldTypeRequiredDescription
lengthnumberYesLength in cm
widthnumberYesWidth in cm
heightnumberYesHeight in cm
weightnumberYesWeight in kg

Address Object

FieldTypeRequiredDescription
namestringYesFull name
companystringYesCompany name
street1stringYesPrimary address line
street2stringYesSecondary address line (can be empty string)
citystringYesCity
statestringYesState/Province code
postalCodestringYesPostal/ZIP code
countrystringYes2-letter ISO country code (e.g. IT)
phoneanyNoPhone number
emailstringYesEmail address

Example

{ "packages": [ { "length": 17, "width": 25, "height": 26, "weight": 3 } ], "shipFrom": { "name": "Antonio Esposito", "company": "Spedisci.Online", "street1": "via guglielmo sanfelice 8", "street2": "", "city": "Napoli", "state": "NA", "postalCode": "80134", "country": "IT", "phone": null, "email": "email@example.com" }, "shipTo": { "name": "Mario Rossi", "company": "", "street1": "Via Roma 2", "street2": "", "city": "Telese Terme", "state": "BN", "postalCode": "82037", "country": "IT", "phone": null, "email": "email@example.com" }, "notes": "test api", "insuranceValue": 0, "codValue": 0, "accessoriServices": [] }

Response Fields

Each item in the response array represents one available carrier contract:

FieldTypeDescription
carrierCodestringCarrier identifier (e.g. gls)
contractCodestringSpecific contract code (e.g. gls-standard)
weight_pricestringPrice based on weight
insurance_pricestringInsurance surcharge
cod_pricestringCash-on-delivery surcharge
services_pricestringAdditional services price
fuelstringFuel surcharge
total_pricestringTotal price for this option

Use the carrierCode and contractCode from this response as input to the Create Shipping Label endpoint.

Error Codes

CodeDescription
200OK — array of available rates
405Invalid input
500Internal server error
501Not implemented
Last updated on