> ## Documentation Index
> Fetch the complete documentation index at: https://docs.frate.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Shipment

> Update Shipment through the Frate API. Note: used primarily for testing.



## OpenAPI

````yaml PUT /v2/shipments/{shipment_id}
openapi: 3.1.0
info:
  title: Frate Returns API
  version: 0.1.0
servers:
  - url: /api
security: []
paths:
  /v2/shipments/{shipment_id}:
    put:
      summary: Update Shipment
      description: Update Shipment
      operationId: update_shipment_v2_shipments__shipment_id__put
      parameters:
        - name: shipment_id
          in: path
          required: true
          schema:
            type: integer
            title: Shipment Id
        - name: x-frate-api-token
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Frate-Api-Token
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShipmentUpdateSerializer'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShipmentSerializer'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ShipmentUpdateSerializer:
      properties:
        status:
          $ref: '#/components/schemas/ShipmentStatusEnum'
          description: The status to update the shipment to
      type: object
      required:
        - status
      title: ShipmentUpdateInput
      description: Shipment Update Input
    ShipmentSerializer:
      properties:
        type:
          type: string
          const: shipment
          title: Type
          description: The type identifier for this resource
          default: shipment
        id:
          type: integer
          title: Id
          description: Unique identifier for the shipment
        status:
          $ref: '#/components/schemas/ShipmentStatusEnum'
          description: Current status of the shipment
        carrier:
          anyOf:
            - type: string
            - type: 'null'
          title: Carrier
          description: The shipping carrier (e.g., 'USPS', 'FedEx', 'UPS')
        tracking_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Tracking Number
          description: The tracking number for the shipment
        created_at:
          type: string
          title: Created At
          description: ISO 8601 timestamp when the shipment was created
        origin_address:
          anyOf:
            - $ref: '#/components/schemas/AddressSerializer'
            - type: 'null'
          description: The origin address for the shipment
        destination_address:
          anyOf:
            - $ref: '#/components/schemas/AddressSerializer'
            - type: 'null'
          description: The destination address for the shipment
        shipped_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Shipped At
          description: ISO 8601 timestamp when the shipment was shipped
        delivered_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Delivered At
          description: ISO 8601 timestamp when the shipment was delivered
        return_group_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Return Group Id
          description: The ID of the return group for the shipment
        return_ids:
          items:
            type: integer
          type: array
          title: Return Ids
          description: The IDs of the returns for the shipment
      type: object
      required:
        - id
        - status
        - created_at
      title: Shipment
      description: Shipment
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ShipmentStatusEnum:
      type: string
      enum:
        - DRAFT
        - CREATED
        - IN_TRANSIT
        - DELIVERED
        - FAILED
        - CANCELED
        - UNKNOWN
      title: ShipmentStatusEnum
    AddressSerializer:
      properties:
        address1:
          type: string
          title: Address1
          description: The first line of the address
        address2:
          anyOf:
            - type: string
            - type: 'null'
          title: Address2
          description: The second line of the address
        city:
          type: string
          title: City
          description: The city of the address
        province:
          anyOf:
            - type: string
            - type: 'null'
          title: Province
          description: The province of the address
        zip:
          type: string
          title: Zip
          description: The zip code of the address
        country:
          type: string
          title: Country
          description: The country of the address
      type: object
      required:
        - address1
        - city
        - province
        - zip
        - country
      title: Address
      description: Address
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````