Sandbox & testing
The sandbox (https://dev.ddex-delivery.phyzi.io, pk_test_ keys, bucket phyzi-ddex-aria-dev-750330851149) behaves exactly like live, with two
differences:
- Nothing is manufactured or shipped, and no one at Phyzi is notified.
- You drive the real-world steps. In live, proofs, production and shipping happen at Phyzi's pace and webhooks arrive as they happen. In the sandbox you trigger them with the endpoints below, so you can build and test your whole flow in minutes.
Sandbox endpoints need your pk_test_ key and return 404 sandbox_only on the live API.
| Endpoint | Does |
|---|---|
POST /v1/sandbox/deliveries/sample |
Drops the sample package into your dev bucket as a new batch. Sends release.received → release.validated for aria-rel-sample-0001. |
POST /v1/sandbox/master-orders/{id}/advance |
Moves a master order to its next step and sends that step's webhook (see below) |
POST /v1/sandbox/fan-orders/{id}/ship |
Ships a fan order with a fake USPS tracking number (fan_order.shipped) |
POST /v1/sandbox/releases/{releaseId}/stock |
{ "add_units": 25 } and/or { "fulfillment_mode": "made_to_order" }. Tests availability and out_of_stock. |
Walking a master order through production
| Current status | advance does |
Webhook |
|---|---|---|
created |
Creates the next proof round | master_order.proof_ready |
proof_ready |
409 waiting_for_proof_decision. Approve or reject the proof first. |
|
proof_approved |
master_order.master_built |
|
master_built |
master_order.units_loaded |
|
units_loaded |
Ships units_to_artist and adds units_to_stock to fan stock |
master_order.shipped (+ stock.updated) |
shipped |
409 order_finished |
A full test run
API=https://dev.ddex-delivery.phyzi.io/v1; AUTH="Authorization: Bearer $PHYZI_KEY"; J="Content-Type: application/json"
curl -X POST $API/sandbox/deliveries/sample -H "$AUTH" # → release.validated
MO=$(curl -s -X POST $API/master-orders -H "$AUTH" -H "$J" -H "Idempotency-Key: $(uuidgen)" \
-d '{"release_id":"aria-rel-sample-0001","artist":{"name":"Sample","email":"a@example.com"},"units_to_stock":2,"units_to_artist":0}' | jq -r .id)
curl -X POST $API/sandbox/master-orders/$MO/advance -H "$AUTH" # → proof_ready
PF=$(curl -s $API/master-orders/$MO -H "$AUTH" | jq -r '.proofs[-1].id')
curl -X POST $API/proofs/$PF/approve -H "$AUTH" -H "$J" -H "Idempotency-Key: $(uuidgen)" -d '{}'
for i in 1 2 3; do curl -s -X POST $API/sandbox/master-orders/$MO/advance -H "$AUTH" >/dev/null; done # built → loaded → shipped
curl $API/releases/aria-rel-sample-0001/availability -H "$AUTH" # stock_on_hand: 2
for n in 1 2 3; do
curl -s -X POST $API/fan-orders -H "$AUTH" -H "$J" -H "Idempotency-Key: $(uuidgen)" \
-d "{\"release_id\":\"aria-rel-sample-0001\",\"external_id\":\"fan-$n-$RANDOM\",\"customer\":{\"name\":\"Fan $n\"},\"ship_to\":{\"name\":\"Fan $n\",\"line1\":\"1 Main St\",\"city\":\"Austin\",\"region\":\"TX\",\"postal_code\":\"78701\",\"country\":\"US\"}}" | jq '.status // .error.code'
done # accepted, accepted, out_of_stock
Test your own DDEX
Your generated ERNs can go straight to the dev bucket. Every batch gets a full validation result
within about a minute, as a release.validated or release.rejected webhook and on
GET /v1/deliveries/{batchId}. Use POST /v1/validate for a faster loop on just the XML.
Before going live
- Real releases from your DDEX generator validate in the sandbox, including one with featured artists and one with print files
- Your webhook endpoint verifies signatures, deduplicates on event
idand returns 2xx quickly - The full master-order flow (with a rejected proof) and a fan order that hits
out_of_stockboth work end to end - You show availability before offering "Buy Phyzi"
Then we'll issue live keys and live bucket credentials.