OPL-AI API Documentation
OPL-AI API is a powerful RESTful API platform offering work tracking, location monitoring, optimization, and classification services. Powered by advanced artificial intelligence models, our modules enhance your business operational efficiency.
Authentication
To use the OPL-AI API, you need a valid license key. The licenceKey parameter is required for all API requests.
- Register on the system
- Log in to your account
- Request your license key from the Licence & Data section
Work Tracking Module
The Work Tracking module allows you to monitor employee work processes, projects, and tasks in real-time.
Get All Work Data
Request Body:
{
"licenceKey": "YourLicenseKey",
"opr": "getallworkdata"
}
Response:
{
"WorkerTable": [
{
"id": "int",
"company": "string",
"project": "string",
"nameSurname": "string",
"processName": "string",
"processTitle": "string",
"startDate": "date",
"endDate": "date"
}
]
}
Get Work Data by Date Range
Request Body:
{
"licenceKey": "YourLicenseKey",
"opr": "getrangeworkdata",
"startdate": "2024-01-01",
"enddate": "2024-12-31"
}
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
licenceKey |
string | Required | Your API license key |
opr |
string | Required | Operation type: "getrangeworkdata" |
startdate |
date | Required | Start date (YYYY-MM-DD) |
enddate |
date | Required | End date (YYYY-MM-DD) |
Response:
{
"WorkerTable": [
{
"id": "int",
"company": "string",
"project": "string",
"nameSurname": "string",
"processName": "string",
"processTitle": "string",
"startDate": "date",
"endDate": "date"
}
]
}
Cut Optimizer Module
The Cut Optimizer module minimizes waste by optimizing raw material usage. Create the most efficient cutting plan with different algorithms.
One-Dimensional Cut Optimization
Request Body:
{
"licenceKey": "YourLicenseKey",
"selectedAlgorithm": "FFD",
"kerf": 3.4,
"fastMode": true,
"stockList": [
{
"length": 1000,
"count": 1
},
{
"length": 3000,
"count": 1
}
],
"piecesList": [
{
"length": 1250,
"count": 1,
"name": "Left Panel"
},
{
"length": 800,
"count": 1,
"name": "Side"
},
{
"length": 2100,
"count": 1,
"name": "Cover"
}
]
}
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
licenceKey |
string | Required | Your API license key |
selectedAlgorithm |
string | Required | Algorithm selection: "FFD", "BFD","WOLF" or "CP-SAT" |
kerf |
double | Required | Operation type: "3.0" |
fastMode |
boolean | Required | Faster mode selection: true |
stockList |
array | Required | Raw material list |
piecesList |
array | Required | Pieces material list |
- FFD (First Fit Decreasing): Fast and efficient, suitable for general use
- BFD (Best Fit Decreasing): More optimized results, ideal for medium-scale projects
- CP-SAT (Constraint Programming): Most optimal result, recommended for complex problems
- WOLF (AI Programming): Recommended for the sharpest results, complex problems and synthesis solutions
Response:
{
"success": true,
"message": "Optimization completed.",
"data": {
"report": "Result Description",
"visuals": [
{
"name": "Stock Material 1",
"length": 1000,
"parts": [
{
"length": 800,
"width": 80,
"isWaste": false,
"color": "#65DFA3",
"name": "Side"
}
]
},
{
"name": "Stock Material 2",
"length": 3000,
"parts": [
{
"length": 2100,
"width": 70,
"isWaste": false,
"color": "#2BFA8A",
"name": "Cover"
}
]
}
]
}
}
Classification Module
The AI-powered classification module automatically categorizes text into predefined categories.
Text Classification
Request Body:
{
"licenceKey": "YourLicenseKey",
"opr": "getclassfiy",
"data": [
{
"text": "Text to be classified"
}
]
}
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
licenceKey |
string | Required | Your API license key |
opr |
string | Required | Operation type: "getclassfiy" |
data |
array | Required | List of texts to be classified |
Response:
{
"ClassficationTable": [
{
"id": "int",
"text": "string",
"classfiy": "string"
}
]
}
Error Codes & Management
HTTP Status Codes
| Code | Description | Solution |
|---|---|---|
| 200 | Successful request | - |
| 400 | Invalid request parameter | Check request format and parameters |
| 401 | Invalid license key | Verify your license key |
| 403 | License expired | Renew your license |
| 429 | Too many requests | Reduce request rate |
| 500 | Server error | Contact support team |
Example Error Response
{
"result": "E",
"message": "Licence has expired."
}
Get Started Now!
Optimize your business processes, track locations, and benefit from AI-powered classification services with OPL-AI API.
Get Your API Key