API Reference
The PackNative - Parametric Packaging on Your Infrastructure API provides programmatic access to our parametric geometry kernel. Because the software runs self-hosted, all requests are local to your infrastructure.
Base URL
Your API endpoint depends on your Docker deployment configuration.
Authentication
While PackNative - Parametric Packaging on Your Infrastructure runs inside your VPC, best practice is to secure the internal endpoint with an API Key. You can generate keys in the Admin Dashboard (`/admin/keys`).
Authenticate by passing your key in the X-API-Key header.
curl https://PackNative.com/api/v2/system/health \
-H "X-API-Key: pk_prod_89234892"Errors
PackNative - Parametric Packaging on Your Infrastructure uses standard HTTP response codes to indicate success or failure. Detailed error messages are returned in the JSON body.
| Code | Error Type | Description |
|---|---|---|
| 400 | Bad Request | The JSON payload is malformed or missing required fields. |
| 401 | Unauthorized | Missing or invalid X-API-Key. |
| 422 | Unprocessable | Geometry logic failed (e.g., Length < Width). |
| 429 | Rate Limited | Too many requests. See headers for reset time. |
Error Response Example
{
"status": "error",
"code": "geometry_constraint_violation",
"message": "Box Length (200mm) cannot be less than Width (300mm) for style FEFCO_0201.",
"request_id": "req_9f8a7b"
}Rate Limiting
The default binary configuration allows 5,000 requests per minute per IP. You can adjust this in your `docker-compose.yml` environment variables.
Response Headers:
- X-RateLimit-Limit:5000
- X-RateLimit-Remaining:4998
- X-RateLimit-Reset:1678900000
Webhooks
PackNative - Parametric Packaging on Your Infrastructure can push events to your local ERP or CRM when specific actions occur, avoiding the need for polling. Configure webhook URLs in the Admin Dashboard.
Event Object
Example payload sent when a new quote is finalized:
{
"event": "quote.finalized",
"created_at": "2026-01-08T10:30:00Z",
"data": {
"quote_id": "qt_12345",
"customer_ref": "CUST-99",
"total_amount": 1450.00,
"currency": "USD",
"download_url": "http://packengine.local/files/qt_12345.pdf"
}
}/geometry/quote
The core endpoint. Calculates geometry, material usage, and price for a parametric box style.
curl -X POST https://PackNative.com/api/v2/geometry/quote \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_KEY" \
-d '{
"style": "FEFCO_0201",
"L": 400,
"W": 300,
"H": 250,
"material_id": "flute_b_kraft",
"quantity": 1000
}'