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

# Archive bundle

> Archives a bundle and removes it from any packages that include it. Memberships are detached first, then the bundle is archived (HTTP 200). Returns 403 when bundles are not enabled for your organization.



## OpenAPI

````yaml /openapi.json post /api/v1/bundles/{productGroupId}/archive
openapi: 3.1.0
info:
  title: Firstbase API Specification
  description: Integration endpoints for Firstbase
  version: 0.1.0
servers:
  - url: https://apipub.firstbasehq.com
    description: Production
security:
  - ApiKey: []
tags:
  - name: Bundles
    description: Manage product-group bundles
  - name: Catalog
    description: Browse SKUs, brands, and categories
  - name: Inventory
    description: Query and manage inventory items and assets
  - name: Inventory Levels
    description: Configure inventory levels by SKU and warehouse
  - name: Inventory Orders
    description: Create and manage inventory orders
  - name: ITAD
    description: IT asset disposition requests
  - name: New Joiners
    description: Track and remind new joiners
  - name: Offices
    description: Manage office locations
  - name: Orders
    description: Create and track equipment orders
  - name: Packages
    description: Manage equipment packages
  - name: People
    description: Provision and manage users
  - name: Regions
    description: Query regions
  - name: Replacements
    description: Create and manage equipment replacements
  - name: Returns
    description: Create and manage returns
  - name: Shipment
    description: Look up shipments and carriers
  - name: Shipment Notices
    description: Create and manage shipment notices
  - name: Warehouses
    description: Query warehouses
paths:
  /api/v1/bundles/{productGroupId}/archive:
    post:
      tags:
        - Bundles
      summary: Archive bundle
      description: >-
        Archives a bundle and removes it from any packages that include it.
        Memberships are detached first, then the bundle is archived (HTTP 200).
        Returns 403 when bundles are not enabled for your organization.
      operationId: archiveBundleV1
      parameters:
        - name: productGroupId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: UUID of the bundle (product group).
      responses:
        '200':
          description: Bundle archived
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Bundle'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PublicApiHttpErrors'
        '403':
          description: Endpoint not available for this organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiHttpErrors'
        '404':
          description: Bundle not found for the authenticated organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiHttpErrors'
        '409':
          description: Conflict
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PublicApiHttpErrors'
      x-codeSamples:
        - lang: curl
          label: cURL
          source: >-
            curl -sS -X POST
            'https://apipub.firstbasehq.com/api/v1/bundles/{productGroupId}/archive'
            \
              -H 'Authorization: ApiKey YOUR_API_KEY' \
              -H 'Accept: application/json'
components:
  schemas:
    Bundle:
      type: object
      description: Product group bundle and its members
      properties:
        id:
          type: string
          format: uuid
          description: Bundle UUID
        type:
          type: string
          enum:
            - BUNDLE
            - FALLBACK
          description: >-
            Product group type. Bundles returned by this API are always
            `BUNDLE`.
        friendlyId:
          type: string
          description: Human-friendly identifier (GRP-*)
          example: GRP-260914-TEST0001
        name:
          type: string
          description: Display name
          example: Laptop Bundle
        description:
          type: string
          description: Optional short description; null when unset
        coverSkuId:
          type: string
          format: uuid
          description: >-
            Cover image SKU id (a current member); null when unset (default
            icon)
        primaryCategoryCode:
          type: string
          description: Catalog category code this bundle sits under in a package
        region:
          $ref: '#/components/schemas/BundleRegion'
        status:
          type: string
          enum:
            - ACTIVE
            - ARCHIVED
          description: Current status of the resource.
        components:
          type: array
          items:
            $ref: '#/components/schemas/BundleComponent'
          description: Member lines of the bundle, in `sortOrder`.
        referencedPackageCount:
          type: integer
          format: int32
          description: >-
            Distinct packages currently including this bundle. Archiving
            detaches the bundle from all of them, so this is the number of
            packages that will lose it.
          example: 0
        createdBy:
          $ref: '#/components/schemas/BundlePerson'
        updatedBy:
          $ref: '#/components/schemas/BundlePerson'
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the resource was created (ISO-8601).
        updatedAt:
          type: string
          format: date-time
          description: Timestamp when the bundle was last updated (ISO-8601).
      required:
        - components
        - createdAt
        - friendlyId
        - id
        - name
        - referencedPackageCount
        - region
        - status
        - type
        - updatedAt
    PublicApiHttpErrors:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/PublicApiError'
          description: List of error details.
      required:
        - errors
    BundleRegion:
      type: object
      description: Region a bundle is scoped to
      properties:
        id:
          type: string
          format: uuid
          description: Region UUID
          example: 3a68a467-8733-4c8d-a942-16ed7ec33018
        name:
          type: string
          description: Human-readable region name
          example: United States
        code:
          type: string
          description: Short region code
          example: US
      required:
        - code
        - id
        - name
    BundleComponent:
      type: object
      description: Member line of a bundle
      properties:
        id:
          type: string
          format: uuid
          description: Component UUID
        sku:
          $ref: '#/components/schemas/BundleSku'
        quantity:
          type: integer
          format: int32
          description: Quantity of this SKU in the bundle
          example: 1
        required:
          type: boolean
          description: When true, an unfulfillable line blocks the whole bundle
        fulfillmentMode:
          type: string
          enum:
            - WAREHOUSE_ONLY
            - WAREHOUSE_FIRST_THEN_PROCURE
            - ALWAYS_PROCURE_NEW
          description: >-
            How this line is fulfilled: `WAREHOUSE_ONLY` (warehouse stock only),
            `WAREHOUSE_FIRST_THEN_PROCURE` (use warehouse stock, procure the
            remainder), or `ALWAYS_PROCURE_NEW` (always procure new).
        warehouseCondition:
          type: string
          enum:
            - NEW_ONLY
            - NEW_FIRST
            - USED_FIRST
          description: >-
            Which warehouse stock to use: `NEW_ONLY`, `NEW_FIRST` (prefer new,
            then used), or `USED_FIRST` (prefer used, then new). Null when
            `fulfillmentMode` is `ALWAYS_PROCURE_NEW`.
        sortOrder:
          type: integer
          format: int32
          description: Sort order of this member within the bundle
          example: 0
      required:
        - fulfillmentMode
        - id
        - quantity
        - required
        - sku
        - sortOrder
        - warehouseCondition
    BundlePerson:
      type: object
      description: Person who created or last updated the bundle
      properties:
        id:
          type: string
          format: uuid
          description: Person UUID
          example: d7d0d906-425f-402f-bde1-39031c67c40b
        forename:
          type: string
          description: Given name
          example: Ada
        surname:
          type: string
          description: Family name
          example: Lovelace
      required:
        - id
    PublicApiError:
      type: object
      properties:
        detail:
          type: string
          description: Human-readable description of the error
          example: Invalid request
        source:
          type: string
          description: >-
            Entity or field path that caused the error (for example order,
            shipmentNotice, or person:email)
          example: request
      required:
        - detail
        - source
    BundleSku:
      type: object
      description: Catalog SKU referenced by a bundle member
      properties:
        id:
          type: string
          format: uuid
          description: SKU UUID
          example: 7b21c8e0-1a2b-4c3d-9e5f-0123456789ab
        vendorSku:
          type: string
          description: Vendor SKU identifier
          example: MK183LL/A
        productTitle:
          type: string
          description: Product title
          example: MacBook Pro 14
        categoryCode:
          type: string
          description: Product category code
          example: COMPUTER
      required:
        - id
        - vendorSku
  securitySchemes:
    ApiKey:
      type: apiKey
      description: Prefix the value with "ApiKey" to indicate the custom authorization type
      name: Authorization
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.