Allows users to create, retrieve, update, and optimize load planning scenarios. Loads define how products are packed into containers, supporting multi-stage loading, weight distribution, stacking rules, and optimization constraints.
Endpoints |
Load Object
A Load represents a set of products arranged in one or more containers, optimized based on volume, weight, and stacking rules.
id string Unique identifier for the load. |
name string Load name or reference identifier. |
containers array List of containers assigned to the load. |
products array List of products included in the load. |
status string Current status ( |
created_at timestamp ISO 8601 timestamp of when the load was created. |
modified_at timestamp ISO 8601 timestamp of the last update to the load. |
Example Load Object
{
"id": "load_123456",
"name": "Retail Shipment Load",
"containers": [
{
"id": "container_001",
"type": "Pallet",
"max_weight": 1000,
"max_volume": 2.5
}
],
"products": [
{
"id": "product_123",
"quantity": 50,
"weight": 5,
"dimensions": {
"length": 10,
"width": 5,
"height": 4
}
}
],
"status": "pending",
"created_at": "2025-02-21T12:00:00Z",
"updated_at": "2025-02-21T12:15:00Z"
}
Create a Load
Create a new load record in the database.
Required Permissions
ADMIN
, CREATE
Request
curl -X POST "https://api.magiclogic.com/db/v1/load" \
-H "Content-Type: application/json" \
-H "Authorization: Basic YOUR_API_KEY" \
-d '{
"containers": [
{
"id": "container_001",
"type": "Pallet",
"max_weight": 1000,
"max_volume": 2.5,
"dimensions": {
"length": 48,
"width": 40,
"height": 60,
"unit": "inches"
}
}
],
"products": [
{
"id": "product_123",
"name": "Widget A",
"quantity": 100,
"weight": 5,
"dimensions": {
"length": 10,
"width": 5,
"height": 4,
"unit": "inches"
}
}
]
}'
Response
{
"id": "load_001",
"status: "pending",
"created_at": "2025-02-21T12:00:00Z",
"updated_at": "2025-02-21T12:20:00Z"
}
Retrieve a Load
Fetches details of a specific load by its ID.
Required Permissions
ADMIN
, CREATE
, EDIT
, VIEW
Request
curl -X GET "https://api.magiclogic.com/db/v1/load/{loadid}" \
-H "Authorization: Basic YOUR_API_KEY"
Response
{
"id": "load_001",
"status": "completed",
"containers": [
{
"id": "container_001",
"type": "Pallet",
"max_weight": 1000,
"max_volume": 2.5,
"dimensions": {
"length": 48,
"width": 40,
"height": 60,
"unit": "inches"
}
}
],
"products": [
{
"id": "product_123",
"name": "Widget A",
"quantity": 100,
"weight": 5,
"dimensions": {
"length": 10,
"width": 5,
"height": 4,
"unit": "inches"
}
}
],
"created_at": "2025-02-21T12:00:00Z",
"updated_at": "2025-02-21T12:30:00Z"
}
Update an Existing Load
Modify an existing load record in the database.
Required Permissions
ADMIN
, CREATE
, EDIT
Request
curl -X GET "https://api.magiclogic.com/db/v1/load/load_001" \
-H "Authorization: Basic YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated Load Name",
"status": "in progress",
"loaded": true
}'
Response
{
"id": "load_001",
"name": "Updated Load Name",
"status": "in progress",
"created_at": "2025-02-21T12:00:00Z",
"updated_at": "2025-02-21T12:30:00Z",
"loaded": true
}
Parameters
loadid string (required)
Unique identifier of the load to update.
payload string (required)
Valid JSON payload containing the updates to the load.
Retrieve All Loads
Retrieve a list of loads stored in the database. Use the since
parameter to filter containers modified after a specified timestamp.
Required Permissions
ADMIN
, CREATE
, EDIT
, VIEW
Request
curl -X GET "https://api.magiclogic.com/db/v1/loads?since=2025-02-01T00:00:00.000Z&status=completed&range=1:20" \
-H "Authorization: Basic YOUR_API_KEY"
Response
{
"loads": [
{
"id": "load_001",
"status": "completed",
"created_at": "2025-02-10T12:00:00Z",
"updated_at": "2025-02-10T12:30:00Z"
},
{
"id": "load_002",
"status": "processing",
"created_at": "2025-02-15T14:20:00Z",
"updated_at": "2025-02-15T15:00:00Z"
},
{
"id": "load_003",
"status": "pending",
"created_at": "2025-02-18T09:10:00Z",
"updated_at": "2025-02-18T09:15:00Z"
}
],
"total_count": 3
}
Parameters
since string
Returns only containers modified after the specified UTC timestamp.
range integer
Returns the start row and number of rows to return
name string
Returns a partial name match
Retrieve a Paginated Range of Loads
Retrieve a specific range of loads by defining the start row and number of rows to return.
Required Permissions
ADMIN
, CREATE
, EDIT
, VIEW
Request
curl -X GET "https://api.magiclogic.com/db/v1/loads?range=1:5" \
-H "Authorization: Basic YOUR_API_KEY"
Response
{
"loads": [
{
"id": "load_001",
"name": "Order 12345",
"status": "completed",
"created_at": "2025-02-10T12:00:00Z",
"updated_at": "2025-02-10T12:30:00Z"
},
{
"id": "load_002",
"name": "Order 67890",
"status": "In Progress",
"created_at": "2025-02-15T14:20:00Z",
"updated_at": "2025-02-15T15:00:00Z"
},
],
"total_count": 2
}
Retrieve Loads by Name Filter
Search for loads that match a partial name.
Required Permissions
ADMIN
, CREATE
, EDIT
, VIEW
Request
curl -X GET "https://api.magiclogic.com/db/v1/loads?name=Order 12345" \
-H "Authorization: Basic YOUR_API_KEY"
Response
{
"loads": [
{
"id": "load_001",
"name": "Order 12345",
"status": "completed",
"created_at": "2025-02-10T12:00:00Z",
"updated_at": "2025-02-10T12:30:00Z"
}
],
"total_count": 1
}