API ‐ V2 - ChrisMavrommatis/Binacle.Net GitHub Wiki
Version 2 of the Binacle.Net API expands upon Version 1 by providing both the Fitting and Packing functions. In addition to finding the smallest bin for fitting, it returns results for all bins. This version provides more detailed information and increased flexibility compared to the deprecated Version 1.
🔍 Learn more:
🔌 Endpoints
📜 Presets
GET /api/v2/presets
📩 Returns: A list of predefined bin collections.
🧩 Fit by Preset
POST /api/v2/fit/by-preset/{preset}
📡 Request: Provide a list of items and a preset key.
📩 Returns: The API performs the Fitting function and returns results for each bin in the preset, indicating which bins can accommodate all items.
🧩 Fit by Custom
POST /api/v2/fit/by-custom
📡 Request: Provide a list of bins and items.
📩 Returns: The API performs the Fitting function and returns results for each bin, specifying which bins can fit all items.
📦 Pack by Preset
POST /api/v2/pack/by-preset/{preset}
📡 Request: Provide a list of items and a preset key.
📩 Returns: The API performs the Packing function and returns results for each bin in the preset, including the specific locations for each item.
📦 Pack by Custom
POST /api/v2/pack/by-custom
📡 Request: Provide a list of bins and items.
📩 Returns: The API performs the Packing function and returns results for each bin, including the specific locations for each item.
📐 Fitting Parameters
The Fit endpoints support the following optional parameters, which are disabled by default:
- Report Fitted Items: Include details of items that fit.
- Report Unfitted Items: Include details of items that couldn't fit.
- Find Smallest Bin Only: Return only the smallest bin that fits all items.
📦 Packing Parameters
The Pack endpoints accepts the following optional parameters, which are disabled by default:
- Opt In To Early Fails: Stop early if items cannot be packed.
- Report Packed Items Only When Fully Packed: Only show results if all items are packed.
- Never Report Unpacked Items: Hide details of unpacked items.
- Stop At Smallest Bin: Stop checking bins after finding the smallest valid one.