Skip to main content
POST
/
v1
/
products
/
create
Create Product
curl --request POST \
  --url https://dev.api.mufi.app/v1/products/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "redeemable_item",
  "name": "<string>",
  "description": "<string>",
  "metadata_uri": "<string>",
  "event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "mint_nft": true,
  "chain": "WestendAssetHub",
  "max_items": 2
}'
{
  "type": "redeemable_item",
  "name": "<string>",
  "description": "<string>",
  "metadata_uri": "<string>",
  "event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "mint_nft": true,
  "chain": "WestendAssetHub",
  "max_items": 2,
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "event": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "reference_id": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "name": "<string>",
    "description": "<string>",
    "start_date": 123,
    "end_date": 123,
    "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  }
}

Authorizations

Authorization
string
header
required

A JWT Access Token obtained from Google Cloud.

Body

application/json

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.

type
enum<string>
required
Available options:
redeemable_item
name
string
required

The name of the product.

Required string length: 1 - 255
event_id
string<uuid>
required

The ID of the event that the product is associated with. Leave blank for a general product that lives longer than an event.

description
string | null

The description of the product.

Required string length: 1 - 255
metadata_uri
string<uri> | null

The URL of the metadata for the asset containing name, image, description fields. Required if mint_nft is true.

Maximum length: 512
mint_nft
boolean | null

Whether to mint an NFT when a user receives a product item. If true, the metadata_uri must be provided.

chain
enum<string>

The chain to mint the NFT on. Required if mint_nft is true.

Available options:
WestendAssetHub,
AssetHub
max_items
number | null

The maximum number of items that can be in the asset collection. Leave blank for an unlimited number of items.

Required range: x >= 1

Response

A product was successfully created.

type
enum<string>
required
Available options:
redeemable_item
name
string
required

The name of the product.

Required string length: 1 - 255
event_id
string<uuid>
required

The ID of the event that the product is associated with. Leave blank for a general product that lives longer than an event.

id
string<uuid>
required

The ID of the product.

created_at
string<date-time>
required

The date and time the product was created.

updated_at
string<date-time>
required

The date and time the product was last updated.

event
object
required
description
string | null

The description of the product.

Required string length: 1 - 255
metadata_uri
string<uri> | null

The URL of the metadata for the asset containing name, image, description fields. Required if mint_nft is true.

Maximum length: 512
mint_nft
boolean | null

Whether to mint an NFT when a user receives a product item. If true, the metadata_uri must be provided.

chain
enum<string>

The chain to mint the NFT on. Required if mint_nft is true.

Available options:
WestendAssetHub,
AssetHub
max_items
number | null

The maximum number of items that can be in the asset collection. Leave blank for an unlimited number of items.

Required range: x >= 1