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

# Add or replace bundles

> Add or replace bundles, identified by parent SKU.

A bundle groups several products under one product that shoppers buy. When
a bundle is returned, Redo uses this definition to break it back into the
products it contains.

Send the same payload whether a bundle is new or already exists. A bundle
whose parent SKU is already stored is replaced; bundles you do not send are
left alone. To remove a bundle, call
`DELETE /stores/{storeId}/bundles/{parentSku}`.

## If your store reuses SKUs

Your store does not require SKUs to be unique. If the same SKU can be on
more than one variant, always send `parent_variant_id` and
`children_skus[].variant_id` so Redo knows which variant you mean. Without
them, a bundle containing a shared SKU is not stored and its result is
`ambiguous`, listing the `variant_ids` to choose from. Stores with unique
SKUs can leave these fields out.

## Quantities

`quantity` is how many units of a child the bundle contains, and it affects
how a refund is split across the bundle. Maximum 100 per child. Listing the
same child twice adds the quantities together.

## Return types

`return_types` limits the bundle to specific return types. Omit it to apply
the bundle to all of them. It replaces whatever was previously set, so
include it on every request if you rely on it.

## Reading the response

A `200` means the request was processed, not that every bundle was stored.
Check each entry in `results`:

- `applied` — stored as requested.
- `failed` — a SKU matched no product. `unresolved_skus` names each one.
  Common causes are a typo, a deleted product, or a variant with no SKU
  set.
- `ambiguous` — a SKU is on more than one variant and no variant was given.
  See above.

A single bad child is enough to skip the whole bundle. SKUs are matched
exactly and are case-sensitive.

## Limits

Send at most 100 bundles per request; split larger sets into batches.
Entries that share a `parent_sku` are merged into one bundle. Only one
upload can run per store at a time, shared with the CSV upload in Redo; a
request that arrives during another returns `409` and can be retried.

Requires the [`returns_write`](/docs/api-reference/scopes) scope.




## OpenAPI

````yaml /api-schema/openapi.yaml put /stores/{storeId}/bundles
openapi: 3.1.0
info:
  contact:
    email: engineering-admin@getredo.com
    name: Redo Engineering
  description: |
    ## Endpoints

    Endpoints are authenticated using the Bearer authorization scheme, using the
    REDO_API_SECRET.

    ```txt
    GET /v2.2/resource HTTP/1.1
    Authorization: Bearer 77bb7598b7a972475cc7c7e171ec33af
    Host: api.getredo.com
    ```

    ## Webhooks

    Webhooks are authenticated using the Bearer authorization scheme, using
    a secret supplied by the subscriber.

    ```txt
    POST /events HTTP/1.1
    Authorization: Bearer subscriberauth123
    Host: subscriber.example.com
    ```

    Webhook events are delivered in order for each individual subject (e.g.
    return).

    If the response is not a 2xx status code, the event will be retried multiple
    times before discarding it.
  title: Redo API
  version: 2.2.1
servers:
  - url: https://api.getredo.com/v2.2
security: []
tags:
  - description: >-
      Group several products under one product shoppers buy, so a returned
      bundle can be broken back into the products it contains.
    name: Bundles
  - name: Checkout Buttons
  - name: Coverage Info
  - name: Coverage Products
  - name: Custom Events
  - name: Customer Portal
  - name: Customer Subscriptions
  - name: Customers
  - name: Inbound Shipments
  - name: Inventory Items
  - name: Inventory Levels
  - name: Invoices
  - name: Merchant Admin
  - name: Orders
  - name: Products
  - name: Returns
  - description: >-
      Push orders into Redo from a commerce platform Redo does not support
      directly, so shoppers can return them.
    name: Returns Custom Integration
  - name: Storefront
  - name: Webhooks
paths:
  /stores/{storeId}/bundles:
    summary: Bundles
    parameters:
      - $ref: '#/components/parameters/store-id.param'
    put:
      tags:
        - Bundles
      summary: Add or replace bundles
      description: >
        Add or replace bundles, identified by parent SKU.


        A bundle groups several products under one product that shoppers buy.
        When

        a bundle is returned, Redo uses this definition to break it back into
        the

        products it contains.


        Send the same payload whether a bundle is new or already exists. A
        bundle

        whose parent SKU is already stored is replaced; bundles you do not send
        are

        left alone. To remove a bundle, call

        `DELETE /stores/{storeId}/bundles/{parentSku}`.


        ## If your store reuses SKUs


        Your store does not require SKUs to be unique. If the same SKU can be on

        more than one variant, always send `parent_variant_id` and

        `children_skus[].variant_id` so Redo knows which variant you mean.
        Without

        them, a bundle containing a shared SKU is not stored and its result is

        `ambiguous`, listing the `variant_ids` to choose from. Stores with
        unique

        SKUs can leave these fields out.


        ## Quantities


        `quantity` is how many units of a child the bundle contains, and it
        affects

        how a refund is split across the bundle. Maximum 100 per child. Listing
        the

        same child twice adds the quantities together.


        ## Return types


        `return_types` limits the bundle to specific return types. Omit it to
        apply

        the bundle to all of them. It replaces whatever was previously set, so

        include it on every request if you rely on it.


        ## Reading the response


        A `200` means the request was processed, not that every bundle was
        stored.

        Check each entry in `results`:


        - `applied` — stored as requested.

        - `failed` — a SKU matched no product. `unresolved_skus` names each one.
          Common causes are a typo, a deleted product, or a variant with no SKU
          set.
        - `ambiguous` — a SKU is on more than one variant and no variant was
        given.
          See above.

        A single bad child is enough to skip the whole bundle. SKUs are matched

        exactly and are case-sensitive.


        ## Limits


        Send at most 100 bundles per request; split larger sets into batches.

        Entries that share a `parent_sku` are merged into one bundle. Only one

        upload can run per store at a time, shared with the CSV upload in Redo;
        a

        request that arrives during another returns `409` and can be retried.


        Requires the [`returns_write`](/docs/api-reference/scopes) scope.
      operationId: Bundles upsert
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/bundle-upsert-request.schema'
            examples:
              single_bundle:
                summary: One bundle containing two products
                value:
                  - parent_sku: BUNDLE-STARTER-KIT
                    children_skus:
                      - sku: SOCKS-BLK-L
                        quantity: 1
                      - sku: TSHIRT-BLK-M
                        quantity: 2
              restricted_return_types:
                summary: A bundle that only applies to returns and warranties
                value:
                  - parent_sku: BUNDLE-BEDDING
                    children_skus:
                      - sku: SHEET-QUEEN-WHT
                        quantity: 1
                      - sku: PILLOWCASE-WHT
                        quantity: 2
                    return_types:
                      - return
                      - warranty
              shared_sku:
                summary: Choosing a variant after an ambiguous result
                value:
                  - parent_sku: BUNDLE-STARTER-KIT
                    parent_variant_id: '55518673568035'
                    children_skus:
                      - sku: SOCKS-BLK-L
                        quantity: 1
                      - sku: TSHIRT-BLK-M
                        quantity: 2
                        variant_id: '55518673600803'
              multiple_bundles:
                summary: Several bundles in one request
                value:
                  - parent_sku: BUNDLE-STARTER-KIT
                    children_skus:
                      - sku: SOCKS-BLK-L
                        quantity: 1
                      - sku: TSHIRT-BLK-M
                        quantity: 1
                  - parent_sku: BUNDLE-DELUXE-KIT
                    children_skus:
                      - sku: SOCKS-BLK-L
                        quantity: 1
                      - sku: TSHIRT-BLK-M
                        quantity: 4
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bundle-upsert-response.schema'
              examples:
                all_applied:
                  summary: Every bundle stored
                  value:
                    total_count: 2
                    applied_count: 2
                    failed_count: 0
                    ambiguous_count: 0
                    results:
                      - parent_sku: BUNDLE-STARTER-KIT
                        status: applied
                      - parent_sku: BUNDLE-DELUXE-KIT
                        status: applied
                partial_failure:
                  summary: One bundle skipped because a SKU was not found
                  value:
                    total_count: 2
                    applied_count: 1
                    failed_count: 1
                    ambiguous_count: 0
                    results:
                      - parent_sku: BUNDLE-STARTER-KIT
                        status: applied
                      - parent_sku: BUNDLE-DELUXE-KIT
                        status: failed
                        unresolved_skus:
                          - TSHIRT-BLK-XL
                ambiguous:
                  summary: A SKU is on more than one variant
                  value:
                    total_count: 1
                    applied_count: 0
                    failed_count: 0
                    ambiguous_count: 1
                    results:
                      - parent_sku: BUNDLE-STARTER-KIT
                        status: ambiguous
                        ambiguous_skus:
                          - sku: TSHIRT-BLK-M
                            variant_ids:
                              - '55518673600803'
                              - '55518673633571'
          description: Request processed. Check `results` to see which bundles were stored.
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/error.schema'
          description: >-
            Invalid request body, an unrecognized return type, a blank SKU, a
            quantity above 100, or more than 100 bundles
        '409':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/error.schema'
          description: A bundle upload is already in progress for this store
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/error.schema'
          description: Error
      security:
        - Bearer: []
components:
  parameters:
    store-id.param:
      description: Store ID
      in: path
      name: storeId
      required: true
      schema:
        example: 64e5a8a1af49a89df37e4ee7
        type: string
  schemas:
    bundle-upsert-request.schema:
      description: >-
        Bundles to add or replace. Send the same payload whether a bundle is new
        or already exists. Between 1 and 100 per request.
      items:
        $ref: '#/components/schemas/bundle.schema'
      maxItems: 100
      minItems: 1
      title: Bundle Upsert Request
      type: array
    bundle-upsert-response.schema:
      description: Outcome of a bundle upsert, reported for each bundle in the request.
      properties:
        total_count:
          description: >-
            Number of bundles processed, after merging entries that share a
            `parent_sku`.
          title: Total Count
          type: integer
        applied_count:
          description: Number of bundles now stored as requested.
          title: Applied Count
          type: integer
        failed_count:
          description: Number of bundles skipped because a SKU was not found.
          title: Failed Count
          type: integer
        ambiguous_count:
          description: >-
            Number of bundles skipped because a SKU is on more than one variant
            and no variant was given.
          title: Ambiguous Count
          type: integer
        results:
          description: One entry per bundle, in the order they were submitted.
          items:
            properties:
              parent_sku:
                description: Parent SKU of the bundle this result describes.
                title: Parent SKU
                type: string
              status:
                description: >-
                  `applied`: stored as requested. `failed`: a SKU matched no
                  product; see `unresolved_skus`. `ambiguous`: a SKU is on more
                  than one variant and no variant was given; see
                  `ambiguous_skus`.
                enum:
                  - applied
                  - failed
                  - ambiguous
                title: Status
                type: string
              unresolved_skus:
                description: >-
                  SKUs that matched no product. Present when `status` is
                  `failed`.
                items:
                  type: string
                title: Unresolved SKUs
                type: array
              ambiguous_skus:
                description: >-
                  SKUs on more than one variant, with the variants to choose
                  from. Present when `status` is `ambiguous`.
                items:
                  properties:
                    sku:
                      title: SKU
                      type: string
                    variant_ids:
                      description: Variants that carry this SKU.
                      items:
                        type: string
                      title: Variant IDs
                      type: array
                  required:
                    - sku
                    - variant_ids
                  type: object
                title: Ambiguous SKUs
                type: array
            required:
              - parent_sku
              - status
            type: object
          title: Results
          type: array
      required:
        - total_count
        - applied_count
        - failed_count
        - ambiguous_count
        - results
      title: Bundle Upsert Response
      type: object
    error.schema:
      description: >-
        Problem details. See [RFC 7807 Section
        3](https://datatracker.ietf.org/doc/html/rfc7807#section-3).
      properties:
        detail:
          description: Human-readable description of the problem.
          title: Detail
          type: string
        instance:
          description: A URI reference that identifies this problem.
          format: uri-reference
          type: string
        title:
          description: Human-readable summary of the problem type.
          title: Title
          type: string
        type:
          default: about:blank
          description: A URI reference that identifies the problem type.
          format: uri-reference
          type: string
      title: Problem details
      type: object
    bundle.schema:
      description: >-
        A bundle definition, identified by the SKU of the product that
        represents the bundle itself.
      properties:
        parent_sku:
          description: >-
            SKU of the product shoppers buy. Identifies the bundle.
            Case-sensitive.
          example: BUNDLE-STARTER-KIT
          title: Parent SKU
          type: string
        parent_variant_id:
          description: >-
            The parent variant. Send it if `parent_sku` may be on more than one
            variant in your catalog.
          example: '55518673568035'
          title: Parent Variant ID
          type: string
        children_skus:
          description: The products contained in the bundle.
          items:
            properties:
              sku:
                description: SKU of a product included in the bundle. Case-sensitive.
                example: SOCKS-BLK-L
                title: SKU
                type: string
              quantity:
                default: 1
                description: How many units of this SKU the bundle contains.
                example: 2
                maximum: 100
                minimum: 1
                title: Quantity
                type: integer
              variant_id:
                description: >-
                  The child variant. Send it if `sku` may be on more than one
                  variant in your catalog.
                example: '55518673404195'
                title: Variant ID
                type: string
            required:
              - sku
            type: object
          minItems: 1
          title: Children SKUs
          type: array
        return_types:
          description: Return types this bundle applies to. Omit to apply to all.
          items:
            enum:
              - claim
              - return
              - warranty
              - recycle
              - withdrawal
            type: string
          title: Return Types
          type: array
      required:
        - parent_sku
        - children_skus
      title: Bundle
      type: object
  securitySchemes:
    Bearer:
      scheme: bearer
      type: http

````