Skip to main content
POST
/
v1
/
products
/
items
/
create
Create Product Items
curl --request POST \
  --url https://dev.api.mufi.app/v1/products/items/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "users": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ]
}'
{
  "items": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "item_id": 123,
      "redeemed_at": 123,
      "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    }
  ]
}

Authorizations

Authorization
string
header
required

A JWT Access Token obtained from Google Cloud.

Body

application/json

Give a user a product item that can be redeemed.

product_id
string<uuid>
required

The ID of the product.

users
string<uuid>[]
required

The users to give product items to.

Required array length: 1 - 550 elements

Response

A product item was successfully created and given to a user.

items
object[]
required