---
updatedAt: 2026-06-04T08:19:34.000Z
agentTools:
  projectIndex: https://developers.99minutos.com/llms.txt
---

# /api/v3/shipping/rates

Estimate shipping cost and validate coverage based on origin and destination, package dimensions, and weight. If the country is different from Mexico, the zipcode must be empty, and validation will be done using coordinates only.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "x-stoplight": {
    "id": "tt90qxfs5i6qr"
  },
  "info": {
    "title": "API Version 3",
    "version": "3.0.0",
    "description": "This is the documentation for the public api *(version 3)* of 99minutos. [https://www.99minutos.com/.](https://www.99minutos.com/.EnvironmentAPI)\n\n# First Steps\n\n1.  Create an account in the sandbox website: [https://delivery-git-sandbox-99minutos.vercel.app/](https://delivery-git-sandbox-99minutos.vercel.app/)\n2.  Go to Developers section\n3.  On API Keys V3 section click on `Generar`\n4.  After this the `client_id` and `client_secret` will be displayed\n    \n\nUse the credentials to generate access tokens as shown below in the endpoint `create access token`\n\nFollow the same process in production.\n\n## Environments\n\n| **Environment** | **Website** | **API url** |\n| --- | --- | --- |\n| Sandbox | [https://delivery-git-sandbox-99minutos.vercel.app/](https://delivery-git-sandbox-99minutos.vercel.app/) | [https://sandbox.99minutos.com](https://sandbox.99minutos.com) |\n| Production | [https://envios.99minutos.com/developers](https://envios.99minutos.com/developers) | [https://delivery.99minutos.com](https://delivery.99minutos.com) |\n\n`Each environment has an independent set of credentials`"
  },
  "paths": {
    "/api/v3/shipping/rates": {
      "post": {
        "operationId": "calculate_shipping_rates",
        "description": "Estimate shipping cost and validate coverage based on origin and destination, package dimensions, and weight. If the country is different from Mexico, the zipcode must be empty, and validation will be done using coordinates only.",
        "tags": [
          "shipping-rates"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "withTaxes": {
                    "type": "boolean",
                    "description": "Indicates whether taxes should be included in the response."
                  },
                  "validateOnlyCoordinates": {
                    "type": "boolean",
                    "description": "Must be true if country is not Mexico, as zipcode validation is not supported outside Mexico."
                  },
                  "origin": {
                    "type": "object",
                    "properties": {
                      "codePostal": {
                        "type": "string",
                        "description": "Zip code of the shipping origin. Must be empty if country is not Mexico."
                      },
                      "country": {
                        "type": "string",
                        "description": "Country code (e.g., 'MEX' for Mexico)."
                      }
                    },
                    "required": [
                      "country"
                    ]
                  },
                  "destination": {
                    "type": "object",
                    "properties": {
                      "codePostal": {
                        "type": "string",
                        "description": "Zip code of the shipping destination. Must be empty if country is not Mexico."
                      },
                      "country": {
                        "type": "string",
                        "description": "Country code (e.g., 'MEX' for Mexico)."
                      }
                    },
                    "required": [
                      "country"
                    ]
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "weight": {
                          "type": "integer",
                          "description": "Weight of the item in grams."
                        },
                        "depth": {
                          "type": "integer",
                          "description": "Depth of the item in centimeters."
                        },
                        "width": {
                          "type": "integer",
                          "description": "Width of the item in centimeters."
                        },
                        "height": {
                          "type": "integer",
                          "description": "Height of the item in centimeters."
                        },
                        "size": {
                          "type": "string",
                          "description": "Package size category (e.g., 's', 'm', 'l')."
                        }
                      },
                      "required": [
                        "weight",
                        "depth",
                        "width",
                        "height"
                      ]
                    }
                  }
                },
                "required": [
                  "withTaxes",
                  "validateOnlyCoordinates",
                  "origin",
                  "destination",
                  "items"
                ]
              },
              "examples": {
                "Mexico Zip Code Validation": {
                  "value": {
                    "withTaxes": true,
                    "validateOnlyCoordinates": false,
                    "origin": {
                      "codePostal": "08100",
                      "country": "MEX"
                    },
                    "destination": {
                      "codePostal": "32616",
                      "country": "MEX"
                    },
                    "items": [
                      {
                        "weight": 2500,
                        "depth": 1,
                        "width": 1,
                        "height": 1,
                        "size": "s"
                      }
                    ]
                  }
                },
                "International Coordinate Validation": {
                  "value": {
                    "withTaxes": true,
                    "validateOnlyCoordinates": true,
                    "origin": {
                      "codePostal": "",
                      "country": "USA"
                    },
                    "destination": {
                      "codePostal": "",
                      "country": "CAN"
                    },
                    "items": [
                      {
                        "weight": 5000,
                        "depth": 10,
                        "width": 15,
                        "height": 5,
                        "size": "m"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns shipping cost and available service levels.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "traceId": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalCost": {
                          "type": "number",
                          "description": "Total shipping cost including taxes if requested."
                        },
                        "serviceLevels": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "description": "Available shipping service levels."
                          }
                        }
                      }
                    },
                    "errors": {
                      "type": "object"
                    }
                  }
                },
                "examples": {
                  "Success Response": {
                    "value": {
                      "traceId": "12345abcde",
                      "message": "Shipping cost calculated successfully.",
                      "data": {
                        "totalCost": 150,
                        "serviceLevels": [
                          "Standard",
                          "Express"
                        ]
                      },
                      "errors": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request payload.",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid Country Zipcode Combination": {
                    "value": {
                      "traceId": "error-67890",
                      "message": "Zipcode must be empty for non-Mexico countries and validateOnlyCoordinates must be true.",
                      "errors": {
                        "origin": "Invalid zipcode for country",
                        "destination": "Invalid zipcode for country"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://delivery.99minutos.com",
      "description": "Produccion"
    },
    {
      "url": "https://sandbox.99minutos.com",
      "description": "Sandbox Environment"
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true,
    "samples-enabled": true
  }
}
```

# Sibling pages

* [Rates by Address](https://developers.99minutos.com/reference/get_api-v3-shipping-rates-addresses-origin-country-origin-address-destination-country-destination-address.md)
* [Rates by Coordinates](https://developers.99minutos.com/reference/get_api-v3-shipping-rates-coordinates-origin-country-origin-lat-origin-lng-destination-country-destination-lat-destination-lng.md)
* [Get package size by dimensions](https://developers.99minutos.com/reference/get_api-v3-shipping-rates-sizes.md)
* [Rates by Zipcodes](https://developers.99minutos.com/reference/get_api-v3-shipping-rates-zipcodes-origin-country-origin-zipcode-destination-country-destination-zipcode.md)