-
Notifications
You must be signed in to change notification settings - Fork 0
About the API
Binacle.Net offers three versions of its API, each tailored to different needs.
Version 1 focuses exclusively on the Fitting function, with the goal of finding the smallest bin that can accommodate all of the items.
Warning
This api version is deprecated as of v1.2.0 and will be removed at v2.0.0.
-
Presets: Returns a list of all available presets, which are predefined collections of bins.
-
Query by Preset: Lets you send only the items and the preset key. The API will return the smallest bin from the specified preset that can accommodate all items, if such a bin exists.
-
Query by Custom: Allows you to send both the bins and items in a single request. The API will return the smallest bin that that can accommodate all items, if such a bin exists.
Version 2 expands on the capabilities of Version 1 by offering both the Fitting and Packing Functions. Unlike Version 1, it doesn't focus solely on finding the smallest bin but returns results for all bins.
-
Presets: Lists all available presets, which are predefined collections of bins.
-
Fit By Preset: Send only the items and the preset key. The API performs the Fitting function and returns results for each bin in the preset, specifying which bins can accommodate all the items.
-
Fit By Custom: This endpoint allows you to submit both the bins and items in a single request. The API performs the Fitting function, providing results for each bin in the request and indicating which can accommodate all the items.
-
Pack By Preset: Send only the items and the preset key. The API executes the Packing function and returns results for each bin from the preset, including the specific locations for each item.
-
Pack By Custom: This endpoint enables you to send both bins and items in one request. The API carries out the Packing function, returning results for each bin in the request, along with the positions for each item.
Both Fitting endpoints support the following parameters, which are disabled by default:
- Report Fitted Items: Indicates whether to return details of the items that fit within the bins.
- Report Unfitted Items: Specifies whether to include information about items that could not be accommodated.
- Find Smallest Bin Only: Restricts the response to only the smallest bin that can hold all items.
Both Packing endpoints accept the following parameters, which are disabled by default:
- Opt In To Early Fails: Allows the process to terminate early if it determines that not all items can be packed.
- Report Packed Items Only When Fully Packed: Ensures that packed items are reported only when all items fit completely.
- Never Report Unpacked Items: Excludes any information about items that remain unpacked in the response.
- Stop At Smallest Bin: Stops the packing process once the smallest bin is found.
This version retains the same functionality as Version 2's Pack By Custom, but only accepts algorithm selection as a parameter.
Version 3 also introduces ViPaq, a protocol designed to efficiently encode packing information. You can read more about in ViPaq Protocol
Warning
This api version is experimental and can change at any time.
- Pack By Custom: Allows you to submit both the bins and items in a single request. The API performs the Packing function, returning results for each bin in the request, along with the positions for each item.
-
Algorithm: Specifies the packing algorithm to use for determining the best arrangement of items within the bins.
Available algorithms:
- FFD (First Fit Decreasing)
- WFD (Worst Fit Decreasing)
- BFD (Best Fit Decreasing)