> For the complete documentation index, see [llms.txt](https://desenvolvedores.skyhub.com.br/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://desenvolvedores.skyhub.com.br/multi-cd/pedido-multi-origem.md).

# Pedido Multi Origem

Quando uma loja atua com o recurso Multi CD, possuindo warehouses diferentes para seus produtos, ao consumir um pedido é necessário atentar-se quanto a identificação do CD de onde a entrega deverá ser despachada.

## GET - Identificando a warehouse (CD) do pedido

O [consumo de pedidos](/pedidos/consumo-de-pedidos-queues.md) traz informações importantes para o correto ciclo de vida que uma entrega deve seguir.

Para identificação do CD para o qual o pedido foi gerado é possível consultar o campo **`remote_store_id`** dentro de **`items`**, conforme exemplo abaixo:

<figure><img src="/files/pF6y6m7PjsIVnly0GfEb" alt=""><figcaption></figcaption></figure>

Para maiores detalhes, logo abaixo temos o exemplo do consumo de um pedido, onde é possível consultar o campo **remote\_store\_id**:

<pre><code>{
    "expedition_limit_date": "2023-06-30T00:00:00-03:00",
    "shipments": [],
    "calculation_type": "b2wentregacorreios",
    "payments": [
        {
            "value": 153.99,
            "type": null,
            "transaction_date": null,
            "status": null,
            "sefaz": {
                "type_integration": "1",
                "payment_indicator": "0",
                "name_payment": "Boleto Bancário",
                "name_card_issuer": null,
                "id_payment": "15",
                "id_card_issuer": null
            },
            "parcels": null,
            "method": "BOLETO",
            "description": "No valor de: 153.99",
            "card_issuer": null,
            "autorization_id": null
        }
    ],
    "target_order": null,
    "discount": 0,
    "shipping_estimate_id": "",
    "shipping_method": "Pac",
    "total_ordered": 153.99,
    "shipped_date": "",
    "shipping_address": {
        "street": "Avenida Paulista",
        "secondary_phone": "99 999999999",
        "region": "SP",
        "reference": null,
        "postcode": "90000000",
        "phone": "99 999999999",
        "number": "1000",
        "neighborhood": "Bela Vista",
        "full_name": "João dos Santos",
        "detail": "Ao lado da cafeteria",
        "country": "BR",
        "complement": null,
        "city": "São Paulo"
    },
    "customer": {
        "vat_number": "23455567899",
        "phones": [
            "99 999999999"
        ],
        "name": "João dos Santos",
        "id_customer": "02-11111",
        "gender": "male",
        "email": "comprador@exemplo.com.br",
        "date_of_birth": "1989-01-01"
    },
    "shipping_cost": 3.99,
    "import_info": {
        "ss_name": "Lojas Americanas",
        "remote_id": "02-1000000005",
        "remote_code": "1000000000006",
        "pack_id": null,
        "cart_id": "6000bc0000000e0000000004"
    },
    "sync_sale_system": null,
    "placed_at": "2023-06-01T13:58:33-03:00",
    "linked_order": null,
    "billing_address": {
        "street": "Avenida Paulista",
        "secondary_phone": "99 999999999",
        "region": "SP",
        "reference": null,
        "postcode": "90000000",
        "phone": "99 999999999",
        "number": "1234",
        "neighborhood": "Bela Vista",
        "full_name": "João dos Santos",
        "detail": "Próximo ao museu",
        "country": "BR",
        "complement": null,
        "city": "São Paulo"
    },
    "delivery_contract_type": "B2WENPAC",
    "tags": [],
    "code": "Lojas Americanas-1000000000006",
    "delivery_token": {
        "takeout": null,
        "failure": null,
        "customer": null
    },
    "imported_at": "2023-06-06T12:14:15-03:00",
    "delivered_date": null,
    "updated_at": "2023-06-06T12:14:15-03:00",
    "exported_at": null,
    "channel": "Lojas Americanas",
    "invoices": [],
    "estimated_delivery": "2023-06-15T00:00:00-03:00",
    "sync_status": "NOT_SYNCED",
    "estimated_delivery_shift": null,
    "shipping_carrier": "Pac",
    "approved_date": "",
    "interest": 0,
    "status": {
        "type": "NEW",
        "label": "Pagamento Pendente (SkyHub)",
        "code": "book_product"
    },
    "items": [
        {
            "special_price": 150,
            "shipping_cost": 3.99,
            "remote_store_id": "<a data-footnote-ref href="#user-content-fn-1">L001</a>",
            "qty": 1,
            "product_id": "9455510",
            "original_price": 150,
            "name": "Cafeteira Elétrica",
            "listing_type_id": null,
            "id": "9455510",
            "gift_wrap": null,
            "detail": null,
            "delivery_line_id": null
        }
    ],
    "shipping_method_id": null,
    "available_to_sync": true,
    "id": "600f0d0000eb0d000f000001",
    "first_exported_at": null
}
</code></pre>

[^1]: store\_code


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://desenvolvedores.skyhub.com.br/multi-cd/pedido-multi-origem.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
