> ## 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.

# Get package (V2)

> Returns the redesigned package shape with stored regions, SKU lines, bundle references, nested `rules`, instructions, and assignment summary. `rules.package` holds automaticOrder / approvalRequired / requireJustification / deliverySetting / defaultOfficeId. `rules.categories` holds per-category quantity rules with camelCase `categoryCode`. Returns 403 when the redesigned packages are not enabled for your organization.



## OpenAPI

````yaml /openapi.json get /api/v2/packages/{slug}
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/v2/packages/{slug}:
    get:
      tags:
        - Packages
      summary: Get package (V2)
      description: >-
        Returns the redesigned package shape with stored regions, SKU lines,
        bundle references, nested `rules`, instructions, and assignment summary.
        `rules.package` holds automaticOrder / approvalRequired /
        requireJustification / deliverySetting / defaultOfficeId.
        `rules.categories` holds per-category quantity rules with camelCase
        `categoryCode`. Returns 403 when the redesigned packages are not enabled
        for your organization.
      operationId: getPackageBySlugV2
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
          description: Unique slug of the package.
      responses:
        '200':
          description: The requested package (nested rules under `rules`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PackageV2DetailResponse'
              examples:
                packageDetailWithNestedRules:
                  summary: Detail with rules.package and rules.categories
                  description: packageDetailWithNestedRules
                  value:
                    id: 3a68a467-8733-4c8d-a942-16ed7ec33018
                    friendlyId: PKG-260914-TEST0001
                    slug: engineering-starter-kit
                    name: Engineering Starter Kit
                    active: true
                    itCloset: false
                    regions: []
                    skuLines:
                      - skuId: 7b21c8e0-1a2b-4c3d-9e5f-0123456789ab
                        vendorCode: DELL
                        vendorSku: LAT-7420
                        regions: []
                    bundleLines: []
                    fallbackLines: []
                    rules:
                      package:
                        automaticOrder: false
                        approvalRequired: false
                        requireJustification: false
                        deliverySetting: PERSON
                        defaultOfficeId: null
                      categories:
                        - id: 9c34d9f1-2b3c-5d4e-0f6a-1234567890bc
                          categoryCode: COMPUTER
                          quantity: 1
                          optional: true
                          allowedProductIds: null
                    instructions: Bring your own dongle
                    assignedTo:
                      people: []
                      peopleCount: 0
                    createdAt: '2026-01-01T00:00:00Z'
                    updatedAt: '2026-01-02T00:00:00Z'
        '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: Package 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 GET
            'https://apipub.firstbasehq.com/api/v2/packages/{slug}' \
              -H 'Authorization: ApiKey YOUR_API_KEY' \
              -H 'Accept: application/json'
components:
  schemas:
    PackageV2DetailResponse:
      type: object
      description: >-
        Full package returned by V2 get / create / patch. Package settings and
        category rules are nested under `rules` (not top-level). Shape:
        `rules.package` (automaticOrder, approvalRequired, requireJustification,
        deliverySetting, defaultOfficeId) and `rules.categories` (categoryCode,
        quantity, optional, …).
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the package
          example: 3a68a467-8733-4c8d-a942-16ed7ec33018
        friendlyId:
          type: string
          description: Human-friendly package identifier (PKG-*)
          example: PKG-260914-TEST0001
        slug:
          type: string
          description: URL-safe unique identifier for the package
          example: engineering-starter-kit
        name:
          type: string
          description: Display name of the package
          example: Engineering Starter Kit
        active:
          type: boolean
          description: Whether the package is active
          example: true
        itCloset:
          type: boolean
          description: When true, the package is intended for IT closet / office stock
          example: false
        regions:
          type: array
          description: Stored regions for this package (from package_region)
          items:
            $ref: '#/components/schemas/PackageRegionV2Response'
        skuLines:
          type: array
          description: Category SKU lines with per-SKU region scoping
          items:
            $ref: '#/components/schemas/PackageSkuLineV2Response'
        bundleLines:
          type: array
          description: Bundle references attached to this package
          items:
            $ref: '#/components/schemas/PackageBundleLineV2Response'
        fallbackLines:
          type: array
          description: Fallback lines placeholder for future package redesign phases
          items:
            $ref: '#/components/schemas/PackageFallbackLineV2Response'
        rules:
          $ref: '#/components/schemas/PackageRulesV2Response'
          description: >-
            Nested rules object. Always present on detail. `package` holds
            order/approval/justification/delivery settings; `categories` holds
            per-category quantity rules (empty list when none).
        usedEquipmentPreferences:
          type: array
          description: Used-equipment preferences per category
          items:
            $ref: '#/components/schemas/UsedEquipmentPrefResponse'
        instructions:
          type: string
          description: >-
            Optional employee-facing instructions shown at order time (max 2000
            characters). Null on the detail response when the package has none.
          example: Bring your own dongle
        assignedTo:
          $ref: '#/components/schemas/PackageAssignedToV2Response'
          description: People assigned to this package
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the package was created
          example: '2026-01-01T00:00:00Z'
        updatedAt:
          type: string
          format: date-time
          description: Timestamp when the package was last updated
          example: '2026-01-02T00:00:00Z'
      required:
        - active
        - assignedTo
        - bundleLines
        - fallbackLines
        - id
        - itCloset
        - name
        - regions
        - rules
        - skuLines
        - slug
        - usedEquipmentPreferences
    PublicApiHttpErrors:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/PublicApiError'
          description: List of error details.
      required:
        - errors
    PackageRegionV2Response:
      type: object
      description: Region summary stored on a package
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the region
          example: 3a68a467-8733-4c8d-a942-16ed7ec33018
        name:
          type: string
          description: Human-readable name of the region
          example: United States
        code:
          type: string
          description: Short code identifying the region
          example: US
      required:
        - code
        - id
        - name
    PackageSkuLineV2Response:
      type: object
      description: SKU line with region scoping for a package
      properties:
        skuId:
          type: string
          format: uuid
          description: SKU UUID
          example: 3a68a467-8733-4c8d-a942-16ed7ec33018
        vendorCode:
          type: string
          description: Vendor code for the SKU; null when the SKU has no vendor
          example: DELL
        vendorSku:
          type: string
          description: Vendor SKU identifier
          example: LAT-7420
        regions:
          type: array
          description: Regions selected for this SKU line
          items:
            $ref: '#/components/schemas/PackageRegionV2Response'
      required:
        - regions
        - skuId
        - vendorSku
    PackageBundleLineV2Response:
      type: object
      description: Bundle reference line on a package
      properties:
        productGroupId:
          type: string
          format: uuid
          description: Product group UUID
          example: 3a68a467-8733-4c8d-a942-16ed7ec33018
        friendlyId:
          type: string
          description: Human-friendly product group identifier (GRP-*)
          example: GRP-260914-TEST0001
        name:
          type: string
          description: Display name of the bundle
          example: Laptop Bundle
        sortOrder:
          type: integer
          format: int32
          description: Sort order of this bundle within the package
          example: 0
      required:
        - friendlyId
        - name
        - productGroupId
        - sortOrder
    PackageFallbackLineV2Response:
      type: object
      description: Fallback line placeholder for future package redesign phases
      properties:
        id:
          type: string
          format: uuid
          description: Placeholder identifier reserved for future fallback content
    PackageRulesV2Response:
      type: object
      description: >-
        Nested package + category rules returned on V2 detail. JSON key
        `package` is a reserved keyword in Kotlin but serializes as "package".
      properties:
        package:
          $ref: '#/components/schemas/PackagePackageRulesV2Response'
          description: Package-level order, approval, justification, and delivery settings
        categories:
          type: array
          description: >-
            Per-category quantity / optional rules. Empty list when the package
            has no category rules. Field names are camelCase (`categoryCode`),
            not snake_case.
          items:
            $ref: '#/components/schemas/PackageCategoryRuleV2Response'
      required:
        - categories
        - package
    UsedEquipmentPrefResponse:
      type: object
      description: Used-equipment preference for a category
      properties:
        categoryCode:
          type: string
          description: Product category code
        preference:
          type: string
          description: Used-equipment preference value
          enum:
            - NEW_FIRST
            - NEW_ONLY
            - USED_FIRST
            - USED_ONLY
        inStockOnly:
          type: boolean
          description: When true, only in-stock products are shown for this category
      required:
        - categoryCode
        - inStockOnly
        - preference
    PackageAssignedToV2Response:
      type: object
      description: People assigned to a package
      properties:
        people:
          type: array
          description: Person UUIDs assigned to this package
          items:
            type: string
            format: uuid
        peopleCount:
          type: integer
          format: int32
          description: Count of people assigned to this package
          example: 0
      required:
        - peopleCount
    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
    PackagePackageRulesV2Response:
      type: object
      description: Package-level rule settings under `rules.package` on V2 detail responses
      properties:
        automaticOrder:
          type: boolean
          description: >-
            When true, assigning this package can trigger automatic equipment
            ordering
          example: false
        approvalRequired:
          type: boolean
          description: When true, orders from this package require admin approval
          example: false
        requireJustification:
          type: boolean
          description: When true, requesters must provide a justification when ordering
          example: false
        deliverySetting:
          type: string
          description: Where package equipment should be delivered
          enum:
            - PERSON
            - OFFICE
            - FLEXIBLE
          example: PERSON
        defaultOfficeId:
          type: string
          format: uuid
          description: Default office UUID when delivery targets an office
          example: 3a68a467-8733-4c8d-a942-16ed7ec33018
      required:
        - approvalRequired
        - automaticOrder
        - requireJustification
    PackageCategoryRuleV2Response:
      type: object
      description: Category quantity rule under `rules.categories` (V2 camelCase)
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the rule
          example: 3a68a467-8733-4c8d-a942-16ed7ec33018
        categoryCode:
          type: string
          description: Product category code this rule applies to
          example: COMPUTER
        quantity:
          type: integer
          format: int32
          description: Number of items allowed or required for this category
          example: 1
        optional:
          type: boolean
          description: When true, this category rule is optional
          example: true
        allowedProductIds:
          type: array
          description: >-
            Product UUIDs allowed by this rule; null/empty means no product
            restriction
          items:
            type: string
            format: uuid
      required:
        - categoryCode
        - id
        - optional
        - quantity
  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.