Skip to main content
POST
/
v1
/
products
/
{id}
/
items
Create Product Items
curl --request POST \
  --url https://dev.api.mufi.app/v1/products/{id}/items \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "users": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "emails": [
    "jsmith@example.com"
  ]
}
'
{
  "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,
      "redemption_count": 123,
      "redemption_quantity": 123,
      "is_fully_redeemed": true,
      "user": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "email": "jsmith@example.com",
        "first_name": "<string>",
        "last_name": "<string>"
      },
      "product": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "name": "<string>",
        "type": "admission",
        "redemption_quantity": 123
      },
      "redeemed_at": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

A JWT Access Token obtained from Google Cloud.

Path Parameters

id
string<uuid>
required

The product ID.

Body

application/json

Issue product items to users. Provide user IDs and/or emails.

product_id
string<uuid>
required

The ID of the product.

users
string<uuid>[]

The user IDs to give product items to. At least one of users or emails must be provided.

Maximum array length: 550
emails
string<email>[]

The user emails to give product items to. At least one of users or emails must be provided.

Maximum array length: 550

Response

Product items were successfully created and given to users.

items
object[]
required