---
title: "Obter ordem de compra"
method: GET
path: "/ordem-compra/{idOrdemCompra}"
tags: ["Ordem de Compra"]
---

# Obter ordem de compra

`GET /ordem-compra/{idOrdemCompra}`

## Path parameters

- `idOrdemCompra` integer, required

## Response `200`

OK

- ObterOrdemCompraModelResponse — 
  - `id` integer
  - `numeroPedido` string, nullable
  - `data` string
  - `situacao` string, nullable — - 0 - Em Aberto - 1 - Atendido - 2 - Cancelado - 3 - Em Andamento
  - `desconto` string
  - `frete` number, float
  - `totalProdutos` number, float
  - `totalPedidoCompra` number, float
  - `dataPrevista` string
  - `itens` OrdemCompraItemModelResponse[]
    - `produto` ProdutoResponseModel — 
      - `id` integer, nullable
      - `sku` string, nullable
      - `descricao` string, nullable
      - `tipo` 'P' | 'S', nullable — - P - Produto - S - Servico
    - `gtin` string, nullable
    - `quantidade` number, float
    - `preco` number, float
    - `ipi` number, float
  - `contato` ContatoModelResponse — 
    - `nome` string, nullable
    - `codigo` string, nullable
    - `fantasia` string, nullable
    - `tipoPessoa` 'J' | 'F' | 'E' | 'X', nullable — - J - Juridica - F - Fisica - E - Estrangeiro - X - Estrangeiro No Brasil
    - `cpfCnpj` string, nullable
    - `inscricaoEstadual` string, nullable
    - `rg` string, nullable
    - `telefone` string, nullable
    - `celular` string, nullable
    - `email` string, nullable
    - `endereco` EnderecoModel — 
      - `endereco` string, nullable
      - `numero` string, nullable
      - `complemento` string, nullable
      - `bairro` string, nullable
      - `municipio` string, nullable
      - `cep` string, nullable
      - `uf` string, nullable
      - `pais` string, nullable
    - `id` integer
  - `categoria` CategoriaResponseModel — 
    - `id` integer, nullable
    - `nome` string, nullable
    - `caminhoCompleto` string, nullable
  - `notaFiscal` OrdemCompraNotaFiscalModelResponse — 
    - `id` integer
    - `numero` string
    - `dataEmissao` string
    - `valor` string
    - `natureza` string
  - `parcelas` OrdemCompraParcelaModelResponse[]
    - `id` integer
    - `numero` integer
    - `dias` integer
    - `dataVencimento` string
    - `valor` number, float
    - `contaContabil` ContaContabilModel — 
      - `id` integer, nullable
    - `meioPagamento` string, nullable — - 1 - Dinheiro - 2 - Cheque - 3 - Cartao Credito - 4 - Cartao Debito - 5 - Credito Loja - 10 - Vale Alimentacao - 11 - Vale Refeicao - 12 - Vale Presente - 13 - Vale Combustivel - 14 - Duplicata Mercantil - 15 - Boleto - 16 - Deposito Bancario - 17 - Pix - 18 - Transferencia Bancaria Carteira Digital - 19 - Fidelidade Cashback Credito Virtual - 20 - Pix Estatico - 90 - Sem Pagamento - 99 - Outros
    - `observacoes` string
  - `fretePorConta` 'R' | 'D' | 'T' | '3' | '4' | 'S', nullable — - R - Remetente - D - Destinatario - T - Terceiros - 3 - Proprio Remetente - 4 - Proprio Destinatario - S - Sem Transporte
  - `observacoes` string
  - `observacoesInternas` string, nullable
  - `pvFrete` number, float

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error
- `503` — Service Unavailable

---

[API](https://skmtc.net/olist/apis/olist-erp-api-v3.md) · [All operations](https://skmtc.net/olist/apis/olist-erp-api-v3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/olist/olist-erp-api-v3/versions/c351400bb11f/schema)
