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

# Alterar uma expedição dentro de um agrupamento



## OpenAPI

````yaml https://erp.olist.com/public-api/v3/swagger/swagger-mintlify.json put /expedicao/{idAgrupamento}/expedicao/{idExpedicao}
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}/expedicao/{idExpedicao}:
    put:
      tags:
        - Expedição
      summary: Alterar uma expedição dentro de um agrupamento
      operationId: AlterarExpedicaoAgrupamentoAction
      parameters:
        - $ref: >-
            #/components/parameters/put_expedicao_idAgrupamento_expedicao_idExpedicao_idAgrupamento
        - $ref: >-
            #/components/parameters/put_expedicao_idAgrupamento_expedicao_idExpedicao_idExpedicao
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExpedicaoRequestModel'
      responses:
        '204':
          description: No Content
        '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:
    put_expedicao_idAgrupamento_expedicao_idExpedicao_idAgrupamento:
      name: idAgrupamento
      in: path
      description: Identificador do agrupamento
      required: true
      schema:
        type: integer
    put_expedicao_idAgrupamento_expedicao_idExpedicao_idExpedicao:
      name: idExpedicao
      in: path
      description: Identificador da expedição
      required: true
      schema:
        type: integer
  schemas:
    ExpedicaoRequestModel:
      title: ' '
      description: ' '
      properties:
        descricao:
          type: string
          nullable: true
        volume:
          $ref: '#/components/schemas/VolumeExpedicaoRequestModel'
        logistica:
          $ref: '#/components/schemas/LogisticaExpedicaoRequestModel'
      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
    VolumeExpedicaoRequestModel:
      title: ' '
      description: ' '
      properties:
        embalagem:
          $ref: '#/components/schemas/EmbalagemRequestModel'
        largura:
          type: number
          format: float
          nullable: true
        altura:
          type: number
          format: float
          nullable: true
        comprimento:
          type: number
          format: float
          nullable: true
        diametro:
          type: number
          format: float
          nullable: true
        pesoBruto:
          type: number
          format: float
          nullable: true
        quantidadeVolumes:
          description: Apenas para notas e pedidos
          type: number
          format: float
          nullable: true
      type: object
    LogisticaExpedicaoRequestModel:
      title: ' '
      description: ' '
      properties:
        formaFrete:
          $ref: '#/components/schemas/FormaFreteRequestModel'
        codigoRastreio:
          type: string
          nullable: true
        urlRastreio:
          type: string
          nullable: true
        possuiValorDeclarado: {}
        valorDeclarado:
          type: number
          format: float
          nullable: true
        possuiAvisoRecebimento: {}
      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
    EmbalagemRequestModel:
      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
          type: object
    FormaFreteRequestModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            id:
              type: integer
          type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: Bearer

````