The Decision Optimizer API is the ultimate tool for solving allocation and optimization problems, designed to automate and improve decision-making processes across multiple industries. By integrating this API, users can evaluate items based on specific requirements and constraints, optimizing results accurately and efficiently. It provides advanced capabilities such as evaluating items based on weighted criteria, penalizing constraint violations, and dynamically adjusting according to custom parameters. This API is ideal for organizations seeking to maximize benefits, minimize costs or balance allocations within budgets. With its flexibility and robustness, this API integrates seamlessly into workflows, adapting to industries such as logistics, finance, e-commerce and more. It simplifies complex decisions, allowing developers to focus on innovating and solving critical problems effectively.
Send a POST request with elements and assignments in the body.Receive optimal solutions based on customized constraints, with detailed explanations of scores.
Optimize Assignment - Endpoint Features
| Object | Description |
|---|---|
Request Body |
[Required] Json |
[{"itemAssignments":[{"id":"1","requirements":[{"type":"item.color","scoringLogic":{"method":"Penalize","comparisonLogic":"NotEqual","weight":10,"constraintHardness":"hard","weightRelativePercentage":1.0},"values":["Blue"],"valueType":"string","penalty":10,"penaltyPercentage":0.5}],"budget":{"amount":100.0,"weight":10},"item":{"id":"2","name":"Name 2","descriptors":[{"type":"item.color","value":"Blue"},{"type":"item.capability.Plays Diablo Immortal","value":"true"},{"type":"item.weight","value":"675"},{"type":"item.storage.capacity","value":"128"}],"cost":100.0,"scoreExplanation":{"overallHardScore":0,"overallSoftScore":0,"overallScorePercentage":1.0,"overallScorePercentageWithRewards":1.0,"requirementsScorePercentage":1.0,"budgetScorePercentage":1.0,"brokenRequirements":[],"exceededRequirements":[],"metRequirements":[]}},"requirementsTotalWeight":10,"rejectedSoftRequirements":[]}],"items":[{"id":"2","name":"Name 2","descriptors":[{"type":"item.color","value":"Blue"},{"type":"item.capability.Plays Diablo Immortal","value":"true"},{"type":"item.weight","value":"675"},{"type":"item.storage.capacity","value":"128"}],"cost":100.0,"scoreExplanation":{"overallHardScore":0,"overallSoftScore":0,"overallScorePercentage":1.0,"overallScorePercentageWithRewards":1.0,"requirementsScorePercentage":1.0,"budgetScorePercentage":1.0,"brokenRequirements":[],"exceededRequirements":[],"metRequirements":[]}},{"id":"4","name":"Name 4","descriptors":[{"type":"item.color","value":"Red"},{"type":"item.capability.PLays Minecraft","value":"true"},{"type":"item.weight","value":"850"},{"type":"item.storage.capacity","value":"256"}],"cost":100.0,"scoreExplanation":{"overallHardScore":-10,"overallSoftScore":0,"overallScorePercentage":0.5,"overallScorePercentageWithRewards":0.5,"requirementsScorePercentage":0.0,"budgetScorePercentage":1.0,"brokenRequirements":[{"type":"item.color","scoringLogic":{"method":"Penalize","comparisonLogic":"NotEqual","weight":10,"constraintHardness":"hard","weightRelativePercentage":1.0},"values":["Blue"],"valueType":"string","penalty":10,"penaltyPercentage":0.5}],"exceededRequirements":[],"metRequirements":[]}},{"id":"1","name":"Name 1","descriptors":[{"type":"item.color","value":"Red"},{"type":"item.capability.Plays Roblox","value":"true"},{"type":"item.weight","value":"450"},{"type":"item.storage.capacity","value":"256"}],"cost":200.0,"scoreExplanation":{"overallHardScore":-20,"overallSoftScore":0,"overallScorePercentage":0.0,"overallScorePercentageWithRewards":0.0,"requirementsScorePercentage":0.0,"budgetScorePercentage":0.0,"brokenRequirements":[{"type":"item.color","scoringLogic":{"method":"Penalize","comparisonLogic":"NotEqual","weight":10,"constraintHardness":"hard","weightRelativePercentage":1.0},"values":["Blue"],"valueType":"string","penalty":10,"penaltyPercentage":0.5},{"type":"purchase.budget.amount","scoringLogic":{"method":"Penalize","comparisonLogic":"GreaterThan","weight":10,"constraintHardness":"hard"},"values":["100.0"],"penalty":10,"penaltyPercentage":0.5}],"exceededRequirements":[],"metRequirements":[]}},{"id":"3","name":"Name 3","descriptors":[{"type":"item.color","value":"Red"},{"type":"item.capability.Plays Roblox","value":"true"},{"type":"item.weight","value":"420"},{"type":"item.storage.capacity","value":"128"}],"cost":200.0,"scoreExplanation":{"overallHardScore":-20,"overallSoftScore":0,"overallScorePercentage":0.0,"overallScorePercentageWithRewards":0.0,"requirementsScorePercentage":0.0,"budgetScorePercentage":0.0,"brokenRequirements":[{"type":"item.color","scoringLogic":{"method":"Penalize","comparisonLogic":"NotEqual","weight":10,"constraintHardness":"hard","weightRelativePercentage":1.0},"values":["Blue"],"valueType":"string","penalty":10,"penaltyPercentage":0.5},{"type":"purchase.budget.amount","scoringLogic":{"method":"Penalize","comparisonLogic":"GreaterThan","weight":10,"constraintHardness":"hard"},"values":["100.0"],"penalty":10,"penaltyPercentage":0.5}],"exceededRequirements":[],"metRequirements":[]}}],"solutionSummary":"Explanation of score (0hard/0soft):\n Constraint match totals:\n Indictments:\n"}]
curl --location --request POST 'https://zylalabs.com/api/5744/decision+optimizer+api/7474/optimize+assignment' --header 'Authorization: Bearer YOUR_API_KEY'
--data-raw '{
"itemAssignments": [
{
"id": "1",
"requirements": [
{
"type": "item.color",
"values": [
"Blue"
],
"valueType": "string",
"scoringLogic": {
"comparisonLogic": "NotEqual",
"method": "Penalize",
"weight": 10,
"constraintHardness": "hard"
}
}
],
"budget": {
"amount": 100,
"weight": 10
}
}
],
"items": [
{
"id": "1",
"name": "Name 1",
"cost": 200,
"descriptors": [
{
"type": "item.color",
"value": "Red"
},
{
"type": "item.capability.Plays Roblox",
"value": "true"
},
{
"type": "item.weight",
"value": "450"
},
{
"type": "item.storage.capacity",
"value": "256"
}
]
},
{
"id": "2",
"name": "Name 2",
"cost": 100,
"descriptors": [
{
"type": "item.color",
"value": "Blue"
},
{
"type": "item.capability.Plays Diablo Immortal",
"value": "true"
},
{
"type": "item.weight",
"value": "675"
},
{
"type": "item.storage.capacity",
"value": "128"
}
]
},
{
"id": "3",
"name": "Name 3",
"cost": 200,
"descriptors": [
{
"type": "item.color",
"value": "Red"
},
{
"type": "item.capability.Plays Roblox",
"value": "true"
},
{
"type": "item.weight",
"value": "420"
},
{
"type": "item.storage.capacity",
"value": "128"
}
]
},
{
"id": "4",
"name": "Name 4",
"cost": 100,
"descriptors": [
{
"type": "item.color",
"value": "Red"
},
{
"type": "item.capability.PLays Minecraft",
"value": "true"
},
{
"type": "item.weight",
"value": "850"
},
{
"type": "item.storage.capacity",
"value": "256"
}
]
}
]
}'
| Header | Description |
|---|---|
Authorization
|
[Required] Should be Bearer access_key. See "Your API Access Key" above when you are subscribed. |
No long-term commitment. Upgrade, downgrade, or cancel anytime. Free Trial includes up to 50 requests.
The primary function of the Decision Optimizer API is to optimize complex decisions by mapping elements to requirements with customized constraints, maximizing results while minimizing costs.
The API has advanced capabilities that allow it to penalize constraint violations, ensuring that the optimization process adheres to the specified requirements and constraints.
The Decision Optimizer API can be utilized across various industries, including logistics, finance, e-commerce, and more, making it suitable for a wide range of allocation and optimization problems.
Yes, the API can dynamically adjust according to custom parameters, allowing users to tailor the optimization process to their specific needs and requirements.
Organizations can expect to maximize benefits, minimize costs, and achieve better resource allocation efficiency by integrating the Decision Optimizer API into their workflows.
The Optimize Assignment endpoint returns optimal solutions based on provided elements and assignments, including item assignments, scores, and detailed explanations of how each item meets the specified requirements and constraints.
Key fields in the response include `itemAssignments`, which detail the assigned items and their requirements, `budget`, which shows the allocated amount, and `scoreExplanation`, which provides insights into the scoring metrics for each assignment.
The response data is structured as a JSON array containing objects for `itemAssignments` and `items`. Each object includes relevant attributes such as `id`, `requirements`, `budget`, and `scoreExplanation`, facilitating easy parsing and analysis.
Users can customize their requests by including parameters such as `elements`, `assignments`, and specific constraints. These parameters allow for tailored optimization based on unique requirements and budget considerations.
Users can analyze the `scoreExplanation` to understand how well each item meets requirements, identify any penalties for constraint violations, and make informed decisions based on the overall scores and budget adherence.
Typical use cases include optimizing resource allocation in logistics, budget management in finance, and inventory management in e-commerce, where organizations need to balance multiple constraints while maximizing efficiency.
Data accuracy is maintained through rigorous validation processes during input and output, ensuring that the optimization results reflect the most accurate assessments based on the provided requirements and constraints.
Users can expect a consistent structure in the response, including a list of item assignments with associated requirements, budget details, and scoring metrics. This uniformity aids in predictable data handling and analysis.
Please have a look at our Refund Policy: https://zylalabs.com/terms#refund
To obtain your API key, you first need to sign in to your account and subscribe to the API you want to use. Once subscribed, go to your Profile, open the Subscription section, and select the specific API. Your API key will be available there and can be used to authenticate your requests.
You can’t switch APIs during the free trial. If you subscribe to a different API, your trial will end and the new subscription will start as a paid plan.
If you don’t cancel before the 7th day, your free trial will end automatically and your subscription will switch to a paid plan under the same plan you originally subscribed to, meaning you will be charged and gain access to the API calls included in that plan.
The free trial ends when you reach 50 API requests or after 7 days, whichever comes first.
No, the free trial is available only once, so we recommend using it on the API that interests you the most. Most of our APIs offer a free trial, but some may not include this option.
Yes, we offer a 7-day free trial that allows you to make up to 50 API calls at no cost, so you can test our APIs without any commitment.
Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.
Service Level:
100%
Response Time:
8,662ms
Service Level:
100%
Response Time:
472ms
Service Level:
100%
Response Time:
236ms
Service Level:
100%
Response Time:
3,110ms
Service Level:
100%
Response Time:
2,073ms
Service Level:
100%
Response Time:
9,164ms
Service Level:
100%
Response Time:
1,130ms
Service Level:
100%
Response Time:
1,563ms
Service Level:
100%
Response Time:
1,405ms
Service Level:
100%
Response Time:
3,566ms
Service Level:
100%
Response Time:
547ms
Service Level:
100%
Response Time:
242ms
Service Level:
100%
Response Time:
268ms
Service Level:
100%
Response Time:
363ms
Service Level:
100%
Response Time:
213ms
Service Level:
100%
Response Time:
20,002ms
Service Level:
100%
Response Time:
501ms
Service Level:
100%
Response Time:
431ms
Service Level:
100%
Response Time:
206ms
Service Level:
100%
Response Time:
20,002ms