---
title: "Cálculo de Fretes"
method: POST
path: "/api/v2/me/shipment/calculate"
---

# Cálculo de Fretes

`POST /api/v2/me/shipment/calculate`

## Request

- Base URL: `https://sandbox.melhorenvio.com.br`
- URL: `https://sandbox.melhorenvio.com.br/api/v2/me/shipment/calculate`
- Auth: none required
- TypeScript: <https://skmtc.dev/melhorenvio/apis/api-melhor-envio-sandbox/docs/api/v2/me/shipment/calculate/post.ts> (a function with typed inputs; its response is checked against the schema)

Envios

## Headers

- `Accept` string, required
- `Content-Type` string, required
- `Authorization` string, required
- `User-Agent` string, required

## Request body

- object
  - `from` object, required: Local de partida
    - `postal_code` string, required: Cep Local de Partida
  - `to` object, required: Local de Recebimento
    - `postal_code` string, required: Cep local de Recebimento
  - `products` object[], required: Listagem dos produtos contidos no pacote.
    - `id` string, required: Identificador do Produto
    - `width` integer, required: Largura
    - `height` integer, required: Altura
    - `length` integer, required: Comprimento
    - `weight` number, float, required: Peso
    - `insurance_value` number, float, required: Valor do produto que será utilizado para o cálculo do seguro do frete
    - `quantity` integer, required: Número de itens
  - `volumes` object[]: Atributos do objeto
    - `width` integer, required: Largura
    - `heigth` integer, required: Altura
    - `lenght` integer, required: Comprimento
    - `weight` number, float, required: Peso
    - `insurance` number, float, required: Valor do produto que será utilizado para o cálculo do seguro do frete
  - `options` object: Opções de Serviços de Entrega
    - `receipt` boolean: Aviso de Recebimento
    - `own_hand` boolean: Mão Própria

## Response `200`

200

- object[]
  - `id` integer
  - `name` string
  - `price` string
  - `custom_price` string
  - `discount` string
  - `currency` string
  - `delivery_time` integer
  - `delivery_range` object
    - `min` integer
    - `max` integer
  - `custom_delivery_time` integer
  - `custom_delivery_range` object
    - `min` integer
    - `max` integer
  - `packages` object[]
    - `price` string
    - `discount` string
    - `format` string
    - `dimensions` object
      - `height` integer
      - `width` integer
      - `length` integer
    - `weight` string
    - `insurance_value` string
    - `products` object[]
      - `id` string
      - `quantity` integer
  - `additional_services` object
    - `receipt` boolean
    - `own_hand` boolean
    - `collect` boolean
  - `company` object
    - `id` integer
    - `name` string
    - `picture` string

## Other responses

- `422`: 422

## Changes

- **2026-11-03** `ffbe3939fc36`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/melhorenvio/apis/api-melhor-envio-sandbox/changes/api/v2/me/shipment/calculate/post.md)

---

[API](https://skmtc.dev/melhorenvio/apis/api-melhor-envio-sandbox.md) - [All operations](https://skmtc.dev/melhorenvio/apis/api-melhor-envio-sandbox/llms.txt) - [OpenAPI document](https://skmtc.dev/melhorenvio/apis/api-melhor-envio-sandbox/revisions/ffbe3939fc36?raw)
