Download OpenAPI specification:Download
API for managing AI-assisted sales order activities
Retrieve a list of all AI sales order activities with optional filtering and pagination
| limit | integer [ 1 .. 100 ] Default: 50 Maximum number of records to return |
| offset | integer >= 0 Default: 0 Number of records to skip for pagination |
| sort | string Field to sort by |
| order | string Default: "desc" Enum: "asc" "desc" Sort order (asc or desc) |
| filter | string Filter conditions in JSON format |
| search | string Search term for text fields |
{- "success": true,
- "data": [
- {
- "_id": "60f7b1b3e4b0e8b3f8b3f8b3",
- "client": "60f7b1b3e4b0e8b3f8b3f8b4",
- "rep": "60f7b1b3e4b0e8b3f8b3f8b5",
- "activityType": "recommendation",
- "inputData": {
- "historicalOrders": [
- {
- "orderId": "string",
- "date": "2019-08-24T14:15:22Z",
- "items": [
- {
- "product": "string",
- "quantity": 0,
- "price": 0
}
]
}
], - "clientPreferences": { },
- "marketData": { },
- "inventoryLevels": { }
}, - "aiModel": {
- "name": "sales-recommender-v2",
- "version": "2.1.0",
- "confidence": 1,
- "parameters": { }
}, - "recommendations": [
- {
- "product": "string",
- "productName": "string",
- "quantity": 1,
- "price": 0,
- "confidence": 1,
- "reason": "string",
- "category": "frequent-buy",
- "priority": 1
}
], - "insights": {
- "buyingPatterns": [
- "string"
], - "seasonality": { },
- "riskFactors": [
- "string"
], - "opportunities": [
- "string"
]
}, - "status": "processing",
- "processingTime": 0,
- "accuracy": {
- "historical": 1,
- "estimated": 1
}, - "feedback": {
- "userRating": 1,
- "acceptedRecommendations": [
- "string"
], - "rejectedRecommendations": [
- "string"
], - "comments": "string"
}, - "generatedOrder": {
- "orderId": "string",
- "items": [
- {
- "product": "string",
- "quantity": 0,
- "price": 0
}
], - "totalAmount": 0
}, - "metadata": { },
- "createdAt": "2023-01-15T08:00:00Z",
- "updatedAt": "2023-01-15T10:30:00Z"
}
], - "total": 0
}Create a new AI sales order activity with the provided data
| client required | string Client ID |
| rep required | string Sales representative ID |
| activityType required | string Enum: "recommendation" "order-analysis" "demand-forecasting" "cross-sell" "upsell" Type of AI activity |
object | |
object | |
object | |
object Additional metadata |
{- "client": "60f7b1b3e4b0e8b3f8b3f8b4",
- "rep": "60f7b1b3e4b0e8b3f8b3f8b5",
- "activityType": "recommendation",
- "inputData": {
- "historicalOrders": [
- {
- "orderId": "string",
- "date": "2019-08-24T14:15:22Z",
- "items": [
- {
- "product": "string",
- "quantity": 0,
- "price": 0
}
]
}
], - "clientPreferences": { },
- "marketData": { },
- "inventoryLevels": { }
}, - "aiModel": {
- "name": "sales-recommender-v2",
- "version": "2.1.0",
- "parameters": { }
}, - "feedback": {
- "userRating": 1,
- "acceptedRecommendations": [
- "string"
], - "rejectedRecommendations": [
- "string"
], - "comments": "string"
}, - "metadata": { }
}{- "success": true,
- "data": {
- "_id": "60f7b1b3e4b0e8b3f8b3f8b3",
- "client": "60f7b1b3e4b0e8b3f8b3f8b4",
- "rep": "60f7b1b3e4b0e8b3f8b3f8b5",
- "activityType": "recommendation",
- "inputData": {
- "historicalOrders": [
- {
- "orderId": "string",
- "date": "2019-08-24T14:15:22Z",
- "items": [
- {
- "product": "string",
- "quantity": 0,
- "price": 0
}
]
}
], - "clientPreferences": { },
- "marketData": { },
- "inventoryLevels": { }
}, - "aiModel": {
- "name": "sales-recommender-v2",
- "version": "2.1.0",
- "confidence": 1,
- "parameters": { }
}, - "recommendations": [
- {
- "product": "string",
- "productName": "string",
- "quantity": 1,
- "price": 0,
- "confidence": 1,
- "reason": "string",
- "category": "frequent-buy",
- "priority": 1
}
], - "insights": {
- "buyingPatterns": [
- "string"
], - "seasonality": { },
- "riskFactors": [
- "string"
], - "opportunities": [
- "string"
]
}, - "status": "processing",
- "processingTime": 0,
- "accuracy": {
- "historical": 1,
- "estimated": 1
}, - "feedback": {
- "userRating": 1,
- "acceptedRecommendations": [
- "string"
], - "rejectedRecommendations": [
- "string"
], - "comments": "string"
}, - "generatedOrder": {
- "orderId": "string",
- "items": [
- {
- "product": "string",
- "quantity": 0,
- "price": 0
}
], - "totalAmount": 0
}, - "metadata": { },
- "createdAt": "2023-01-15T08:00:00Z",
- "updatedAt": "2023-01-15T10:30:00Z"
}
}Retrieve a specific AI sales order activity by its ID
| id required | string AI sales order activity ID |
{- "success": true,
- "data": {
- "_id": "60f7b1b3e4b0e8b3f8b3f8b3",
- "client": "60f7b1b3e4b0e8b3f8b3f8b4",
- "rep": "60f7b1b3e4b0e8b3f8b3f8b5",
- "activityType": "recommendation",
- "inputData": {
- "historicalOrders": [
- {
- "orderId": "string",
- "date": "2019-08-24T14:15:22Z",
- "items": [
- {
- "product": "string",
- "quantity": 0,
- "price": 0
}
]
}
], - "clientPreferences": { },
- "marketData": { },
- "inventoryLevels": { }
}, - "aiModel": {
- "name": "sales-recommender-v2",
- "version": "2.1.0",
- "confidence": 1,
- "parameters": { }
}, - "recommendations": [
- {
- "product": "string",
- "productName": "string",
- "quantity": 1,
- "price": 0,
- "confidence": 1,
- "reason": "string",
- "category": "frequent-buy",
- "priority": 1
}
], - "insights": {
- "buyingPatterns": [
- "string"
], - "seasonality": { },
- "riskFactors": [
- "string"
], - "opportunities": [
- "string"
]
}, - "status": "processing",
- "processingTime": 0,
- "accuracy": {
- "historical": 1,
- "estimated": 1
}, - "feedback": {
- "userRating": 1,
- "acceptedRecommendations": [
- "string"
], - "rejectedRecommendations": [
- "string"
], - "comments": "string"
}, - "generatedOrder": {
- "orderId": "string",
- "items": [
- {
- "product": "string",
- "quantity": 0,
- "price": 0
}
], - "totalAmount": 0
}, - "metadata": { },
- "createdAt": "2023-01-15T08:00:00Z",
- "updatedAt": "2023-01-15T10:30:00Z"
}
}Update an existing AI sales order activity with new data
| id required | string AI sales order activity ID |
| client required | string Client ID |
| rep required | string Sales representative ID |
| activityType required | string Enum: "recommendation" "order-analysis" "demand-forecasting" "cross-sell" "upsell" Type of AI activity |
object | |
object | |
object | |
object Additional metadata |
{- "client": "60f7b1b3e4b0e8b3f8b3f8b4",
- "rep": "60f7b1b3e4b0e8b3f8b3f8b5",
- "activityType": "recommendation",
- "inputData": {
- "historicalOrders": [
- {
- "orderId": "string",
- "date": "2019-08-24T14:15:22Z",
- "items": [
- {
- "product": "string",
- "quantity": 0,
- "price": 0
}
]
}
], - "clientPreferences": { },
- "marketData": { },
- "inventoryLevels": { }
}, - "aiModel": {
- "name": "sales-recommender-v2",
- "version": "2.1.0",
- "parameters": { }
}, - "feedback": {
- "userRating": 1,
- "acceptedRecommendations": [
- "string"
], - "rejectedRecommendations": [
- "string"
], - "comments": "string"
}, - "metadata": { }
}{- "success": true,
- "data": {
- "_id": "60f7b1b3e4b0e8b3f8b3f8b3",
- "client": "60f7b1b3e4b0e8b3f8b3f8b4",
- "rep": "60f7b1b3e4b0e8b3f8b3f8b5",
- "activityType": "recommendation",
- "inputData": {
- "historicalOrders": [
- {
- "orderId": "string",
- "date": "2019-08-24T14:15:22Z",
- "items": [
- {
- "product": "string",
- "quantity": 0,
- "price": 0
}
]
}
], - "clientPreferences": { },
- "marketData": { },
- "inventoryLevels": { }
}, - "aiModel": {
- "name": "sales-recommender-v2",
- "version": "2.1.0",
- "confidence": 1,
- "parameters": { }
}, - "recommendations": [
- {
- "product": "string",
- "productName": "string",
- "quantity": 1,
- "price": 0,
- "confidence": 1,
- "reason": "string",
- "category": "frequent-buy",
- "priority": 1
}
], - "insights": {
- "buyingPatterns": [
- "string"
], - "seasonality": { },
- "riskFactors": [
- "string"
], - "opportunities": [
- "string"
]
}, - "status": "processing",
- "processingTime": 0,
- "accuracy": {
- "historical": 1,
- "estimated": 1
}, - "feedback": {
- "userRating": 1,
- "acceptedRecommendations": [
- "string"
], - "rejectedRecommendations": [
- "string"
], - "comments": "string"
}, - "generatedOrder": {
- "orderId": "string",
- "items": [
- {
- "product": "string",
- "quantity": 0,
- "price": 0
}
], - "totalAmount": 0
}, - "metadata": { },
- "createdAt": "2023-01-15T08:00:00Z",
- "updatedAt": "2023-01-15T10:30:00Z"
}
}Generate AI-powered sales order recommendations for the activity
| id required | string AI sales order activity ID |
{- "success": true,
- "data": {
- "recommendations": [
- {
- "product": "string",
- "quantity": 0,
- "confidence": 0,
- "reason": "string"
}
]
}
}