V1
Version 1 of the Binacle.Net API focuses exclusively on the Fitting function, which finds the smallest bin capable of accommodating all provided items.
๐ Learn more: Core Concepts
This API version has been deprecated as of v1.2.0 and will be removed in v2.0.0.
Consider migrating to Version 2.
๐ Contents
๐ Presets
GET /api/v1/presets
Returns all configured bin presets.
Response Example
{
"result": "Success",
"presets": {
"preset1": [
{ "id": "preset1_bin1", "length": 10, "width": 10, "height": 10 },
{ "id": "preset1_bin2", "length": 20, "width": 20, "height": 20 },
{ "id": "preset1_bin3", "length": 30, "width": 30, "height": 30 }
],
"preset2": [
{ "id": "preset2_bin1", "length": 10, "width": 20, "height": 30 },
{ "id": "preset2_bin2", "length": 30, "width": 60, "height": 60 }
]
}
}
๐ก Query by Preset
POST /api/v1/query/by-preset/{preset}
Find the smallest bin from the specified preset that fits all items.
Request Example
{
"items": [
{ "id": "box_1", "quantity": 2, "length": 2, "width": 5, "height": 10 },
{ "id": "box_2", "quantity": 1, "length": 12, "width": 15, "height": 10 },
{ "id": "box_3", "quantity": 1, "length": 12, "width": 10, "height": 15 }
]
}
Response Example
{
"result": "Success",
"bin": { "id": "Small", "length": 10, "width": 40, "height": 60 }
}
๐ก Query by Custom
POST /api/v1/query/by-custom
Find the smallest bin from a custom list that fits all items.
Request Example
{
"bins": [
{ "id": "custom_bin_1", "length": 10, "width": 40, "height": 60 },
{ "id": "custom_bin_2", "length": 20, "width": 40, "height": 60 }
],
"items": [
{ "id": "box_1", "quantity": 2, "length": 2, "width": 5, "height": 10 },
{ "id": "box_2", "quantity": 1, "length": 12, "width": 15, "height": 10 },
{ "id": "box_3", "quantity": 1, "length": 12, "width": 10, "height": 15 }
]
}
Response Example
{
"result": "Success",
"bin": { "id": "custom_bin_1", "length": 10, "width": 40, "height": 60 }
}