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

# Create Return Shipment

> Creates a shipment by grouping together multiple packages into logical shipments.



## OpenAPI

````yaml /openapi/openapi_commerce.json post /commerce/returns/{returnId}/shipments
openapi: 3.0.1
info:
  description: |-
    <div id="overview_COMMERCE">
                <h2>COMMERCE</h2>
                <p>The Commerce API interacts with the commerce entities of your tenant, including shoppers's active shopping
                    carts, checkouts, submitted orders, wishlists, and returns as well as B2B quotes.</p>
                <p>Use the <strong>Carts</strong> resource to manage storefront shopping carts as shoppers add and remove items for purchase.
                    Each time a shopper's cart is modified, the Carts resource updates the estimated total with any
                    applicable
                    discounts.</p>
                <p>Use the <strong>Channels</strong> and <strong>Channel Groups</strong> resources to manage the channels a company uses to create logical
                    commercial business divisions based on region or types of sales, such as "US Online," "Amazon," or "EMEA
                    Retail."
                    All orders include a channel association that enables the company to perform financial reporting for
                    each defined channel.
                    Because channels are managed at the tenant level, you must associate all the tenant's sites with a
                    channel. Sites that do not
                    have a defined channel association cannot successfully submit orders.</p>
                <p>Use the <strong>Checkouts</strong> resource to track a shopper's order items and their intended destinations on sites that
                    have the multiple shipment feature enabled.</p>
                <p>Use the <strong>Orders</strong> resource to manage all components of order processing, payment, and order-level
                    fulfillment.</p>
                <p>Use the <strong>Quotes</strong> resource to support B2B functionality by managing order quotes, similar to wishlists.</p>
                <p>Use the <strong>Returns</strong> resource to manage returned items that were previously fufilled. Returns can include any
                    number of items associated with an original
                    order. Each return must either be associated with an original order or a product definition to represent
                    each returned item.</p>
                <p>Use the <strong>Wish Lists</strong> resource to manage the shopper wish lists of products associated with a customer
                    account. Although customer accounts are managed at the tenant
                    level, the system stores shopper wish lists at the site level. This enables the same customer to have
                    wish lists for each of a merchant's sites. The <strong>Wish List Items</strong>
                    resource allows you to manage the individual items in a wish list.</p>
            </div>
  title: Cart/Checkout/Quote
  version: 0.0.1
servers:
  - description: Kibo Base URL
    url: '{baseUrl}/api'
    variables:
      baseUrl:
        default: https://t1000000.sb.usc1.gcp.kibocommerce.com
        description: Base URL
security:
  - bearerAuth: []
paths:
  /commerce/returns/{returnId}/shipments:
    post:
      tags:
        - Return
      summary: Create Return Shipment
      description: >-
        Creates a shipment by grouping together multiple packages into logical
        shipments.
      parameters:
        - description: Unique identifier of the order which is ready to be shipped.
          in: path
          name: returnId
          required: true
          schema:
            type: string
        - description: limits which fields are returned in the response body
          in: query
          name: responseFields
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              items:
                type: string
              type: array
        description: Package ids to use in creating shipments.
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/CommerceRuntimePackage'
                type: array
            text/json:
              schema:
                items:
                  $ref: '#/components/schemas/CommerceRuntimePackage'
                type: array
            text/plain:
              schema:
                items:
                  $ref: '#/components/schemas/CommerceRuntimePackage'
                type: array
          description: Success
components:
  schemas:
    CommerceRuntimePackage:
      allOf:
        - $ref: '#/components/schemas/CommerceRuntimeCollectionOfPackageItem'
      description: Describes a package that will be shipped to somebody
      properties:
        attributes:
          additionalProperties: {}
          nullable: true
          type: object
        carrier:
          description: Carrier of this package
          nullable: true
          type: string
        fxcbDocumentsUrl:
          nullable: true
          type: string
        fxcbPackNotificationId:
          nullable: true
          type: string
        hasLabel:
          description: >-
            If there is a shipping label present for this Package, this will be
            set to true
          type: boolean
        integratorId:
          nullable: true
          type: string
        labelFormat:
          nullable: true
          type: string
        manifestId:
          nullable: true
          type: string
        measurements:
          $ref: '#/components/schemas/CommerceRuntimePackageMeasurements'
        packageId:
          nullable: true
          type: string
        packagingType:
          description: Packaging type of this package
          nullable: true
          type: string
        packingSlipItemDetails:
          description: PackingSlipItemDetails for this package
          items:
            $ref: '#/components/schemas/CommerceRuntimePackingSlipItemDetail'
          nullable: true
          type: array
        packingSlipNumber:
          description: PackingSlipNumber for this package
          format: int32
          nullable: true
          type: integer
        returnCarrier:
          nullable: true
          type: string
        returnTrackingNumbers:
          items:
            type: string
          nullable: true
          type: array
        returnTrackings:
          items:
            $ref: '#/components/schemas/CommerceRuntimeTracking'
          nullable: true
          type: array
        shipmentId:
          description: ID of the related shipment
          nullable: true
          type: string
        shippingMethodCode:
          description: Code describing the shipping method.
          nullable: true
          type: string
        shippingMethodName:
          description: Name of the shipping method
          nullable: true
          type: string
        signatureRequired:
          description: SignatureRequired for this package
          nullable: true
          type: boolean
        trackingNumber:
          description: Tracking number of this package (to support classic use cases)
          nullable: true
          type: string
        trackingNumbers:
          description: Tracking number of this package
          items:
            type: string
          nullable: true
          type: array
        trackings:
          description: Tracking number and url data for this package
          items:
            $ref: '#/components/schemas/CommerceRuntimeTracking'
          nullable: true
          type: array
      type: object
    CommerceRuntimeCollectionOfPackageItem:
      properties:
        auditInfo:
          $ref: '#/components/schemas/AdminUserAuditInfo'
        availableActions:
          description: Actions that can be taken on this fulfillment unit
          items:
            type: string
          nullable: true
          type: array
        changeMessages:
          description: Change messages related to the fulfillment unit.
          items:
            $ref: '#/components/schemas/CommerceRuntimeChangeMessage'
          nullable: true
          type: array
        code:
          description: "A human-readable identifier for this fulfillment unit.  If not set on create, will be autogenerated as a string of the form\r\n    {fulfillmentUnitType} #{next available int}"
          nullable: true
          type: string
        fulfillmentDate:
          description: Date of the pickup
          format: date-time
          nullable: true
          type: string
        fulfillmentLocationCode:
          description: Location code from which to obtain this item
          nullable: true
          type: string
        id:
          description: ID of the fulfillment unit.
          nullable: true
          type: string
        items:
          description: List of items in the fulfillment unit
          items:
            $ref: '#/components/schemas/CommerceRuntimePackageItem'
          nullable: true
          type: array
        status:
          description: "Status of the fulfillment unit\r\nSee FulfillmentStatusConst"
          nullable: true
          type: string
      type: object
    CommerceRuntimePackageMeasurements:
      description: >-
        Physical dimensions of the package required to ship the product and its
        weight.
      properties:
        height:
          $ref: '#/components/schemas/CommerceRuntimeMeasurement'
        length:
          $ref: '#/components/schemas/CommerceRuntimeMeasurement'
        weight:
          $ref: '#/components/schemas/CommerceRuntimeMeasurement'
        width:
          $ref: '#/components/schemas/CommerceRuntimeMeasurement'
      type: object
    CommerceRuntimePackingSlipItemDetail:
      properties:
        attributes:
          additionalProperties: {}
          description: Gets or Sets Attributes
          nullable: true
          type: object
        lineId:
          description: Gets or Sets LineId
          format: int32
          nullable: true
          type: integer
        originalOrderItemId:
          description: Gets or Sets OriginalOrderItemId
          nullable: true
          type: string
        quantity:
          description: Gets or Sets Quantity
          format: int32
          nullable: true
          type: integer
      type: object
    CommerceRuntimeTracking:
      properties:
        attributes:
          additionalProperties: {}
          nullable: true
          type: object
        number:
          nullable: true
          type: string
        url:
          nullable: true
          type: string
      type: object
    AdminUserAuditInfo:
      properties:
        createBy:
          nullable: true
          type: string
        createDate:
          format: date-time
          nullable: true
          type: string
        updateBy:
          nullable: true
          type: string
        updateDate:
          format: date-time
          nullable: true
          type: string
      type: object
    CommerceRuntimeChangeMessage:
      description: >-
        A message displayed by the system based on the last  action, for
        example, when a product price has changed. System-supplied and
        read-only.
      properties:
        amount:
          deprecated: true
          description: Monetary amount that pertains to the change if applicable
          format: double
          nullable: true
          type: number
        appId:
          description: App Id that identifies the user that performed the related change
          nullable: true
          type: string
        appKey:
          description: App Key
          nullable: true
          type: string
        appName:
          description: App Name
          nullable: true
          type: string
        attributes:
          additionalProperties: {}
          description: Additional Data. This property will be a Dictionary of objects.
          nullable: true
          type: object
        correlationId:
          description: Correlation Id
          nullable: true
          type: string
        createDate:
          description: When the message was created. System-supplied. Read-only.
          format: date-time
          nullable: true
          type: string
        id:
          description: Unique identifier of the  message. System-supplied. Read-only.
          nullable: true
          type: string
        identifier:
          description: >-
            Unique identifier to what the message pertains, which can be a cart
            item, cart or another generic entity. System-supplied. Read-only.
          nullable: true
          type: string
        message:
          description: Human readable message. System-supplied. Read-only.
          nullable: true
          type: string
        metadata:
          description: >-
            Data. This property will be a JSON array that will contain 0-N
            items, when there is 1 item it will still be an array containing
            only one item. System-supplied. Read-only.
          nullable: true
        newValue:
          deprecated: true
          description: Current price of the item. System-supplied. Read-only.
          nullable: true
          type: string
        oldValue:
          deprecated: true
          description: Original price of the item. System-supplied. Read-only.
          nullable: true
          type: string
        subject:
          description: >-
            Text on the subject line of the message, for example, the product
            name. System-supplied. Read-only.
          nullable: true
          type: string
        subjectType:
          description: >-
            Subject of the message, for example, "Product." System-supplied.
            Read-only.
          nullable: true
          type: string
        success:
          description: Indicates if the message is related to a success or failure.
          nullable: true
          type: boolean
        userFirstName:
          description: User First Name
          nullable: true
          type: string
        userId:
          description: User Id that identifies the user that performed the related change
          nullable: true
          type: string
        userLastName:
          description: User Last Name
          nullable: true
          type: string
        userScopeType:
          description: User Type (e.g. Shopper, Admin, etc.)
          nullable: true
          type: string
        verb:
          description: "Action applicable to the message. This can be \"Increased,\" when the product price has increased, \"Decreased,\" when the \r\nproduct price has decreased, and \"Invalidated,\" when the product is no longer available. System-supplied. Read-only."
          nullable: true
          type: string
      type: object
    CommerceRuntimePackageItem:
      allOf:
        - $ref: '#/components/schemas/AbstractFulfillmentItem'
      description: An item in a package representing a particular product.
      type: object
    CommerceRuntimeMeasurement:
      properties:
        unit:
          nullable: true
          type: string
        value:
          format: double
          nullable: true
          type: number
      type: object
    AbstractFulfillmentItem:
      properties:
        fulfillmentItemType:
          description: The type of fulfillment item
          nullable: true
          type: string
        lineId:
          description: The line id associated with the fulfillment.
          format: int32
          nullable: true
          type: integer
        optionAttributeFQN:
          nullable: true
          type: string
        productCode:
          description: Code of the Product to be fulfilled.
          nullable: true
          type: string
        quantity:
          description: Quantity of the order item
          format: int32
          type: integer
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: JWT Authorization header using the Bearer scheme.
      scheme: bearer
      type: http

````