π¦ 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
POST /api/public/product/upsert/{promptBlockId}
β Upsert ProductsCreates 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
Name | Type | Required | Description |
---|---|---|---|
promptBlockId | string | β | ID of the prompt block using the products |
πΉ Headers
Name | Type | Required | Description |
---|---|---|---|
x-api-key | string | β | 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
Code | Description |
---|---|
201 | Products upserted successfully |
400 | Bad request (malformed body) |
401 | Unauthorized (missing key) |
π½ GET /api/public/order/{id}/product
β Get Product by Order ID
GET /api/public/order/{id}/product
β Get Product by Order IDRetrieves product information tied to a specific order.
Click to expand full details
πΉ URL
GET /api/public/order/{id}/product
πΉ Path Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | β | 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
Code | Meaning | Description |
---|---|---|
200 | OK | Product found |
404 | Not Found | No product found for the given order |
Updated 16 days ago