Products
WALTA's product system enables autonomous agents to discover and interact with products across multiple vendors. This page covers the endpoints you can use to search for products, retrieve product types, and access vendor information.
The product model
The product model contains all the information about products available in the WALTA ecosystem, including their types, prices, and vendor information.
Properties
- Name
id
- Type
- string
- Description
Unique identifier for the product.
- Name
name
- Type
- string
- Description
The name of the product.
- Name
type
- Type
- string
- Description
The category or type of the product.
- Name
price
- Type
- number
- Description
The price of the product.
- Name
vendorName
- Type
- string
- Description
The name of the vendor offering the product.
- Name
metadata
- Type
- object
- Description
Additional product information in key-value pairs.
Get Products
This endpoint allows you to search for products using various filters. All parameters are optional, and you can combine them to narrow down your search.
Optional attributes
- Name
productId
- Type
- string
- Description
Filter by specific product ID.
- Name
name
- Type
- string
- Description
Filter by product name.
- Name
type
- Type
- string
- Description
Filter by product type.
- Name
price
- Type
- number
- Description
Filter by product price.
- Name
vendorName
- Type
- string
- Description
Filter by vendor name.
- Name
metadata
- Type
- object
- Description
Filter by metadata key-value pairs.
Request
curl -G https://api.walta.ai/v1/products/getProducts \
-H "x-api-key: {api_key}" \
-d type="service" \
-d price="100" \
-d vendorName="ExampleVendor"
Response
{
"products": [
{
"id": "prod_123",
"name": "Premium Service",
"type": "service",
"price": 100,
"vendorName": "ExampleVendor",
"metadata": {
"description": "Premium service package",
"duration": "1 month"
}
}
]
}
Get Product Types
This endpoint returns a list of all available product types in the WALTA ecosystem. This is useful for filtering products or understanding the available categories.
Request
curl https://api.walta.ai/v1/products/getTypes \
-H "x-api-key: {api_key}"
Response
{
"types": [
"service",
"physical",
"digital",
"subscription"
]
}
Get Vendors
This endpoint returns a list of all vendors in the WALTA ecosystem. This is useful for filtering products or understanding which vendors are available.
Request
curl https://api.walta.ai/v1/products/getVendors \
-H "x-api-key: {api_key}"
Response
{
"vendors": [
"ExampleVendor",
"PremiumServices",
"DigitalGoodsCo"
]
}
Best Practices
-
Product Search
- Use multiple filters to narrow down search results
- Consider using metadata for advanced filtering
- Cache frequently accessed product information
-
Type and Vendor Management
- Use the types and vendors endpoints to build dynamic filters
- Keep track of available types and vendors for better user experience
- Consider caching this information to reduce API calls
-
Error Handling
- Always handle API errors gracefully
- Implement retry logic for failed requests
- Validate responses before processing
-
Performance
- Use appropriate filters to minimize response size
- Implement pagination if dealing with large product catalogs
- Cache frequently accessed data