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

# Purchase a shipment

> Purchases a shipment and deducts the cost from your wallet balance. The shipment status changes from DRAFT to PENDING.



## OpenAPI

````yaml POST /client/shipments/{orderNumber}/purchase
openapi: 3.1.0
info:
  title: UniUni Platform Client API
  description: >-
    API for creating shipments, purchasing labels, managing batches, tracking
    deliveries, and receiving webhook notifications.
  version: 1.0.0
  contact:
    name: UniUni Retail Support
    email: retailsupport@uniuni.com
servers:
  - url: https://api.ship.uniuni.com/prod
    description: Production
  - url: https://api-sandbox.ship.uniuni.com
    description: Sandbox
security:
  - bearerAuth: []
tags:
  - name: Shipments
    description: Create, retrieve, list, purchase, refund, and delete shipments.
  - name: Batches
    description: Group purchased shipments into batches for drop-off or pickup.
  - name: Labels
    description: Retrieve shipping and batch labels as Base64-encoded PDFs.
  - name: Tracking
    description: Track shipment status and scan events.
  - name: Webhooks
    description: Receive real-time shipment status updates.
paths:
  /client/shipments/{orderNumber}/purchase:
    post:
      tags:
        - Shipments
      summary: Purchase a shipment
      description: >-
        Purchases a shipment and deducts the cost from your wallet balance. The
        shipment status changes from DRAFT to PENDING.
      operationId: purchaseShipment
      parameters:
        - $ref: '#/components/parameters/OrderNumber'
      responses:
        '200':
          description: Purchase result
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Additional information about the request status.
                  code:
                    type: integer
                    description: Status code. 0 indicates success.
                  data:
                    $ref: '#/components/schemas/PurchaseShipmentResponseData'
                required:
                  - message
                  - code
              examples:
                success:
                  summary: Shipment purchased successfully
                  value:
                    message: Shipment purchased successfully
                    code: 0
                    data:
                      trackingId: UR07240000000004901
                      orderNumber: UNI029834CA7
                      insuranceCreated: false
                paymentFailed:
                  summary: Payment failed
                  value:
                    message: Payment failed for shipment
                    code: 1009
                    data: null
components:
  parameters:
    OrderNumber:
      name: orderNumber
      in: path
      required: true
      description: The unique order number (e.g. UNI031455E90).
      schema:
        type: string
  schemas:
    PurchaseShipmentResponseData:
      type: object
      properties:
        trackingId:
          type: string
          description: Shipment tracking ID.
        orderNumber:
          type: string
          description: Order number.
        insuranceCreated:
          type: boolean
          description: Whether parcel protection was created.
      required:
        - trackingId
        - orderNumber
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API access token generated from the UniUni Platform dashboard.

````