- Data Factory
- Ship Order
Data Factory
Ship Order
Simulate order fulfillment and shipping (Sandbox only)
POST
/data_factory/shipOrder
curl --request POST \
--url https://sandbox.masonhub.co/dragonfly-cosmetics-demo/api/v1/data_factory/shipOrder \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"order_customer_id": "<string>",
"shorts": [],
"number_of_shipments": "1"
}'
curl --request POST \
--url https://sandbox.masonhub.co/dragonfly-cosmetics-demo/api/v1/data_factory/shipOrder \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"order_customer_id": "<string>",
"shorts": [],
"number_of_shipments": "1"
}'Simulate order fulfillment and shipping with optional shorts and multi-shipment support.
DataFactory is only available in the sandbox environment.
Request Body
order_customer_id
required
string
Customer order identifier to ship.
shorts
array
Array of SKU customer identifiers to short (not fulfill).
number_of_shipments
default:1
integer
Number of separate shipments to create for the order.
curl -X POST "https://app.masonhub.co/{account}/api/v1/data_factory/shipOrder" \
-H "Authorization: Bearer your_jwt_token" \
-H "Content-Type: application/json" \
-d '[{
"order_customer_id": "12345",
"shorts": ["sku1", "sku2"],
"number_of_shipments": 2
}]'
{
"success": true,
"data": [{
"order_customer_id": "12345",
"status": "fulfilled",
"shipments": [
{"tracking_number": "1Z999AA10123456784", "carrier": "UPS"},
{"tracking_number": "1Z999AA10123456785", "carrier": "UPS"}
]
}]
}
What This Does
1
Change Status
Order status changes to ‘fulfilled’
2
Create Shipments
Creates shipment records with tracking numbers
3
Handle Shorts
Specified SKUs are marked as shorted
4
Trigger Callbacks
Generates orderEvent callbacks
Testing Scenarios
curl -X POST "https://app.masonhub.co/{account}/api/v1/data_factory/shipOrder" \
-H "Authorization: Bearer your_jwt_token" \
-H "Content-Type: application/json" \
-d '[{
"order_customer_id": "12345",
"shorts": ["sku1", "sku2"],
"number_of_shipments": 2
}]'
curl --request POST \
--url https://sandbox.masonhub.co/dragonfly-cosmetics-demo/api/v1/data_factory/shipOrder \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"order_customer_id": "<string>",
"shorts": [],
"number_of_shipments": "1"
}'
curl --request POST \
--url https://sandbox.masonhub.co/dragonfly-cosmetics-demo/api/v1/data_factory/shipOrder \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"order_customer_id": "<string>",
"shorts": [],
"number_of_shipments": "1"
}'{
"success": true,
"data": [{
"order_customer_id": "12345",
"status": "fulfilled",
"shipments": [
{"tracking_number": "1Z999AA10123456784", "carrier": "UPS"},
{"tracking_number": "1Z999AA10123456785", "carrier": "UPS"}
]
}]
}