API Reference

Comprehensive documentation for the Perseuss API.

API Endpoint

POSTCartonization API
https://v2.cartonizationapi.com/post-cartonization

API Schema

Request Headers

Authorizationstringrequired

Bearer token used to authenticate production API requests.

Example:
"Bearer YOUR_API_KEY"

Request Body

Loading live request body schema from the API...

Response Schema

Loading documented responses from the API...

Code Implementation

import requests

response = requests.post(
    "https://v2.cartonizationapi.com/post-cartonization",
    headers={
        "Content-Type": "application/json",
        "Authorization": "Bearer YOUR_API_KEY"
    },
    json={
        "max_runtime_seconds": 30,
        "objective_function": "min_bin_count",
        "allowed_bins": [
            {
                "bin_id": "9x12x4",
                "length": 9,
                "width": 12,
                "height": 4,
                "bin_weight": 0.4,
                "bin_cost": 0.25
            },
            {
                "bin_id": "9x12x6",
                "length": 9,
                "width": 12,
                "height": 6,
                "bin_weight": 0.5,
                "bin_cost": 0.35
            }
        ],
        "items": [
            {
                "item_id": "frozen_pizza",
                "quantity": 4,
                "length": 11,
                "width": 8.5,
                "height": 2,
                "weight": 1.5
            },
            {
                "item_id": "frozen_burger",
                "quantity": 6,
                "length": 4,
                "width": 4,
                "height": 4,
                "weight": 1
            }
        ]
    }
)

print(response.json())

Ready to test the API?

Use our interactive playground to experiment with different payloads and see real-time results with 3D visualizations.

Open API Playground