3DPACK.ING API Documentation

Integrate world-class packing optimization into your applications

Getting Started

The 3DPACK.ING API provides programmatic access to our advanced 3D bin packing algorithms. Integrate container loading optimization directly into your WMS, ERP, or custom applications.

Fast

Average response time under 20 seconds for typical requests

Enterprise Ready

99.9% uptime SLA

Developer Friendly

RESTful design with comprehensive Swagger docs

Authentication

All API requests require an API key passed in the header:

curl -X POST https://server.3dpack.ing/api/calculate \
        -H "Content-Type: application/json" \
        -H "api-key: YOUR_API_KEY_HERE" \
        -d @request.json

Contact us at onur@3dpack.ing to get your API key, after signing up.

Endpoints

Primary Endpoint

POST https://server.3dpack.ing/api/calculate

Calculate optimal packing for a set of items and containers using our standard algorithm.

Max Packing Endpoint

POST https://server.3dpack.ing/api/calculate/max

Calculate optimal packing using our advanced BinDrake engine for maximum space utilization. This endpoint supports:

  • Advanced optimization algorithms with speed settings: VeryFast, Fast, Slow
  • Calculation modes: MinimizeHeight, MinimizeLength
  • Enhanced stacking constraints (StackCapacity, StackWeightCapacity)
  • Gap specifications between items
  • Container selection optimization (automatically selects best-fit container)

Container Mode Behavior

  • Single Container Mode: When multiple candidates are provided, the API selects the most volume-efficient container based on utilization percentage
  • Multiple Container Mode: Uses all provided candidates as different container types, distributing items across them as needed

The Max endpoint uses the same request/response format as the standard endpoint but offers superior optimization for complex packing scenarios.

Full interactive API documentation available at Swagger UI

Request Format

Send a JSON payload with container candidates and items to pack:

{
        "Candidates": [ 
          { 
            "Width": 200, 
            "Length": 140, 
            "Height": 100 
          } 
        ],
        "Items": [
          { 
            "Width": 90, 
            "Length": 70, 
            "Height": 15, 
            "TagOrColor": "blue", 
            "Quantity": 5, 
            "KeepTop": true 
          },
          { 
            "Width": 10, 
            "Length": 30, 
            "Height": 15, 
            "TagOrColor": "green", 
            "Quantity": 5, 
            "NoTop": true 
          }
        ]
      }

Response Format

The API returns optimized packing with 3D coordinates:

{
        "SelectedContainer": { "Width": 200, "Length": 140, "Height": 100 },
        "ItemsNotPut": [],
        "ItemsPut": [
          {
            "Item": { "Width": 90, "Length": 70, "Height": 15, "TagOrColor": "blue", "Quantity": 1 },
            "Coord": { "X": 0, "Y": 0, "Z": 0 },
            "ContainerIndex": 0
          }
        ]
      }

Supported Constraints

Orientation

  • KeepTop: Item must stay upright
  • KeepBottom: Heavy item, place at bottom

Stacking

  • StackCapacity: Max items on top
  • StackWeightCapacity: Max weight on top
  • NoTop: Nothing can be placed on top

Grouping

  • Priority: Loading sequence (1-100)
  • Gap: Required spacing between items

Code Examples

Standard Endpoint

// Calculate 3D Packing
      const apiUrl = "https://server.3dpack.ing/api/calculate";
      const packingData = {
        Candidates: [ { Width: 200, Length: 140, Height: 100 } ],
        Items: [
          { Width: 90, Length: 70, Height: 15, TagOrColor: "blue", Quantity: 5, KeepTop: true },
          { Width: 10, Length: 30, Height: 15, TagOrColor: "green", Quantity: 5, NoTop: true }
        ]
      };
      
      fetch(apiUrl, {
        method: "POST",
        headers: {
          "accept": "application/json",
          "api-key": "YOUR_API_KEY_HERE",
          "Content-Type": "application/json"
        },
        body: JSON.stringify(packingData)
      })
      .then(res => res.json())
      .then(result => console.log(result))
      .catch(error => console.error('API Error:', error));

Max Endpoint with Advanced Options

// Max Packing with Advanced Options
      const apiUrl = "https://server.3dpack.ing/api/calculate/max";
      const packingData = {
        Candidates: [{ Width: 200, Length: 140, Height: 100, MaxWeight: 1000 }],
        Items: [
          { 
            Width: 90, Length: 70, Height: 15, 
            TagOrColor: "blue", Quantity: 5, 
            KeepTop: true, Weight: 10,
            StackCapacity: 3, StackWeightCapacity: 50,
            Gap: 2
          }
        ],
        ContainerMode: "Single",
        CalcMode: "MinimizeLength", // MinimizeHeight or MinimizeLength
        Speed: "Fast" // VeryFast, Fast, or Slow
      };
      
      fetch(apiUrl, {
        method: "POST",
        headers: {
          "accept": "application/json",
          "api-key": "YOUR_API_KEY_HERE",
          "Content-Type": "application/json"
        },
        body: JSON.stringify(packingData)
      })
      .then(res => res.json())
      .then(result => console.log(result))
      .catch(error => console.error('API Error:', error));

Find Best Container

// Find the most efficient container from multiple candidates
      const apiUrl = "https://server.3dpack.ing/api/calculate";
      const packingData = {
        Candidates: [
          { Width: 200, Length: 140, Height: 100, Weight: 1000 },
          { Width: 250, Length: 200, Height: 150, Weight: 1500 },
          { Width: 300, Length: 250, Height: 200, Weight: 2000 },
          { Width: 400, Length: 300, Height: 250, Weight: 3000 }
        ],
        Items: [
          { 
            Width: 90, Length: 70, Height: 15, 
            TagOrColor: "electronics", Quantity: 8, 
            KeepTop: true, Weight: 10,
            StackCapacity: 3, StackWeightCapacity: 50
          },
          { 
            Width: 50, Length: 40, Height: 30, 
            TagOrColor: "books", Quantity: 12, 
            Weight: 15,
            StackCapacity: 5, StackWeightCapacity: 100
          }
        ],
        ContainerMode: "Single", // Single - API will select best container
        Speed: "Fast", // VeryFast, Fast, or Slow
        CalcMode: "MinimizeLength" // MinimizeHeight or MinimizeLength
      };
      
      fetch(apiUrl, {
        method: "POST",
        headers: {
          "accept": "application/json",
          "api-key": "YOUR_API_KEY_HERE",
          "Content-Type": "application/json"
        },
        body: JSON.stringify(packingData)
      })
      .then(res => res.json())
      .then(result => {
        // The selected container will be in the response
        console.log("Result:", result);
      })
      .catch(error => console.error('API Error:', error));

Standard Endpoint

import requests
      import json
      
      # Calculate 3D Packing
      url = "https://server.3dpack.ing/api/calculate"
      headers = {
          "accept": "application/json",
          "api-key": "YOUR_API_KEY_HERE",
          "Content-Type": "application/json"
      }
      packing_data = {
          "Candidates": [{"Width": 200, "Length": 140, "Height": 100}],
          "Items": [
              {"Width": 90, "Length": 70, "Height": 15, "TagOrColor": "blue", "Quantity": 5, "KeepTop": True},
              {"Width": 10, "Length": 30, "Height": 15, "TagOrColor": "green", "Quantity": 5, "NoTop": True}
          ]
      }
      
      response = requests.post(url, json=packing_data, headers=headers)
      result = response.json()
      print(result)

Max Endpoint with Advanced Options

# Max Packing with Advanced Options
      url = "https://server.3dpack.ing/api/calculate/max"
      headers = {
          "accept": "application/json",
          "api-key": "YOUR_API_KEY_HERE",
          "Content-Type": "application/json"
      }
      packing_data = {
          "Candidates": [{"Width": 200, "Length": 140, "Height": 100, "Weight": 1000}],
          "Items": [{
              "Width": 90, "Length": 70, "Height": 15,
              "TagOrColor": "blue", "Quantity": 5,
              "KeepTop": True, "Weight": 10,
              "StackCapacity": 3, "StackWeightCapacity": 50,
              "Gap": 2
          }],
          "Speed": "Fast",  # VeryFast, Fast, or Slow
          "CalcMode": "MinimizeLength"  # MinimizeHeight or MinimizeLength
      }
      
      response = requests.post(url, json=packing_data, headers=headers)
      result = response.json()
      print(result)

Find Best Container

# Find the most efficient container from multiple candidates
      url = "https://server.3dpack.ing/api/calculate"
      headers = {
          "accept": "application/json",
          "api-key": "YOUR_API_KEY_HERE",
          "Content-Type": "application/json"
      }
      packing_data = {
          "Candidates": [
              {"Width": 200, "Length": 140, "Height": 100, "Weight": 1000},
              {"Width": 250, "Length": 200, "Height": 150, "Weight": 1500},
              {"Width": 300, "Length": 250, "Height": 200, "Weight": 2000},
              {"Width": 400, "Length": 300, "Height": 250, "Weight": 3000}
          ],
          "Items": [
              {
                  "Width": 90, "Length": 70, "Height": 15,
                  "TagOrColor": "electronics", "Quantity": 8,
                  "KeepTop": True, "Weight": 10,
                  "StackCapacity": 3, "StackWeightCapacity": 50
              },
              {
                  "Width": 50, "Length": 40, "Height": 30,
                  "TagOrColor": "books", "Quantity": 12,
                  "Weight": 15,
                  "StackCapacity": 5, "StackWeightCapacity": 100
              }
          ],
          "ContainerMode": "Single",  # Single or Multiple
          "Speed": "Fast",  # VeryFast, Fast, or Slow
          "CalcMode": "MinimizeLength"  # MinimizeHeight or MinimizeLength
      }
      
      response = requests.post(url, json=packing_data, headers=headers)
      result = response.json()
      print(f"Selected container: {result['SelectedContainer']}")
      print(f"Space utilization: {result['Metrics']['SpaceUtilization']}%")

Standard Endpoint

using System.Net.Http;
      using System.Text;
      using Newtonsoft.Json;
      
      // Calculate 3D Packing
      var client = new HttpClient();
      client.DefaultRequestHeaders.Add("accept", "application/json");
      client.DefaultRequestHeaders.Add("api-key", "YOUR_API_KEY_HERE");
      
      var packingData = new {
          Candidates = new[] { 
              new { Width = 200, Length = 140, Height = 100 } 
          },
          Items = new[] {
              new { Width = 90, Length = 70, Height = 15, TagOrColor = "blue", Quantity = 5, KeepTop = true },
              new { Width = 10, Length = 30, Height = 15, TagOrColor = "green", Quantity = 5, NoTop = true }
          }
      };
      
      var json = JsonConvert.SerializeObject(packingData);
      var content = new StringContent(json, Encoding.UTF8, "application/json");
      
      var response = await client.PostAsync("https://server.3dpack.ing/api/calculate", content);
      var result = await response.Content.ReadAsStringAsync();
      var packingResult = JsonConvert.DeserializeObject(result);
      Console.WriteLine(packingResult);

Max Endpoint with Advanced Options

// Max Packing with Advanced Options
      var client = new HttpClient();
      client.DefaultRequestHeaders.Add("accept", "application/json");
      client.DefaultRequestHeaders.Add("api-key", "YOUR_API_KEY_HERE");
      
      var packingData = new {
          Candidates = new[] { 
              new { Width = 200, Length = 140, Height = 100, Weight = 1000 } 
          },
          Items = new[] {
              new { 
                  Width = 90, Length = 70, Height = 15, 
                  TagOrColor = "blue", Quantity = 5, 
                  KeepTop = true, Weight = 10,
                  StackCapacity = 3, StackWeightCapacity = 50,
                  Gap = 2
              }
          },
          Speed = "Fast", // VeryFast, Fast, or Slow
          CalcMode = "MinimizeLength" // MinimizeHeight or MinimizeLength
      };
      
      var json = JsonConvert.SerializeObject(packingData);
      var content = new StringContent(json, Encoding.UTF8, "application/json");
      
      var response = await client.PostAsync("https://server.3dpack.ing/api/calculate/max", content);
      var result = await response.Content.ReadAsStringAsync();
      Console.WriteLine(result);

Find Best Container

// Find the most efficient container from multiple candidates
      var client = new HttpClient();
      client.DefaultRequestHeaders.Add("accept", "application/json");
      client.DefaultRequestHeaders.Add("api-key", "YOUR_API_KEY_HERE");
      
      var packingData = new {
          Candidates = new[] {
              new { Width = 200, Length = 140, Height = 100, Weight = 1000 },
              new { Width = 250, Length = 200, Height = 150, Weight = 1500 },
              new { Width = 300, Length = 250, Height = 200, Weight = 2000 },
              new { Width = 400, Length = 300, Height = 250, Weight = 3000 }
          },
          Items = new[] {
              new { 
                  Width = 90, Length = 70, Height = 15, 
                  TagOrColor = "electronics", Quantity = 8, 
                  KeepTop = true, Weight = 10,
                  StackCapacity = 3, StackWeightCapacity = 50
              },
              new { 
                  Width = 50, Length = 40, Height = 30, 
                  TagOrColor = "books", Quantity = 12, 
                  Weight = 15,
                  StackCapacity = 5, StackWeightCapacity = 100
              }
          },
          ContainerMode = "Single", // Single or Multiple
          Speed = "Fast", // VeryFast, Fast, or Slow
          CalcMode = "MinimizeLength" // MinimizeHeight or MinimizeLength
      };
      
      var json = JsonConvert.SerializeObject(packingData);
      var content = new StringContent(json, Encoding.UTF8, "application/json");
      
      var response = await client.PostAsync("https://server.3dpack.ing/api/calculate", content);
      var result = await response.Content.ReadAsStringAsync();
      var packingResult = JsonConvert.DeserializeObject(result);
      Console.WriteLine($"Selected container: {packingResult.SelectedContainer}");
      Console.WriteLine($"Space utilization: {packingResult.Metrics.SpaceUtilization}%");

Ready to Get Started?

Join tens of developers using our API

Get Your API Key