Messor API Reference
Overview
The Messor API provides endpoints for managing brands, products, venues, and receipt processing in the TKM AI Agency Platform.
Base URL
/messorAdmin Endpoints
Create Brand
POST /admin/brandsCreate a new brand (admin only).
Request Body
{
"name": "string",
"description": "string",
"logo_url": "string"
}Create Product
POST /admin/productsCreate a new product (admin only).
Request Body
{
"name": "string",
"brand_id": "number",
"description": "string",
"barcode": "string"
}Create Venue
POST /admin/venuesCreate a new venue (admin only).
Request Body
{
"name": "string",
"address": "string",
"latitude": "number",
"longitude": "number"
}Map Venue Product
POST /admin/venues/{venue_id}/productsMap a product to a venue (admin only).
Request Body
{
"product_id": "number",
"price": "number",
"status": "string"
}User Endpoints
Process Receipt
POST /receiptsProcess a receipt and assign points.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| venue_id | number | Yes | ID of the venue |
Request Body
- Multipart form data with receipt image
Query Endpoints
Get Brand
GET /brands/{brand_id}Get brand information.
Get Brand Products
GET /brands/{brand_id}/productsGet products for a specific brand.
Get Nearby Venues
GET /venues/nearbyGet venues near a location.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| latitude | number | Yes | Latitude coordinate |
| longitude | number | Yes | Longitude coordinate |
| radius | number | No | Search radius in meters (default: 5000) |
Get Venue Details
GET /venues/{venue_id}/detailsGet detailed venue information including Google Places data.
Get Featured Brands
GET /brands/featuredGet list of featured brands.
Get Featured Products
GET /products/featuredGet list of featured products.
Get Product by Barcode
GET /products/by-barcode/{barcode}Get product information by barcode.
Error Responses
400 Bad Request
{
"detail": "Error message"
}404 Not Found
{
"detail": "Resource not found"
}500 Internal Server Error
{
"detail": "MessorAgent not configured"
}