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

# Pack Shipment

> This endpoint can be used in multiple modes of operation and in all cases operates on a `Shipment` specified by its `id` path parameter.

The available modes are:
1. Pack and Label: Create packages for a shipment and complete packing (create label if supported) in one step.
2. Pack Only: Create packages for a shipment without completing packing.
3. Complete Packing: Complete the packing of a shipment (creates a label if supported) in the "packing" status which was previously packed with the second mode.

Additionally, many of the parameters are optional, in which case the system will attempt to intelligently determine the best course of action based on the current state of the shipment and its contents. For example, if the Shipment has a Packing Solution and no package details are provided, the system will assume the containers specified by the Packing Solution were used and thus create the packages accordingly.



## OpenAPI

````yaml POST /v1/shipping/shipments/{id}/pack
openapi: 3.0.3
info:
  title: ShipStream
  version: '1.0'
  license:
    name: Commercial (Copyright 2025 - All Rights Reserved)
    url: https://shipstream.io
  contact:
    name: ShipStream Support
    email: help@shipstream.io
  termsOfService: https://shipstream.io/legal/api-terms/
servers:
  - url: https://{base_url_domain}/api/global
    description: Direct API Url
    variables:
      base_url_domain:
        default: example.shipstream.app
        description: >-
          The fully qualified domain name for your ShipStream WMS instance. This
          is either a custom domain, or a subdomain of shipstream.app,

          and will be the same as the domain name for the page which you use to
          login to ShipStream WMS.
security:
  - ShipStream_bearerAuth: []
tags:
  - name: Warehouses
    x-displayName: Warehouses
  - name: Products
    x-displayName: Products
  - name: Locations
    x-displayName: Locations
  - name: Levels
    x-displayName: Levels
  - name: HoldReasons
    x-displayName: HoldReasons
  - name: Holds
    x-displayName: Holds
  - name: Deliveries
    description: Every thing about a Delivery Receiving
    x-displayName: Deliveries
  - name: Shipments
    x-displayName: Shipments
  - name: Orders
    x-displayName: Orders
  - name: Retailers
    x-displayName: Retailers
  - name: Users
    x-displayName: Users
  - name: User Roles
    x-displayName: User Roles
  - name: Merchants
    x-displayName: Merchants
  - name: Healthcheck
    x-displayName: Healthcheck
paths:
  /v1/shipping/shipments/{id}/pack:
    post:
      tags:
        - Shipments
      summary: Pack Shipment
      description: >-
        This endpoint can be used in multiple modes of operation and in all
        cases operates on a `Shipment` specified by its `id` path parameter.


        The available modes are:

        1. Pack and Label: Create packages for a shipment and complete packing
        (create label if supported) in one step.

        2. Pack Only: Create packages for a shipment without completing packing.

        3. Complete Packing: Complete the packing of a shipment (creates a label
        if supported) in the "packing" status which was previously packed with
        the second mode.


        Additionally, many of the parameters are optional, in which case the
        system will attempt to intelligently determine the best course of action
        based on the current state of the shipment and its contents. For
        example, if the Shipment has a Packing Solution and no package details
        are provided, the system will assume the containers specified by the
        Packing Solution were used and thus create the packages accordingly.
      operationId: packShipment
      parameters:
        - name: id
          in: path
          schema:
            type: integer
            minimum: 1
          required: true
          description: The `id` of the referenced `Shipment`.
      requestBody:
        description: >-
          Optional request parameters for packing, labeling, and printing
          operations.
        content:
          application/json:
            schema:
              type: object
              properties:
                packages:
                  type: array
                  description: >-
                    Describes each package and its contents. If not provided,
                    and the Shipment has a Packing Solution, the Packing
                    Solution containers will be used to create the packages. If
                    neither are provided, the system will attempt to create a
                    single package containing all items in the shipment.
                  items:
                    $ref: '#/components/schemas/Shipping_API_v1_Package'
                complete_packing:
                  type: boolean
                  description: >-
                    If `true`, the packing process will be completed and the
                    shipment status will advance to 'Packed'. Otherwise, the
                    packages will be saved and the shipment status will advance
                    only to 'Packing'. A second request without the `packages`
                    property and with `complete_packing` set to `true` is then
                    required to complete the packing process using the package
                    data from the first request (two-step).


                    Required to be `true` if `return_label` or `print_label` is
                    `true` and no existing label exists.
                  default: false
                  example: true
                return_label:
                  type: boolean
                  description: >-
                    Whether to return the generated shipping labels in the
                    response as base64-encoded PDF data.

                    Requires `complete_packing` to be `true` or an existing
                    shipping label to be present.

                    Labels are returned in the response under the `labels` key.
                  default: false
                  example: false
                print_label:
                  type: boolean
                  description: >-
                    Whether to send the generated labels to the specified
                    printers.

                    Requires `complete_packing` to be `true` or an existing
                    shipping label to be present.

                    Must specify the appropriate printer parameters based on
                    shipment type and documents returned by the carrier API.
                  default: false
                  example: false
                printers:
                  $ref: '#/components/schemas/Shipping_API_v1_printers'
                post_automation_url:
                  type: string
                  format: uri
                  description: >-
                    URL to send shipment data to after successful packing
                    operation.

                    Must be a valid HTTP or HTTPS URL.

                    Shipment data including ID, tracking info, and package data
                    will be transmitted to this URL via an HTTP POST request
                    synchronously.

                    Any 200 response will be considered a success. Any non-200
                    response will be considered an error, and the request body
                    will be truncated to 255 characters and displayed to the
                    user and added as a history comment to the order.


                    The JSON-encoded payload contains the following keys:
                    `shipment_id`, `external_id`, `order_unique_id`,
                    `order_ref`, `carrier_code`, `shipping_method`, `batch_tag`,
                    `automation_data`, `website_code`, `store_code`,
                    `shipment_weight`, `shipment_weight_unit`, `order_weight`,
                    `order_weight_unit`, `is_international`,
                    `is_documents_required`, and `stock_id`.
                  example: https://automation.example.com/shipment/packed
                solution_override:
                  type: object
                  description: >-
                    Packing solution override parameters for manual or automatic
                    solution adjustment.

                    Used to specify alternative packing solutions or create new
                    ones.
                  properties:
                    solution_id:
                      type: integer
                      description: >-
                        ID of an existing packing solution to use instead of the
                        current one.

                        Use -1 to create a new solution from the current
                        shipment data.
                      example: 12345
                    reason:
                      type: string
                      description: Reason for the packing solution override.
                      example: Container size adjustment required
                    comment:
                      type: string
                      description: Additional comments about the solution override.
                      example: Customer requested specific packaging
                    mark_solution_invalid:
                      type: boolean
                      description: Whether to mark the original solution as invalid.
                      default: false
                      example: false
                mark_solution_invalid:
                  type: boolean
                  description: >-
                    Whether to mark the current packing solution as
                    invalid/disabled.

                    When `true`, disables the current solution after packing is
                    complete.

                    Cannot be used in combination with other solution override
                    parameters.
                  default: false
                  example: false
                initial_solution_id:
                  type: integer
                  description: >-
                    ID of the initial packing solution to set on the shipment
                    before processing.

                    Used to establish a baseline solution before applying any
                    overrides.
                  example: 54321
                ship_offline:
                  type: boolean
                  description: >-
                    Whether to pack the shipment in offline mode without carrier
                    API integration.

                    When `true`, skips carrier API calls and address validation.

                    Useful for situations where carrier services are
                    unavailable.
                  default: false
                  example: false
                confirmed_instructions:
                  type: object
                  description: >-
                    Object mapping instruction IDs to quantities for order
                    instructions that have been confirmed.

                    Keys are instruction IDs (as strings), values are the
                    quantities confirmed.

                    Used to record fulfillment of special order instructions
                    during packing.
                  additionalProperties:
                    type: integer
                    minimum: 1
                    description: Quantity of the instruction that was confirmed.
                  example:
                    '123': 2
                    '456': 1
      responses:
        '200':
          description: Shipment packed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  warnings:
                    type: array
                    description: Any warnings generated during the packing process
                    items:
                      type: string
                    example:
                      - Address validation warning
                  labels:
                    type: object
                    description: >-
                      Base64-encoded PDF labels (returned only when
                      `return_label` is `true`).

                      Available keys depend on shipment type and requirements.
                    properties:
                      shipping_label:
                        type: string
                        format: byte
                        description: Base64-encoded shipping label PDF
                      customs_documents:
                        type: string
                        format: byte
                        description: Base64-encoded customs documents PDF
                      bill_of_lading:
                        type: string
                        format: byte
                        description: Base64-encoded bill of lading PDF
                      hazmat_shipping_papers:
                        type: string
                        format: byte
                        description: Base64-encoded hazmat shipping papers PDF
                      hazmat_shippers_declaration:
                        type: string
                        format: byte
                        description: Base64-encoded hazmat shipper's declaration PDF
                      sscc_pack_label:
                        type: string
                        format: byte
                        description: Base64-encoded SSCC pack label PDF
                  messages:
                    type: array
                    description: >-
                      Status messages about printing operations (returned only
                      when `print_label` is `true`)
                    items:
                      type: string
                    example:
                      - >-
                        Labels have been sent to the label printer
                        (label-printer-01).
                      - >-
                        Customs Documents have been sent to the laser printer
                        (laser-printer-01).
        '400':
          $ref: '#/components/responses/Shipping_API_v1_400-bad-request'
        '404':
          $ref: '#/components/responses/Shipping_API_v1_404-not-found'
        '422':
          $ref: '#/components/responses/Shipping_API_v1_422-unprocessable'
        '500':
          $ref: '#/components/responses/Shipping_API_v1_500-internal-server-error'
components:
  schemas:
    Shipping_API_v1_Package:
      title: ShipmentPackage
      type: object
      properties:
        type:
          type: string
          enum:
            - ShipmentPackage
          readOnly: true
        id:
          type: integer
          format: int32
          readOnly: true
          description: >-
            The internal `id` property used as a path parameter in a resource
            lookup.
        status:
          type: string
          description: The status of the package.
          enum:
            - packing
            - tracking_required
            - packed
            - manifested
            - shipped
            - delivered
          readOnly: true
        actual_weight:
          allOf:
            - $ref: '#/components/schemas/Shipping_API_v1_Weight'
            - description: >-
                The weight of the package as measured or estimated based on the
                contents and packaging.
        dimensions:
          allOf:
            - $ref: '#/components/schemas/Shipping_API_v1_Dimensions'
            - description: The dimensions of the package.
        customs_value:
          allOf:
            - $ref: '#/components/schemas/Shipping_API_v1_Monetary'
            - description: The combined customs value of all items in this package.
        declared_value:
          allOf:
            - $ref: '#/components/schemas/Shipping_API_v1_Monetary'
            - description: The combined declared value of all items in this package.
        regulation_type:
          type: string
          description: The type of regulation which applies to this package.
          enum:
            - normal
            - orm-d
            - limited
            - small
            - li-battery
            - hazmat
          readOnly: true
        tracking_number:
          type: string
          description: >-
            The tracking number to be associated with the shipment for use by
            the customer.
          nullable: true
        tracking_description:
          type: string
          description: >-
            A description of the tracking number. For parcel this is usually the
            name of the carrier and service level. For freight shipments it is
            usually just "PRO Number".
          nullable: true
        tracking_url:
          type: string
          description: >-
            A URL that can be provided to customers to track their shipment
            status.
          nullable: true
        tracking_ref:
          type: string
          description: >-
            A reference number to this package for external systems. This is not
            visible in the UI and typically reserved for internal use.
          nullable: true
        alt_tracking_number:
          type: string
          description: >-
            An alternative tracking number pertaining to the package if
            available. For freight shipments this is usually the Bill of Lading
            number.
          nullable: true
        alt_tracking_description:
          type: string
          description: >-
            A description of the alternative tracking number if one is
            specified. For freight shipments this is usually "BOL Number".
          nullable: true
        billable_weight:
          allOf:
            - $ref: '#/components/schemas/Shipping_API_v1_Weight'
            - description: >-
                The billable weight of the package. This is typically the
                greater of the actual weight and the

                dimensional weight but may also be subject to a minimum billable
                weight depending on the

                carrier and service level.
          readOnly: true
        dimensional_weight:
          allOf:
            - $ref: '#/components/schemas/Shipping_API_v1_Weight'
            - description: >-
                The dimensional weight of the package based on the dimensions
                and the dimensional weight divisor.
          readOnly: true
        dimensional_weight_divisor:
          allOf:
            - $ref: '#/components/schemas/Shipping_API_v1_DimweightDivisor'
            - description: >-
                The dimensional weight of the package based on the dimensions
                and the dimensional weight divisor.
          readOnly: true
        total_item_volume:
          allOf:
            - $ref: '#/components/schemas/Shipping_API_v1_Volume'
            - description: >-
                The total item volume using rounding techniques used commonly by
                carriers for calculating dimensional weight.
          readOnly: true
        total_void_percent:
          type: number
          description: >-
            The amount of void space in the package as a percent of the total
            package volume.
          format: float
          readOnly: true
        container_style:
          type: string
          description: The style of container used for the package.
          enum:
            - rigid_box
            - multi_depth_box
            - telescopic
            - mailer
            - pallet
            - bubble_mailer
            - rigid_mailer
          readOnly: true
        num_cartons:
          type: number
          description: >-
            The number of cartons contained in this package (used only for
            `container_type: pallet`).
          format: int32
          readOnly: true
        sscc:
          type: string
          description: The Serial Shipping Container Code if one was generated.
        manifest_code:
          type: string
          description: >-
            The code of the manifest courier by which the package is being
            shipped.
        items:
          type: array
          description: A list of items contained in the package.
          items:
            $ref: '#/components/schemas/Shipping_API_v1_Item-2'
        container:
          allOf:
            - $ref: '#/components/schemas/Shipping_API_v1_ProductRef'
            - description: >-
                A reference to the packaging product which was used as the
                container for the package (if one was used).
        infill:
          $ref: '#/components/schemas/Shipping_API_v1_ProductRef'
        packaging:
          allOf:
            - $ref: '#/components/schemas/Shipping_API_v1_PackagePackaging'
            - description: Packaging data to be used in the packing process.
        collected_data:
          allOf:
            - $ref: '#/components/schemas/Shipping_API_v1_CollectedData'
            - description: Data collected for a shipment package.
        created_at:
          $ref: '#/components/schemas/Shipping_API_v1_created_at'
          readOnly: true
        updated_at:
          $ref: '#/components/schemas/Shipping_API_v1_updated_at'
          readOnly: true
    Shipping_API_v1_printers:
      type: object
      description: >-
        Specifies the printers to be used. The required printers depend on the
        shipment contents and type when `print_label` is true.

        - `small_label` is required for printing SSCC labels when the print
        target is configured for small labels.

        - `label` is required for parcel shipping labels or for SSCC labels when
        the print target is configured for standard labels.

        - `laser` is required for freight shipments, hazmat shipments, or other
        documents like customs forms and bills of lading.
      properties:
        small_label:
          type: string
          description: >-
            The printer name/identifier for small label printing (typically used
            for SSCC labels).
          example: small-printer-01
        label:
          type: string
          description: The printer name/identifier for standard label printing.
          example: label-printer-01
        laser:
          type: string
          description: The printer name/identifier for laser/document printing.
          example: laser-printer-01
    Shipping_API_v1_Weight:
      title: Weight
      type: object
      nullable: true
      properties:
        value:
          type: number
          description: >-
            The weight quantity defined as a floating point value of up to 4
            decimal places.
          format: float
          example: 20
        unit:
          $ref: '#/components/schemas/Shipping_API_v1_WeightUnit'
    Shipping_API_v1_Dimensions:
      title: Dimensions
      type: object
      nullable: true
      properties:
        length:
          type: number
          description: >-
            This distance value is usually assigned to the longest side of the
            object and is defined as a floating-point number up to 4 decimal
            places.
          format: float
          example: 8
        width:
          type: number
          description: >-
            This value describes the horizontal distance of the subject defined
            as a floating-point number up to 4 decimal places.
          format: float
          example: 6
        height:
          type: number
          description: >-
            This value describes the vertical distance of the subject defined as
            a floating-point number up to 4 decimal places.
          format: float
          example: 4
        unit:
          $ref: '#/components/schemas/Shipping_API_v1_LengthUnit'
    Shipping_API_v1_Monetary:
      title: Monetary
      type: object
      nullable: true
      properties:
        amount:
          type: number
          description: This is the monetary value..
          format: float
          example: 99
        currency:
          type: string
          description: An ISO 3166-1 alpha-3 currency code.
          example: USD
    Shipping_API_v1_DimweightDivisor:
      title: DimweightDivisor
      type: object
      properties:
        value:
          type: number
          format: float
          example: 139
          description: The value of the dim-weight divisor.
        unit:
          $ref: '#/components/schemas/Shipping_API_v1_DimweightDivisorUnit'
    Shipping_API_v1_Volume:
      title: Volume
      type: object
      nullable: true
      properties:
        value:
          type: number
          description: >-
            This value describes the cubic size of the subject as a
            floating-point number up to 4 decimal places.
          format: float
          example: 300
        unit:
          $ref: '#/components/schemas/Shipping_API_v1_VolumeUnit'
    Shipping_API_v1_Item-2:
      title: PackageItem
      type: object
      properties:
        sku:
          type: string
          description: The SKU of the item.
        name:
          type: string
          description: The name of the item.
        quantity:
          type: number
          description: The number of units of this item contained in the package.
        weight:
          allOf:
            - $ref: '#/components/schemas/Shipping_API_v1_Weight'
            - description: >-
                The combined weight of all units of this item shipped in this
                package.
        hazmat_unit_weight:
          allOf:
            - $ref: '#/components/schemas/Shipping_API_v1_Weight'
            - description: >-
                The net hazmat weight of a single units of this item. If a Net
                Hazmat Weight was not

                defined for the product at the time of shipping, this will be
                the product's weight for a single unit (gross weight).
        customs_value:
          allOf:
            - $ref: '#/components/schemas/Shipping_API_v1_Monetary'
            - description: >-
                The combined customs value of all units of this item shipped in
                this package.
        order_item_id:
          type: number
          description: A reference to the `OrderItem` to which this package item relates.
          format: int32
        order_item_sku:
          type: string
          description: The SKU of the `OrderItem` to which this package item relates.
        order_item_quantity:
          type: number
          description: >-
            The number of units of the related `OrderItem` which this package
            item represents.


            *Beware*, this number is susceptible to complex rounding issues. For
            example, if an order item which consists of three

            package items is shipped, 0.3333 + 0.3333 + 0.3333 will add up to
            0.9999 rather than 1.0.
          format: float
    Shipping_API_v1_ProductRef:
      title: ProductRef
      type: object
      description: A reference to a `Product` object by `id`.
      properties:
        type:
          type: string
          enum:
            - Product
          description: This property describes the type of object in the response body.
        id:
          type: integer
          format: int32
          example: 3
          description: >-
            The internal `id` property used as a path parameter in a resource
            lookup.
      required:
        - type
        - id
      additionalProperties: false
    Shipping_API_v1_PackagePackaging:
      type: object
      title: PackagePackaging
      properties:
        product:
          $ref: '#/components/schemas/Shipping_API_v1_ProductRef'
        quantity:
          type: integer
          example: 4
          description: The product quantity in the package.
      required:
        - product
        - quantity
      additionalProperties: false
    Shipping_API_v1_CollectedData:
      type: object
      title: CollectedData
      properties:
        order_item_id:
          type: integer
          format: int32
          description: >-
            The internal `id` property used as a path parameter in a resource
            lookup.
          readOnly: true
          example: 4
        label:
          type: string
          description: The label of the collected order item.
        value:
          type: string
          description: The value of the collected order item.
    Shipping_API_v1_created_at:
      type: string
      format: date-time
      description: >-
        The date and time the object was created in RFC 3339 section 5.6
        notation.
      example: '2017-07-21T17:32:28Z'
      readOnly: true
    Shipping_API_v1_updated_at:
      type: string
      format: date-time
      description: >-
        The date and time the object was last updated in RFC 3339 section 5.6
        notation.\
          `Optional Field`
      example: '2017-07-21T17:39:43Z'
      nullable: true
      readOnly: true
    Shipping_API_v1_WeightUnit:
      type: string
      description: This can be an imperial or metric unit for weight.
      enum:
        - lb
        - oz
        - kg
        - g
    Shipping_API_v1_LengthUnit:
      type: string
      description: The imperical or metric unit of measurement.
      enum:
        - in
        - mm
        - cm
        - m
    Shipping_API_v1_DimweightDivisorUnit:
      type: string
      enum:
        - in^3/lb
        - in^3/oz
        - cm^3/kg
        - mm^3/kg
        - cm^3/g
        - mm^3/g
      description: The unit of measurement for the dim-weight divisor.
    Shipping_API_v1_VolumeUnit:
      type: string
      description: The imperical or metric unit of measurement as a cubic value.
      enum:
        - in^3
        - mm^3
        - cm^3
        - m^3
  responses:
    Shipping_API_v1_400-bad-request:
      description: >-
        The request was invalid. The client must change the request. See the
        response body for more details.
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                      description: The error type code.
                      enum:
                        - parser
                        - parameters
                        - openapi
                    message:
                      type: string
                      description: An English sentence describing the error type.
                    details:
                      type: array
                      description: >-
                        An array of objects describing which keys are
                        responsible for the error and detailed messages
                        describing why they are not valid.
                      items:
                        type: object
                        properties:
                          key:
                            type: string
                            description: The path to the key which relates to the error.
                          message:
                            type: string
                            description: >-
                              An English sentence describing the details of the
                              error.
                        additionalProperties: false
                  additionalProperties: false
                minItems: 1
            additionalProperties: false
          example:
            errors:
              - type: parameters
                message: The supplied parameters are invalid.
                details:
                  - key: hold_until_date
                    message: The date must be in the future.
    Shipping_API_v1_404-not-found:
      description: >-
        The requested resource was not found. It may have been deleted, it may
        have never existed, or you may not have permission to view it.
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                      description: The error type code.
                      enum:
                        - not_found
                    message:
                      type: string
                      description: An English sentence describing the error type.
                    details:
                      type: array
                      description: >-
                        An array of objects describing which keys are
                        responsible for the error and detailed messages
                        describing why they are not valid.
                      items:
                        type: object
                        properties:
                          key:
                            type: string
                            description: The path to the key which relates to the error.
                          message:
                            type: string
                            description: >-
                              An English sentence describing the details of the
                              error.
                        additionalProperties: false
                  additionalProperties: false
                minItems: 1
            additionalProperties: false
          example:
            errors:
              - type: not_found
                message: The server could not find the requested resource.
    Shipping_API_v1_422-unprocessable:
      description: >-
        There was an error processing the request. See the response body for
        more details.
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                      description: The error type code.
                      enum:
                        - application
                        - unable_to_process
                    message:
                      type: string
                      description: An English sentence describing the error type.
                    details:
                      type: array
                      description: >-
                        An array of objects describing which keys are
                        responsible for the error and detailed messages
                        describing why they are not valid.
                      items:
                        type: object
                        properties:
                          key:
                            type: string
                            description: The path to the key which relates to the error.
                          message:
                            type: string
                            description: >-
                              An English sentence describing the details of the
                              error.
                        additionalProperties: false
                  additionalProperties: false
                minItems: 1
            additionalProperties: false
          example:
            errors:
              - type: unable_to_process
                message: The supplied parameters are invalid.
                details:
                  - key: hold_until_date
                    message: The date must be in the future.
    Shipping_API_v1_500-internal-server-error:
      description: >-
        Internal Server Error - Something wrong happened at server side. Contact
        server administrator for more details.
  securitySchemes:
    ShipStream_bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Generate a JWT access token through a Custom Global Integration and
        provide it with each request in the `Authorization` header prefixed with
        "Bearer" and then a single space.

````