> ## 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.

# Obter pedido



## OpenAPI

````yaml https://erp.olist.com/public-api/v3/swagger/swagger-mintlify.json get /pedidos/{idPedido}
openapi: 3.0.0
info:
  title: Olist ERP API v3
  description: >-
    Documentação completa: <a href="https://api-docs.erp.olist.com"
    target="_blank">https://api-docs.erp.olist.com</a>
  version: '3.1'
servers:
  - url: https://api.tiny.com.br/public-api/v3
security: []
paths:
  /pedidos/{idPedido}:
    get:
      tags:
        - Pedidos
      summary: Obter pedido
      operationId: ObterPedidoAction
      parameters:
        - $ref: '#/components/parameters/get_pedidos_idPedido_idPedido'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObterPedidoModelResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDTO'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
        '503':
          description: Service Unavailable
      security:
        - bearerAuth: []
components:
  parameters:
    get_pedidos_idPedido_idPedido:
      name: idPedido
      in: path
      description: Identificador do pedido
      required: true
      schema:
        type: integer
  schemas:
    ObterPedidoModelResponse:
      title: ' '
      description: ' '
      properties:
        id:
          type: integer
          nullable: true
        numeroPedido:
          type: integer
          nullable: true
        idNotaFiscal:
          type: integer
          nullable: true
        dataFaturamento:
          type: string
          nullable: true
        valorTotalProdutos:
          type: number
          format: float
          nullable: true
        valorTotalPedido:
          type: number
          format: float
          nullable: true
        listaPreco:
          $ref: '#/components/schemas/ListaPrecoResponseModel'
        cliente:
          $ref: '#/components/schemas/PedidoClienteModel'
        enderecoEntrega:
          $ref: '#/components/schemas/EnderecoEntregaModelResponse'
        ecommerce:
          $ref: '#/components/schemas/EcommerceResponseModel'
        transportador:
          $ref: '#/components/schemas/TransportadorResponseModel'
        deposito:
          $ref: '#/components/schemas/DepositoResponseModel'
        vendedor:
          $ref: '#/components/schemas/VendedorResponseModel'
        naturezaOperacao:
          $ref: '#/components/schemas/NaturezaOperacaoResponseModel'
        intermediador:
          $ref: '#/components/schemas/IntermediadorResponseModel'
        pagamento:
          $ref: '#/components/schemas/PagamentoResponseModel'
        itens:
          type: array
          items:
            $ref: '#/components/schemas/ItemPedidoResponseModel'
          nullable: true
        pagamentosIntegrados:
          type: array
          items:
            $ref: '#/components/schemas/PagamentoIntegradoModelResponse'
          nullable: true
        situacao:
          description: |-

            - 8 - Dados Incompletos
            - 0 - Aberta
            - 3 - Aprovada
            - 4 - Preparando Envio
            - 1 - Faturada
            - 7 - Pronto Envio
            - 5 - Enviada
            - 6 - Entregue
            - 2 - Cancelada
            - 9 - Nao Entregue
          type: integer
          enum:
            - 8
            - 0
            - 3
            - 4
            - 1
            - 7
            - 5
            - 6
            - 2
            - 9
          nullable: true
          x-enumDescriptions:
            - 8 - Dados Incompletos
            - 0 - Aberta
            - 3 - Aprovada
            - 4 - Preparando Envio
            - 1 - Faturada
            - 7 - Pronto Envio
            - 5 - Enviada
            - 6 - Entregue
            - 2 - Cancelada
            - 9 - Nao Entregue
        data:
          type: string
          example: '2024-01-01'
          nullable: true
        dataEntrega:
          type: string
          example: '2024-01-01'
          nullable: true
        numeroOrdemCompra:
          type: string
          nullable: true
        valorDesconto:
          type: number
          format: float
          nullable: true
        valorFrete:
          type: number
          format: float
          nullable: true
        valorOutrasDespesas:
          type: number
          format: float
          nullable: true
        dataPrevista:
          type: string
          example: '2024-01-01'
          nullable: true
        dataEnvio:
          type: string
          example: '2024-01-01 00:00:00'
          nullable: true
        observacoes:
          type: string
          nullable: true
        observacoesInternas:
          type: string
          nullable: true
        origemPedido:
          description: Origem do pedido (0 = Pedido de Venda, 1 = PDV)
          type: integer
          nullable: true
      type: object
    ErrorDTO:
      title: ' '
      description: ' '
      properties:
        mensagem:
          description: Mensagem de erro geral
          type: string
          example: Ocorreram erros de validação
        detalhes:
          description: Detalhes específicos do erro
          type: array
          items:
            $ref: '#/components/schemas/ErrorDetailDTO'
          example:
            - campo: codigo
              mensagem: O campo código é obrigatório
          nullable: true
      type: object
    ListaPrecoResponseModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            id:
              type: integer
            nome:
              type: string
            acrescimoDesconto:
              type: number
              format: float
          type: object
    PedidoClienteModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - $ref: '#/components/schemas/BaseContatoModel'
        - properties:
            id:
              type: integer
          type: object
    EnderecoEntregaModelResponse:
      title: ' '
      description: ' '
      type: object
      allOf:
        - $ref: '#/components/schemas/EnderecoModel'
        - properties:
            nomeDestinatario:
              type: string
              nullable: true
            cpfCnpj:
              type: string
              nullable: true
            tipoPessoa:
              type: string
              nullable: true
            telefone:
              type: string
              nullable: true
            inscricaoEstadual:
              type: string
              nullable: true
          type: object
    EcommerceResponseModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            id:
              type: integer
              nullable: true
            nome:
              type: string
              nullable: true
            numeroPedidoEcommerce:
              type: string
              nullable: true
            numeroPedidoCanalVenda:
              type: string
              nullable: true
            canalVenda:
              type: string
              nullable: true
          type: object
    TransportadorResponseModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            id:
              type: integer
              nullable: true
            nome:
              type: string
              nullable: true
            fretePorConta:
              description: |-

                - R - Remetente
                - D - Destinatario
                - T - Terceiros
                - 3 - Proprio Remetente
                - 4 - Proprio Destinatario
                - S - Sem Transporte
              type: string
              enum:
                - R
                - D
                - T
                - '3'
                - '4'
                - S
              nullable: true
              x-enumDescriptions:
                - R - Remetente
                - D - Destinatario
                - T - Terceiros
                - 3 - Proprio Remetente
                - 4 - Proprio Destinatario
                - S - Sem Transporte
            formaEnvio:
              $ref: '#/components/schemas/FormaEnvioResponseModel'
            formaFrete:
              $ref: '#/components/schemas/FormaFreteResponseModel'
            codigoRastreamento:
              type: string
              nullable: true
            urlRastreamento:
              type: string
              nullable: true
          type: object
    DepositoResponseModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            id:
              type: integer
            nome:
              type: string
          type: object
    VendedorResponseModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            id:
              type: integer
            nome:
              type: string
              nullable: true
          type: object
    NaturezaOperacaoResponseModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            id:
              type: integer
              nullable: true
            nome:
              type: string
              nullable: true
          type: object
    IntermediadorResponseModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            id:
              type: integer
            nome:
              type: string
            cnpj:
              type: string
            cnpjPagamentoInstituicao:
              type: string
              nullable: true
          type: object
    PagamentoResponseModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            formaRecebimento:
              $ref: '#/components/schemas/FormaRecebimentoResponseModel'
            meioPagamento:
              $ref: '#/components/schemas/MeioPagamentoResponseModel'
            condicaoPagamento:
              type: string
              nullable: true
            parcelas:
              type: array
              items:
                $ref: '#/components/schemas/ParcelaModelResponse'
              nullable: true
          type: object
    ItemPedidoResponseModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            produto:
              $ref: '#/components/schemas/ProdutoResponseModel'
            quantidade:
              type: number
              format: float
            valorUnitario:
              type: number
              format: float
            infoAdicional:
              type: string
          type: object
    PagamentoIntegradoModelResponse:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            valor:
              description: Valor do pagamento
              type: number
              format: float
            tipoPagamento:
              description: Tipo de pagamento
              type: integer
            cnpjIntermediador:
              description: CNPJ do intermediador
              type: string
            codigoAutorizacao:
              description: Código de autorização
              type: string
            codigoBandeira:
              description: Código da bandeira
              type: integer
          type: object
    ErrorDetailDTO:
      title: ' '
      description: ' '
      properties:
        campo:
          description: Campo que gerou o erro
          type: string
          example: codigo
        mensagem:
          description: Mensagem de erro específica do campo
          type: string
          example: O campo código é obrigatório
      type: object
    BaseContatoModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            nome:
              type: string
              nullable: true
            codigo:
              type: string
              nullable: true
            fantasia:
              type: string
              nullable: true
            tipoPessoa:
              description: |-

                - J - Juridica
                - F - Fisica
                - E - Estrangeiro
                - X - Estrangeiro No Brasil
              type: string
              enum:
                - J
                - F
                - E
                - X
              nullable: true
              x-enumDescriptions:
                - J - Juridica
                - F - Fisica
                - E - Estrangeiro
                - X - Estrangeiro No Brasil
            cpfCnpj:
              type: string
              nullable: true
            inscricaoEstadual:
              type: string
              nullable: true
            rg:
              type: string
              nullable: true
            telefone:
              type: string
              nullable: true
            celular:
              type: string
              nullable: true
            email:
              type: string
              nullable: true
            endereco:
              $ref: '#/components/schemas/EnderecoModel'
          type: object
    EnderecoModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            endereco:
              type: string
              nullable: true
            numero:
              type: string
              nullable: true
            complemento:
              type: string
              nullable: true
            bairro:
              type: string
              nullable: true
            municipio:
              type: string
              nullable: true
            cep:
              type: string
              nullable: true
            uf:
              type: string
              nullable: true
            pais:
              type: string
              nullable: true
          type: object
    FormaEnvioResponseModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            id:
              type: integer
            nome:
              type: string
              nullable: true
          type: object
    FormaFreteResponseModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            id:
              type: integer
              nullable: true
            nome:
              type: string
              nullable: true
          type: object
    FormaRecebimentoResponseModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            id:
              type: integer
            nome:
              type: string
              nullable: true
          type: object
    MeioPagamentoResponseModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            id:
              type: integer
            nome:
              type: string
              nullable: true
          type: object
    ParcelaModelResponse:
      title: ' '
      description: ' '
      type: object
      allOf:
        - $ref: '#/components/schemas/ParcelaModel'
        - properties:
            formaRecebimento:
              $ref: '#/components/schemas/FormaRecebimentoResponseModel'
            meioPagamento:
              $ref: '#/components/schemas/MeioPagamentoResponseModel'
          type: object
    ProdutoResponseModel:
      title: ' '
      description: ' '
      properties:
        id:
          type: integer
          nullable: true
        sku:
          type: string
          nullable: true
        descricao:
          type: string
          nullable: true
        tipo:
          description: |-

            - P - Produto
            - S - Servico
          type: string
          enum:
            - P
            - S
          nullable: true
          x-enumDescriptions:
            - P - Produto
            - S - Servico
      type: object
    ParcelaModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            dias:
              type: integer
              nullable: true
            data:
              type: string
              example: '2024-01-01'
              nullable: true
            valor:
              type: number
              format: float
              nullable: true
            observacoes:
              type: string
              nullable: true
          type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: Bearer

````