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. |
requestId | string | Não | Idempotency/correlation id. Auto-generated when omitted. |
Saída estruturada
| Campo | Tipo | Obrigatório no objeto | Descriçã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. |
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."
}
},
"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.