MCPFerramentas por capacidade
get_shipping_rates
Cotar frete
Cotar frete
Ferramenta do Meu Ecommerce MCP, na capacidade de Fretes e cotações. A loja é vinculada à credencial da conexão remota. Confira os requisitos de permissão e disponibilidade na página da capacidade.
Entrada
| Campo | Tipo | Obrigatório no objeto | Descrição |
|---|---|---|---|
instanceId | string | Não | Merchant/store id. Ignored on authenticated servers (the merchant comes from the API key); used only on local/unauthenticated servers. |
destinationCep | string | Sim | Destination Brazilian postal code (CEP). 8 digits; dashes/spaces are ignored. |
items | array | Sim | Cart line items. Mín. 1 itens. |
items[].name | string | Sim | Product name. |
items[].quantity | integer | Sim | Units of this product in the cart. Maior que 0. |
items[].unitPriceBRL | number | Sim | Unit price in BRL (used for free-shipping thresholds). Mínimo: 0. |
items[].weightKg | number | Não | Unit weight in kg. Defaults to 0.3kg if omitted. Maior que 0. |
items[].productId | string | Não | Your catalog's product id. Advanced plan: remembers this product's estimated dimensions between quotes (otherwise the name is the key). |
items[].variantId | string | Não | Variant id (size/color), so each variant keeps its own dimensions. |
items[].sku | string | Não | SKU, used as the product key when there is no productId. |
items[].dimensionsCm | object | Não | Unit dimensions in cm, when known. Advanced plan: used as-is instead of the AI estimate. Other plans ignore it (they pack into the store's first box). |
items[].dimensionsCm.length | number | Sim | Maior que 0. |
items[].dimensionsCm.width | number | Sim | Maior que 0. |
items[].dimensionsCm.height | number | Sim | Maior que 0. |
requestId | string | Não | Idempotency/correlation id. Auto-generated when omitted. |
Saída estruturada
| Campo | Tipo | Obrigatório no objeto | Descrição |
|---|---|---|---|
supportCode | string | Não | — |
rates | array | Sim | — |
rates[].code | string | Sim | — |
rates[].serviceId | string | Sim | — |
rates[].label | string | Sim | — |
rates[].deliveryDays | number | Sim | — |
rates[].price | number | Sim | — |
rates[].free | boolean | Não | — |
reason | string | Não | Why no rates were returned, when the list is empty. |
actionUrl | string | Não | When set (e.g. reason=subscription_required), send the merchant here to finish setup. |
excludedServices | array | Não | Services the store has enabled but that didn't come back in rates for this cart (e.g. the package exceeds that service's size/weight limit). Share this with the merchant/customer instead of silently omitting the service. |
excludedServices[].label | string | Sim | Service name, e.g. 'Mini Envios'. |
excludedServices[].message | string | Sim | Human-readable reason it was left out of this quote. |
Tratamento da resposta
Examine reason e actionUrl quando presentes. As ferramentas de etiqueta podem retornar uma pré-postagem criada antes de o PDF estar disponível. Consulte o fluxo de etiquetas e erros e limites.
Contrato JSON
{
"type": "object",
"properties": {
"instanceId": {
"type": "string",
"description": "Merchant/store id. Ignored on authenticated servers (the merchant comes from the API key); used only on local/unauthenticated servers."
},
"destinationCep": {
"type": "string",
"description": "Destination Brazilian postal code (CEP). 8 digits; dashes/spaces are ignored."
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Product name."
},
"quantity": {
"type": "integer",
"exclusiveMinimum": 0,
"description": "Units of this product in the cart."
},
"unitPriceBRL": {
"type": "number",
"minimum": 0,
"description": "Unit price in BRL (used for free-shipping thresholds)."
},
"weightKg": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Unit weight in kg. Defaults to 0.3kg if omitted."
},
"productId": {
"type": "string",
"maxLength": 200,
"description": "Your catalog's product id. Advanced plan: remembers this product's estimated dimensions between quotes (otherwise the name is the key)."
},
"variantId": {
"type": "string",
"maxLength": 200,
"description": "Variant id (size/color), so each variant keeps its own dimensions."
},
"sku": {
"type": "string",
"maxLength": 200,
"description": "SKU, used as the product key when there is no productId."
},
"dimensionsCm": {
"type": "object",
"properties": {
"length": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 300
},
"width": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 300
},
"height": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 300
}
},
"required": [
"length",
"width",
"height"
],
"additionalProperties": false,
"description": "Unit dimensions in cm, when known. Advanced plan: used as-is instead of the AI estimate. Other plans ignore it (they pack into the store's first box)."
}
},
"required": [
"name",
"quantity",
"unitPriceBRL"
],
"additionalProperties": false
},
"minItems": 1,
"description": "Cart line items."
},
"requestId": {
"type": "string",
"description": "Idempotency/correlation id. Auto-generated when omitted."
}
},
"required": [
"destinationCep",
"items"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}Referência gerada dos schemas do servidor. Os nomes de campos e as descrições técnicas originais são preservados.