# Fits In The Box > 3D bin packing API and Shopify shipping optimization app ## What it does Fits In The Box is a 3D bin packing service that calculates optimal box sizes for shipping orders. It reduces shipping costs by finding the smallest box (or fewest boxes) that fit all items, and increases average order value by showing customers what else fits at no extra shipping cost. ## API - Base URL: https://api.fitsinthebox.com - Spec: https://api.fitsinthebox.com/v1/openapi.json - Docs: https://api.fitsinthebox.com/v1/docs - Auth: Bearer token (prefix: fitb_) - Rate limits: 5,000 requests/month (free tier), 100 requests/hour burst ## Endpoints ### POST /v1/pack Pack items into configured boxes using raw dimensions. - Input: array of items with length, width, height, weight - Output: box assignments, utilization percentage, shipping cost ### POST /v1/pack/shopify Pack items using Shopify product/variant IDs (dimensions fetched from synced catalog). - Input: array of Shopify line items with variant_id and quantity - Output: box assignments, utilization percentage, shipping cost, upsell suggestions ## Two Pack Modes 1. **Raw dimensions** — send item measurements directly. Works without Shopify. 2. **Shopify product IDs** — send variant IDs; the API resolves dimensions from your synced product catalog. ## Key features - 3D bin packing algorithm with 6-rotation optimization - Multi-box splitting for large orders - Cart upsell suggestions (products that fit in remaining space) - Cold chain separation (temperature-sensitive items packed separately) - Real-time shipping cost calculator widget for Shopify storefronts - OpenAPI 3.1 spec with Swagger UI ## Links - Website: https://fitsinthebox.com - Developer docs: https://fitsinthebox.com/developers - API docs (Swagger): https://api.fitsinthebox.com/v1/docs - OpenAPI spec: https://api.fitsinthebox.com/v1/openapi.json - Support: support@fitsinthebox.com