# Get shipping rates This endpoint allows to get shipping rates of a package for a determined address. It calculates the available shipping options with their respective costs and delivery times based on package dimensions and origin/destination addresses. In case of success, the request will return a response with status 200. **POST** `/shipping/v1/shipments-rates` ## Request parameters - `packages` (array, optional) List of packages to be shipped. Currently supports only one package per request. - `packages[].declared_value` (number, optional) Declared value of the package for insurance purposes. This value represents the monetary value of the contents. - `packages[].quantity` (integer, optional) Number of packages to be shipped. Only the value `1` is allowed. - `packages[].dimensions` (object, optional) Object containing the package weight, width, height, and length. See the shipping dimension best practices for [Checkout API](/developers/en/docs/checkout-api-orders/additional-settings/best-practices-shipments) and [Checkout Pro](/developers/en/docs/checkout-pro-preferences/additional-settings/best-practices-shipments). - `packages[].dimensions.weight` (number, optional) Weight of the package in grams. Must be a positive number and the maximum is 30000 g (actual or volumetric). - `packages[].dimensions.width` (number, optional) Width of the package in centimeters. Must be a positive number and the maximum is 150 cm. The total dimension limit must not exceed 330 cm. - `packages[].dimensions.height` (number, optional) Height of the package in centimeters. Must be a positive number and the maximum is 150 cm. The total dimension limit must not exceed 330 cm. - `packages[].dimensions.length` (number, optional) Length of the package in centimeters. Must be a positive number and the maximum is 150 cm. The total dimension limit must not exceed 330 cm. - `shipping_from` (object, optional) Origin address information for the shipment. Optional field. If the postal code is provided, it will be used to calculate the quote. Otherwise, the Shipping data configured in Mercado Pago will be used. - `shipping_from.zip_code` (string, optional) Postal code of the address. Maximum 50 characters. - `shipping_to` (object, optional) Destination address information for the shipment. This is required to calculate shipping rates. - `shipping_to.zip_code` (string, optional) Postal code of the address. Maximum 50 characters. ## Response parameters - `shipment_rate_id` (string, optional) Unique identifier for the rate calculation session, automatically generated by the system. Use this value as `shipment_rate_id` when creating a shipment through [Checkout Pro](/developers/en/reference/online-payments/checkout-pro-preferences/shipping/create-shipment/post) or [Checkout API](/developers/en/reference/online-payments/checkout-api/shipping/create-shipment/post). - `rates` (array, optional) List of quotes for the package based on the information provided. - `rates[].options` (array, optional) List of available rate options. - `rates[].options[].id` (string, optional) Shipping option identifier. Use this value as `option_id` when creating a shipment through [Checkout Pro](/developers/en/reference/online-payments/checkout-pro-preferences/shipping/create-shipment/post) or [Checkout API](/developers/en/reference/online-payments/checkout-api/shipping/create-shipment/post). - `rates[].options[].pricing` (object, optional) - `rates[].options[].pricing.base_price` (string, optional) Gross value of the shipment before discounts. - `rates[].options[].pricing.price` (string, optional) Net value of the shipment after discounts. - `rates[].options[].pricing.discounts` (array, optional) List of applied discounts. - `rates[].options[].method` (string, optional) Shipping method type. Possible enum values: - `standard` Standard offer. - `economic` Cheaper offer. - `rates[].options[].pay_before` (string, optional) Expected date to guarantee the generated shipping promise. - `rates[].options[].delivery_promise` (object, optional) Delivery promise information. - `rates[].options[].delivery_promise.shipping_from` (string, optional) Estimated delivery start date. - `rates[].options[].delivery_promise.shipping_to` (string, optional) Estimated delivery end date. - `rates[].options[].delivery_days` (object, optional) Estimated delivery days information. - `rates[].options[].delivery_days.from` (integer, optional) Minimum number of delivery days. - `rates[].options[].delivery_days.to` (integer, optional) Maximum number of delivery days. - `rates[].packages` (array, optional) List of packages with quantity and dimensions. - `rates[].packages[].quantity` (integer, optional) Number of packages to be shipped. Only the value `1` is allowed. - `rates[].packages[].dimensions` (object, optional) Object containing the package weight, width, height, and length. See the shipping dimension best practices for [Checkout API](/developers/en/docs/checkout-api-orders/additional-settings/best-practices-shipments) and [Checkout Pro](/developers/en/docs/checkout-pro-preferences/additional-settings/best-practices-shipments). - `rates[].packages[].dimensions.weight` (number, optional) Weight of the package in grams. Must be a positive number and the maximum is 30000 g (actual or volumetric). - `rates[].packages[].dimensions.width` (number, optional) Width of the package in centimeters. Must be a positive number and the maximum is 150 cm. The total dimension limit must not exceed 330 cm. - `rates[].packages[].dimensions.height` (number, optional) Height of the package in centimeters. Must be a positive number and the maximum is 150 cm. The total dimension limit must not exceed 330 cm. - `rates[].packages[].dimensions.length` (number, optional) Length of the package in centimeters. Must be a positive number and the maximum is 150 cm. The total dimension limit must not exceed 330 cm. - `shipping_to` (object, optional) Destination address information. - `shipping_to.zip_code` (string, optional) Postal code of the address. Maximum 50 characters. - `shipping_to.country_id` (string, optional) Country code of the destination address. - `shipping_to.city_id` (string, optional) City identifier of the destination address. - `shipping_to.state_id` (string, optional) State code of the destination address. ## Errors | Status | Error | Description | | ------- | ------- | ----------- | | 400 | bad_request | Invalid data was sent in the request `body`. Try sending the request again, validating all fields. | | 401 | unauthorized | The value sent as Access Token is incorrect. Please check and try again with the correct value. | | 404 | not_found | The requested resource was not found or the value sent for its identification does not exist. Validate the information sent in the parameters and try the request again. | | 417 | expectation_failed | Could not meet the expectation specified in the `Expect` header. Validate the information sent and try the request again. | | 500 | internal_server_error | An unexpected error occurred on the server. Try the request again. | ## Request example ### cURL ```bash curl -X POST \ 'https://api.mercadopago.com/shipping/v1/shipments-rates' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "packages": [ { "declared_value": 1500, "quantity": 1, "dimensions": { "weight": 500, "width": 30, "height": 30, "length": 30 } } ], "shipping_from": { "zip_code": "06760" }, "shipping_to": { "zip_code": "06760" } }' ``` ## Response example ```json { "shipment_rate_id": "be9fae0d-1079-471e-887d-55861965d10e", "rates": [ { "options": [ { "id": null, "pricing": null, "method": null, "pay_before": null, "delivery_promise": null, "delivery_days": null } ], "packages": [ { "quantity": null, "dimensions": null } ] } ], "shipping_to": { "zip_code": "06760", "country_id": "MX", "city_id": "TUxNQ0NVQTczMTI", "state_id": "MX-DIF" } } ```