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

# Archive a product

> Archive (soft delete) a product by its ID.
    
    Archived products are hidden from the store and cannot be purchased.
    Associated offers are also archived. Existing subscriptions continue.
    This action is reversible.



## OpenAPI

````yaml /api-reference/api-docs.yaml patch /v0/products/{productId}/archive
openapi: 3.1.0
info:
  title: Fungies API v0
  version: 0.3.5
servers:
  - url: https://api.fungies.io
security: []
tags:
  - name: discounts
    description: Discounts related endpoints
  - name: keys
    description: Offer product keys related endpoints
  - name: orders
    description: Orders related endpoints
  - name: payments
    description: Payments related endpoints
  - name: offers
    description: Offers related endpoints
  - name: products
    description: Products related endpoints
  - name: subscriptions
    description: Subscriptions related endpoints
  - name: users
    description: Users related endpoints
  - name: variants
    description: Product variants related endpoints
  - name: plans
    description: Product plans related endpoints
  - name: elements
    description: Elements related endpoints
paths:
  /v0/products/{productId}/archive:
    patch:
      tags:
        - products
      summary: Archive a product
      description: |-
        Archive (soft delete) a product by its ID.
            
            Archived products are hidden from the store and cannot be purchased.
            Associated offers are also archived. Existing subscriptions continue.
            This action is reversible.
      operationId: PatchV0ProductsProductIdArchive
      parameters:
        - name: productId
          in: path
          required: true
          description: PATCH /v0/products/:productId/archive Parameter
          schema:
            $ref: >-
              #/components/schemas/PatchV0ProductsProductIdArchiveParameterProductId
      requestBody:
        description: PATCH /v0/products/:productId/archive Request body
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchV0ProductsProductIdArchiveRequestBody'
      responses:
        '200':
          description: PATCH /v0/products/:productId/archive Positive response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PatchV0ProductsProductIdArchivePositiveResponse
        '400':
          description: PATCH /v0/products/:productId/archive Negative response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PatchV0ProductsProductIdArchiveNegativeResponse
              examples:
                example1:
                  value:
                    status: error
                    error:
                      message: Sample error message
      security:
        - APIKEY_1: []
          APIKEY_2: []
components:
  schemas:
    PatchV0ProductsProductIdArchiveParameterProductId:
      type: string
      format: uuid
    PatchV0ProductsProductIdArchiveRequestBody:
      type: object
      properties:
        id:
          type: string
        archiveOffers:
          type: boolean
      required:
        - id
    PatchV0ProductsProductIdArchivePositiveResponse:
      type: object
      properties:
        status:
          type: string
          const: success
        data:
          type: object
          properties:
            success:
              type: boolean
          required:
            - success
      required:
        - status
        - data
    PatchV0ProductsProductIdArchiveNegativeResponse:
      type: object
      properties:
        status:
          type: string
          const: error
        error:
          type: object
          properties:
            message:
              type: string
          required:
            - message
      required:
        - status
        - error
  securitySchemes:
    APIKEY_1:
      type: apiKey
      in: header
      name: x-fngs-public-key
    APIKEY_2:
      type: apiKey
      in: header
      name: x-fngs-secret-key

````