πŸ“¦ Ecommerce

Manage and query product data within your assistant experiences. These endpoints allow for upserting new product definitions and retrieving individual products by ID.

πŸ”½ POST /api/public/product/upsert/{promptBlockId} – Upsert Products

Creates a list of products and their embeddings for a specific prompt block.
Any product not included in the payload will be deleted, making this endpoint ideal for full refreshes.

Click to expand full details

πŸ”Ή URL

POST /api/public/product/upsert/{promptBlockId}

πŸ”Ή Path Parameters

NameTypeRequiredDescription
promptBlockIdstringβœ…ID of the prompt block using the products

πŸ”Ή Headers

NameTypeRequiredDescription
x-api-keystringβœ…Your API key for authentication

πŸ”Ή Body Parameters

Send a list of product objects to define the current catalog.
Each object typically contains:

[
  {
    "id": "product_001",
    "name": "AI Coffee Mug",
    "description": "Ceramic mug with your assistant’s logo",
    "price": 12.99,
    "currency": "USD",
    "tags": ["mug", "merch", "coffee"]
  },
  {
    "id": "product_002",
    "name": "Smart T-Shirt",
    "description": "Black T-shirt with AI-powered design",
    "price": 24.50,
    "currency": "USD"
  }
]

πŸ”Ή Example Request

curl --request POST \
  'https://iris-backend-production.up.railway.app/api/public/product/upsert/prompt_abc123' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: YOUR_API_KEY' \
  --data-raw '[
    {
      "id": "product_001",
      "name": "AI Coffee Mug",
      "description": "Ceramic mug with your assistant’s logo",
      "price": 12.99,
      "currency": "USD"
    }
  ]'

πŸ”Ή Responses

CodeDescription
201Products upserted successfully
400Bad request (malformed body)
401Unauthorized (missing key)

πŸ”½ GET /api/public/order/{id}/product – Get Product by Order ID

Retrieves product information tied to a specific order.

Click to expand full details

πŸ”Ή URL

GET /api/public/order/{id}/product

πŸ”Ή Path Parameters

NameTypeRequiredDescription
idstringβœ…Order ID to retrieve the product from

πŸ”Ή Example Request

curl --request GET \
  'https://api.vambe.me/api/public/order/abc123/product'

πŸ”Ή Success Response

{
  "id": "product_001",
  "name": "Custom T-Shirt",
  "description": "White cotton, printed front and back",
  "price": 29.99,
  "currency": "USD",
  "tags": ["tshirt", "clothing", "custom"]
}

πŸ”Ή Response Codes

CodeMeaningDescription
200OKProduct found
404Not FoundNo product found for the given order