> ## 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 agrupamento de expedição



## OpenAPI

````yaml https://erp.olist.com/public-api/v3/swagger/swagger-mintlify.json get /expedicao/{idAgrupamento}
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:
  /expedicao/{idAgrupamento}:
    get:
      tags:
        - Expedição
      summary: Obter agrupamento de expedição
      operationId: ObterAgrupamentoAction
      parameters:
        - $ref: '#/components/parameters/get_expedicao_idAgrupamento_idAgrupamento'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObterAgrupamentoResponseModel'
        '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_expedicao_idAgrupamento_idAgrupamento:
      name: idAgrupamento
      in: path
      required: true
      schema:
        type: integer
  schemas:
    ObterAgrupamentoResponseModel:
      title: ' '
      description: ' '
      properties:
        id:
          type: integer
        identificacao:
          type: string
        data:
          type: string
        formaEnvio:
          $ref: '#/components/schemas/FormaEnvioResponseModel'
        expedicoes:
          type: array
          items:
            $ref: '#/components/schemas/ExpedicaoResponseModel'
      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
    FormaEnvioResponseModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            id:
              type: integer
            nome:
              type: string
              nullable: true
          type: object
    ExpedicaoResponseModel:
      title: ' '
      description: ' '
      properties:
        id:
          type: integer
        data:
          type: string
        situacao:
          type: string
        tipoObjeto:
          type: string
        idObjeto:
          type: integer
        dataEmissao:
          type: string
        venda:
          $ref: '#/components/schemas/ExpedicaoVendaResponseModel'
        notaFiscal:
          $ref: '#/components/schemas/ExpedicaoNotaResponseModel'
        destinatario:
          $ref: '#/components/schemas/ContatoModelResponse'
        volume:
          $ref: '#/components/schemas/VolumeExpedicaoResponseModel'
        logistica:
          $ref: '#/components/schemas/LogisticaExpedicaoResponseModel'
      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
    ExpedicaoVendaResponseModel:
      title: ' '
      description: ' '
      properties:
        id:
          type: integer
        numero:
          type: integer
          nullable: true
        data:
          type: string
          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
      type: object
    ExpedicaoNotaResponseModel:
      title: ' '
      description: ' '
      properties:
        id:
          type: integer
        numero:
          type: integer
          nullable: true
        data:
          type: string
          nullable: true
        situacao:
          description: |-

            - 1 - Pendente
            - 2 - Emitida
            - 3 - Cancelada
            - 4 - Enviada Aguardando Recibo
            - 5 - Rejeitada
            - 6 - Autorizada
            - 7 - Emitida Danfe
            - 8 - Registrada
            - 9 - Enviada Aguardando Protocolo
            - 10 - Denegada
          type: integer
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
            - 9
            - 10
          nullable: true
          x-enumDescriptions:
            - 1 - Pendente
            - 2 - Emitida
            - 3 - Cancelada
            - 4 - Enviada Aguardando Recibo
            - 5 - Rejeitada
            - 6 - Autorizada
            - 7 - Emitida Danfe
            - 8 - Registrada
            - 9 - Enviada Aguardando Protocolo
            - 10 - Denegada
      type: object
    ContatoModelResponse:
      title: ' '
      description: ' '
      type: object
      allOf:
        - $ref: '#/components/schemas/BaseContatoModel'
        - properties:
            id:
              type: integer
          type: object
    VolumeExpedicaoResponseModel:
      title: ' '
      description: ' '
      properties:
        embalagem:
          $ref: '#/components/schemas/EmbalagemResponseModel'
        largura:
          type: number
          format: float
        altura:
          type: number
          format: float
        comprimento:
          type: number
          format: float
        diametro:
          type: number
          format: float
        pesoBruto:
          type: number
          format: float
        quantidadeVolumes:
          type: integer
      type: object
    LogisticaExpedicaoResponseModel:
      title: ' '
      description: ' '
      properties:
        codigoRastreio:
          type: string
        urlRastreio:
          type: string
        possuiValorDeclarado:
          type: boolean
        valorDeclarado:
          type: number
          format: float
        possuiAvisoRecebimento:
          type: boolean
        formaFrete:
          $ref: '#/components/schemas/FormaFreteResponseModel'
        transportador:
          $ref: '#/components/schemas/TransportadorExpedicaoResponseModel'
      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
    EmbalagemResponseModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            id:
              type: integer
              nullable: true
            tipo:
              description: |-

                - 0 - Nao Definido
                - 1 - Envelope
                - 2 - Caixa
                - 3 - Cilindro
              type: integer
              enum:
                - 0
                - 1
                - 2
                - 3
              nullable: true
              x-enumDescriptions:
                - 0 - Nao Definido
                - 1 - Envelope
                - 2 - Caixa
                - 3 - Cilindro
            descricao:
              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
    TransportadorExpedicaoResponseModel:
      title: ' '
      description: ' '
      properties:
        id:
          type: integer
        nome:
          type: string
      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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: Bearer

````