Order boxing
Order boxing packs the items in a quote into box sizes you define, then quotes the boxes instead of the individual items. It suits stores that send several small products in one carton.
There is no separate endpoint and no request field. Boxing is a setting on your API key’s module, and once it is on it applies to every quote made with that key.
Turn it on
Section titled “Turn it on”- Sign in to the members area and go to Settings, then Integrations.
- Open your Custom API module.
- In Order boxing, tick Group items in boxes.
- Add up to 5 boxes, each with Length (cm), Width (cm), Height (cm) and Max weight (kg).
- Optionally set Minimum fill active and Minimum fill percent (see Minimum fill).
- Save.
You can also switch boxing on or off from code with POST /api/v5/bookings/v4/set_api_settings by sending "enabled_group_box": "yes" or "no". Box sizes and minimum fill are only set in the members area. To read the current settings, call GET /api/v5/bookings/v4/api_details/full: they are in module_setting as group_box ("on" when enabled), box_length, box_width, box_height, box_weight, minimum_fill and minimum_fill_percent.
How items are packed
Section titled “How items are packed”When a quote has two or more packages in total (counting quantity):
- Each package is treated separately, so an item with
quantity: 3is three packages. - Packages are fitted into your boxes in three dimensions, turning them where that helps. In each round the box that packs the most packages, with the least wasted space, is chosen.
- Each filled box becomes one item in the quote, with the box’s dimensions and the total weight of what is inside, as package type
Carton(or the type your Package Type Rule settings give for that weight). - Packages that do not fit in any box, or that would leave a box below the minimum fill, are quoted as their own items.
A quote with a single package is never boxed.
The quote response’s items, and the draft booking it creates, list the boxes rather than the items you sent. The boxes are what gets priced and booked, so make sure your box sizes and maximum weights are real ones you pack with.
Minimum fill
Section titled “Minimum fill”Minimum fill stops a box being used when it would be mostly empty. With Minimum fill active, a box is only used when the packages fill at least Minimum fill percent of its volume. Packages that cannot meet it are quoted as their own items, which can be cheaper than sending a large, nearly empty box.
The percentage defaults to 25. Untick Minimum fill active to use boxes however full they are.
Example
Section titled “Example”With boxing on and one 40 × 30 × 30 cm box with a 20 kg maximum, this request:
{ "items": [ { "description": "Carton", "weight": 1, "length": 20, "width": 15, "height": 10, "quantity": 4 } ]}is quoted as one 40 × 30 × 30 cm carton weighing 4 kg. Without boxing it is quoted as four 20 × 15 × 10 cm cartons of 1 kg each.