}} API Documentation | 3DPACK.ING

3DPACK.ING API

Container optimization in seconds. Two endpoints. That's it.

Quick Start

1. Get your API key

Sign up at 3dpack.ing → Subscribe to a plan → Receive API key by email

2. Add to header

-H "api-key: YOUR_API_KEY"

3. Make your first call

curl -X POST 'https://server.3dpack.ing/api/calculate?containers' \
        -H 'api-key: YOUR_API_KEY' \
        -H 'Content-Type: application/json' \
        -d '{
          "Candidates": [{"Width": 1000, "Length": 1000, "Height": 1000}],
          "Items": [{"Width": 100, "Length": 100, "Height": 100, "Quantity": 50}]
        }'

Response:

[
        {
          "ContainerDimensions": "1000 x 1000 x 1000",
          "Quantity": 50,
          "VolumeUsage": 50.0,
          "WeightUsage": 0
        }
      ]

✅ You just packed 50 items using 50% of container space!

Endpoints

POST /api/calculate

Pack multiple item types into containers

Request

{
        "Candidates": [
          {
            "Width": 12032,
            "Length": 2350,
            "Height": 2692
          }
        ],
        "Items": [
          {
            "Width": 520,
            "Length": 450,
            "Height": 380,
            "TagOrColor": "Item A",
            "Quantity": 43
          },
          {
            "Width": 410,
            "Length": 360,
            "Height": 310,
            "TagOrColor": "Item B",
            "Quantity": 529
          }
        ]
      }

Response with ?containers

[
        {
          "ContainerDimensions": "12032 x 2350 x 2692",
          "Quantity": 572,
          "VolumeUsage": 66.16,
          "WeightUsage": 0,
          "Item A": 43,
          "Item B": 529
        }
      ]

💡 Add ?containers to get summary instead of full 3D coordinates

POST /api/findBestBoxes

Find maximum quantity of single item type

Request

{
        "Candidates": [
          {
            "Length": 12030,
            "Width": 2350,
            "Height": 2390,
            "MaxWeight": 2673000
          }
        ],
        "Item": {
          "Length": 520,
          "Width": 450,
          "Height": 380,
          "Weight": 719
        }
      }

Response

[
        {
          "ContainerDimensions": "12030 x 2350 x 2390",
          "Quantity": 690,
          "VolumeUsage": 90.81,
          "WeightUsage": 18.56
        }
      ]

💡 Add ?items&trial=1 for 2x faster response (3-4 seconds)

Real Example

multiitems.json

{
        "Candidates": [
          {
            "Width": 12032,
            "Length": 2350,
            "Height": 2692
          }
        ],
        "Items": [
          {
            "Width": 520,
            "Length": 450,
            "Height": 380,
            "TagOrColor": "Item A",
            "Quantity": 43
          },
          {
            "Width": 410,
            "Length": 360,
            "Height": 310,
            "TagOrColor": "Item B",
            "Quantity": 529
          },
          {
            "Width": 460,
            "Length": 285,
            "Height": 310,
            "TagOrColor": "Item D",
            "Quantity": 830
          }
        ]
      }

Command

curl -X POST 'https://server.3dpack.ing/api/calculate?containers' \
        -H 'api-key: YOUR_API_KEY' \
        -H 'Content-Type: application/json' \
        -d @multiitems.json

Result (10 seconds)

[
        {
          "ContainerDimensions": "12032 x 2350 x 2692",
          "Quantity": 1402,
          "VolumeUsage": 66.16,
          "WeightUsage": 0,
          "Item A": 43,
          "Item B": 529,
          "Item D": 830
        }
      ]

Important Rules

  • All dimensions and weights must be integers (no decimals)
  • Use "Item" for single item, "Items" for multiple
  • Response times: 3-4 seconds (simple), 10-20 seconds (complex)
  • Base URL: https://server.3dpack.ing

Any Language

const response = await fetch('https://server.3dpack.ing/api/calculate?containers', {
        method: 'POST',
        headers: {
          'api-key': 'YOUR_API_KEY',
          'Content-Type': 'application/json'
        },
        body: JSON.stringify({
          Candidates: [{Width: 1000, Length: 1000, Height: 1000}],
          Items: [{Width: 100, Length: 100, Height: 100, Quantity: 50}]
        })
      });
      
      const result = await response.json();
      console.log(`Packed ${result[0].Quantity} items`);
import requests
      
      response = requests.post(
          'https://server.3dpack.ing/api/calculate?containers',
          headers={'api-key': 'YOUR_API_KEY'},
          json={
              'Candidates': [{'Width': 1000, 'Length': 1000, 'Height': 1000}],
              'Items': [{'Width': 100, 'Length': 100, 'Height': 100, 'Quantity': 50}]
          }
      )
      
      result = response.json()
      print(f"Packed {result[0]['Quantity']} items")
var client = new HttpClient();
      client.DefaultRequestHeaders.Add("api-key", "YOUR_API_KEY");
      
      var data = new {
          Candidates = new[] { new { Width = 1000, Length = 1000, Height = 1000 } },
          Items = new[] { new { Width = 100, Length = 100, Height = 100, Quantity = 50 } }
      };
      
      var response = await client.PostAsJsonAsync(
          "https://server.3dpack.ing/api/calculate?containers", 
          data
      );
      
      var result = await response.Content.ReadAsStringAsync();
OkHttpClient client = new OkHttpClient();
      
      String json = "{\"Candidates\":[{\"Width\":1000,\"Length\":1000,\"Height\":1000}]," +
                    "\"Items\":[{\"Width\":100,\"Length\":100,\"Height\":100,\"Quantity\":50}]}";
      
      Request request = new Request.Builder()
          .url("https://server.3dpack.ing/api/calculate?containers")
          .addHeader("api-key", "YOUR_API_KEY")
          .post(RequestBody.create(json, MediaType.parse("application/json")))
          .build();
      
      Response response = client.newCall(request).execute();