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

# Create Product

> Create a new product for an event. Products define redeemable items that can be distributed to users, such as vouchers, coupons, or digital collectibles.



## OpenAPI

````yaml post /v1/products
openapi: 3.1.0
info:
  title: Wallet API
  version: 2.72.0
servers:
  - url: https://dev.api.mufi.app/
    description: Staging
security: []
paths:
  /v1/products:
    post:
      tags:
        - engagement
      summary: Create Product
      description: >-
        Create a new product for an event. Products define redeemable items that
        can be distributed to users, such as vouchers, coupons, or digital
        collectibles.
      requestBody:
        description: >-
          Create a new product for an event. If mint_nft is true, then
          metadata_uri and chain MUST be provided. The project wallet must have
          the required balance to create the NFT Collection.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Product'
      responses:
        '201':
          description: A product was successfully created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductResponse'
        '400':
          description: A bad request will contain a list of errors for invalid fields.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                required:
                  - errors
        '401':
          description: >-
            Unauthorized. The API key is missing or has expired if you are using
            a key with an expiration date that you configured when creating the
            key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '403':
          description: >-
            Forbidden. The API key that you provided is not valid or does not
            exist.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '422':
          description: >-
            Project wallet not found and is pending creation or the wallet
            balance is too low to create a collection. If the wallet is pending
            creation, please wait a few minutes for the wallet to be created and
            try again. If the wallet balance is too low, please add more DOT to
            your wallet. ### Required Balance for each chain: If minting an NFT,
            the project wallet must have the required balance to create the NFT
            Collection. - **AssetHub**: 2 DOT - **WestendAssetHub**: 2 WND
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
      security:
        - BearerAuth: []
components:
  schemas:
    Product:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/ProductType'
        name:
          type: string
          minLength: 1
          maxLength: 255
          description: The name of the product.
        description:
          type:
            - string
            - 'null'
          minLength: 1
          maxLength: 255
          description: The description of the product.
        price:
          type:
            - string
            - 'null'
          description: >-
            The price of the product as a decimal string (e.g. "9.99"). Defaults
            to "0".
        active:
          type:
            - boolean
            - 'null'
          description: Whether the product is active and available. Defaults to true.
        is_claimable:
          type:
            - boolean
            - 'null'
          description: >-
            Whether the product can be claimed via a direct URL. Defaults to
            false.
        is_transferable:
          type:
            - boolean
            - 'null'
          description: >-
            Whether product items can be transferred between users. Defaults to
            false.
        stock:
          type:
            - integer
            - 'null'
          minimum: 1
          description: Total stock available. Null or omit for unlimited stock.
        redemption_quantity:
          type:
            - integer
            - 'null'
          minimum: 1
          description: How many times a single product item can be redeemed. Defaults to 1.
        max_per_account:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            Maximum number of items a single user can hold. Null or omit for
            unlimited.
        min_rep_balance:
          type:
            - integer
            - 'null'
          minimum: 0
          description: >-
            Minimum reputation balance required to receive this product.
            Defaults to 0.
        metadata_uri:
          type:
            - string
            - 'null'
          maxLength: 512
          format: uri
          description: >-
            The URL of the metadata for the asset containing name, image,
            description fields. Required if mint_nft is true.
        event_id:
          type: string
          format: uuid
          description: >-
            The ID of the event that the product is associated with. Leave blank
            for a general product that lives longer than an event.
        mint_nft:
          type:
            - boolean
            - 'null'
          description: >-
            Whether to mint an NFT when a user receives a product item. If true,
            the metadata_uri must be provided.
        chain:
          allOf:
            - $ref: '#/components/schemas/Chain'
            - type:
                - string
                - 'null'
              description: The chain to mint the NFT on. Required if mint_nft is true.
        max_items:
          type:
            - number
            - 'null'
          minimum: 1
          description: >-
            The maximum number of items that can be in the asset collection.
            Leave blank for an unlimited number of items.
      required:
        - type
        - name
        - event_id
    ProductResponse:
      allOf:
        - $ref: '#/components/schemas/Product'
        - type: object
          properties:
            id:
              type: string
              format: uuid
              description: The ID of the product.
            created_at:
              type: string
              format: date-time
              description: The date and time the product was created.
            updated_at:
              type: string
              format: date-time
              description: The date and time the product was last updated.
            event:
              $ref: '#/components/schemas/EventResponse'
          required:
            - id
            - created_at
            - updated_at
            - event
    ProductType:
      type: string
      enum:
        - admission
        - presale
        - perks
    Chain:
      type: string
      enum:
        - WestendAssetHub
        - AssetHub
    EventResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        reference_id:
          $ref: '#/components/schemas/OptionalReferenceId'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        name:
          type: string
        description:
          type:
            - string
            - 'null'
        start_date:
          type: integer
        end_date:
          type: integer
        location:
          type: string
        address:
          type: string
        project_id:
          type: string
          format: uuid
      required:
        - id
        - created_at
        - updated_at
        - name
        - start_date
        - end_date
        - location
        - address
        - project_id
    OptionalReferenceId:
      type:
        - string
        - 'null'
      description: >-
        An optional ID of the reference object in your database. This can be
        used to query events by reference object.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: A JWT Access Token obtained from Google Cloud.

````