# Atualizações dos pedidos no Marketplace

Toda solução integrada à nossa API, seja própria ou um ERP/Plataforma, deverá se adequar a essa alteração.

## Pedidos

O padrão de código para pedidos será alterado. Durante a migração, os padrões antigo e novo coexistirão. Veja alguns exemplos:

<mark style="color:red;">Padrão novo (Lojas Americanas-9999999999999-99)</mark>

Lojas Americanas-1517940500554-01

<mark style="color:red;">Padrão antigo</mark>

Lojas Americanas-201036063223000

## Status de pedido

O status de pedido agora terá uma lista pré definida, sendo eles:

<table><thead><tr><th width="170">Código</th><th width="276">Descrição</th><th width="338">Interação </th></tr></thead><tbody><tr><td>book_product</td><td>Pagamento Pendente</td><td>-</td></tr><tr><td>has_incident</td><td>Com Incidente (OMNIK)</td><td>-</td></tr><tr><td>payment_received</td><td>Aprovado</td><td>POST /orders/{CODIGO}/approval</td></tr><tr><td>confirm_stock</td><td>Aguardando confirmação de Estoque (OMNIK)</td><td>-</td></tr><tr><td>waiting_payment</td><td>Pagamento Pendente (waiting_payment) (OMNIK)</td><td>-</td></tr><tr><td>processing_store</td><td>Aguardando Retirada na Loja (OMNIK)</td><td>-</td></tr><tr><td>confirmed_stock</td><td>Estoque Confirmado (OMNIK)</td><td>-</td></tr><tr><td>payment_overdue</td><td>Boleto Vencido (OMNIK)</td><td>-</td></tr><tr><td>order_shipped</td><td>Pedido Enviado (OMNIK)</td><td>POST /orders/{CODIGO}/shipments</td></tr><tr><td>order_invoiced</td><td>Faturado</td><td>POST /orders/{CODIGO}/invoice</td></tr><tr><td>shipment_exception</td><td>Exceção de Entrega (OMNIK)</td><td>POST /orders/{CODIGO}/shipment_exception</td></tr><tr><td>order_canceled</td><td>Cancelado (OMNIK)</td><td>POST /orders/{CODIGO}/cancel</td></tr><tr><td>returned</td><td>Pedido com itens retornados (OMNIK)</td><td>-</td></tr><tr><td>complete</td><td>Completo (entregue) (OMNIK)</td><td>POST /orders/{CODIGO}/delivery</td></tr></tbody></table>

**Exemplos de interação**

```json
curl --location 'https://api.skyhub.com.br/orders/Lojas Americanas-1518430501155-01/invoice' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-Accountmanager-Key: Api' \
--header 'X-Api-Key: {TOKEN DO SELLER}' \
--header 'X-User-Email: {EMAIL DO SELLER}' \
--data '{
    "status": "order_invoiced",
    "invoice": {
        "key": "99999999999999999999999999999999999999999999",
        "volume_qty": 1,
        "issue_date": "2025-03-20T15:50:33.782Z"
    }
}'

curl --location 'https://api.skyhub.com.br/orders/Lojas Americanas-1518430501155-01/delivery' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-Accountmanager-Key: Api' \
--header 'X-Api-Key: {TOKEN DO SELLER}' \
--header 'X-User-Email: {EMAIL DO SELLER}' \
--data '{
    "status": "complete",
    "delivered_date": "13/03/2025"
}'

curl --location 'https://api.skyhub.com.br/orders/Lojas Americanas-1518430501155-01/shipments' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-Accountmanager-Key: Api' \
--header 'X-Api-Key: {TOKEN DO SELLER}' \
--header 'X-User-Email: {EMAIL DO SELLER}' \
--data '{
    "status": "order_shipped",
    "shipment": {
        "code": "{code}",
        "delivered_carrier_date": "2025-03-20T15:50:33.782Z",
        "items": [
            {
                "sku": "4295312",
                "qty": 5
            }
        ],
        "track": {
            "code": "{Código de rastreio}",
            "carrier": "Correios",
            "method": "SEDEX",
            "url": "www.correios.com.br"
        }
    }
```

## Status INVOICED

### <mark style="color:red;">Como era antes?</mark>

#### Campo *volume\_qty*:

Era possível informar um *volume\_qty* para cada faturamento.

```json
{
    "status": "order_invoiced",
    "invoice": {
        "key": "99999999999999999999999999999999999999999999",
        "volume_qty": 1,
        "issue_date": "AAAA-MM-DDTHH:MM:SS-03:00"
    }
}
```

### <mark style="color:green;">Como será agora?</mark>

{% hint style="warning" %}
O campo ***volume\_qty***, será descontinuado, sendo sempre considerado como 1 por faturamento.
{% endhint %}

#### Campo *volume\_qty*:

O campo *volume\_qty*, será descontinuado, sendo sempre considerado como 1 por faturamento.

```json
curl --location --request POST 'https://api.skyhub.com.br/orders/Lojas Americanas-1000000000000/invoice' \
--header 'X-User-Email: email_de_usuario' \
--header 'X-Api-Key: token_de_integracao de sua conta SkyHub' \
--header 'X-Accountmanager-Key: token_account único de cada Plataforma/ERP' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
    "status": "order_invoiced",
    "invoice": {
        "key": "99999999999999999999999999999999999999999999",
        "issue_date": "2023-03-10T12:30:00-03:00"
    }
}'
```

Em caso de dúvidas, estamos à disposição através do nosso [canal de atendimento](https://desenvolvedores.skyhub.com.br/comunicados/comunicados-2024/novo-canal-de-atendimento).&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://desenvolvedores.skyhub.com.br/comunicados/comunicados-2025/atualizacoes-dos-pedidos-no-marketplace.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
