API Reference
Backoffice APIs
Messor

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

/messor

Admin Endpoints

Create Brand

POST /admin/brands

Create a new brand (admin only).

Request Body

{
    "name": "string",
    "description": "string",
    "logo_url": "string"
}

Create Product

POST /admin/products

Create a new product (admin only).

Request Body

{
    "name": "string",
    "brand_id": "number",
    "description": "string",
    "barcode": "string"
}

Create Venue

POST /admin/venues

Create a new venue (admin only).

Request Body

{
    "name": "string",
    "address": "string",
    "latitude": "number",
    "longitude": "number"
}

Map Venue Product

POST /admin/venues/{venue_id}/products

Map a product to a venue (admin only).

Request Body

{
    "product_id": "number",
    "price": "number",
    "status": "string"
}

User Endpoints

Process Receipt

POST /receipts

Process a receipt and assign points.

Query Parameters

ParameterTypeRequiredDescription
venue_idnumberYesID 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}/products

Get products for a specific brand.

Get Nearby Venues

GET /venues/nearby

Get venues near a location.

Query Parameters

ParameterTypeRequiredDescription
latitudenumberYesLatitude coordinate
longitudenumberYesLongitude coordinate
radiusnumberNoSearch radius in meters (default: 5000)

Get Venue Details

GET /venues/{venue_id}/details

Get detailed venue information including Google Places data.

Get Featured Brands

GET /brands/featured

Get list of featured brands.

Get Featured Products

GET /products/featured

Get 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"
}