> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.erp.olist.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Atualizar Código de Rastreamento

> Serviço para cadastrar ou atualizar código de rastreamento de um pedido.

## Endpoint

```
POST https://api.tiny.com.br/api2/pedido.atualizar.rastreamento.php
```

## Parâmetros

| Parâmetro            | Tipo   | Ocorrência  | Descrição                                 |
| -------------------- | ------ | ----------- | ----------------------------------------- |
| token                | string | obrigatório | Chave gerada para identificar sua empresa |
| formato              | string | obrigatório | Formato do retorno (json)                 |
| id                   | int    | obrigatório | ID do pedido                              |
| codigo\_rastreamento | string | obrigatório | Código de rastreamento                    |
| url\_rastreamento    | string | opcional    | URL para rastreamento                     |
| enviar\_email        | string | opcional    | S ou N (padrão: S)                        |

## Exemplo de chamada

```bash theme={null}
curl -X POST https://api.tiny.com.br/api2/pedido.atualizar.rastreamento.php \
  -d "token=SEU_TOKEN&formato=json&id=789456&codigo_rastreamento=BR123456789BR&enviar_email=S"
```

## Retorno

```json theme={null}
{
  "retorno": {
    "status_processamento": 3,
    "status": "OK"
  }
}
```
