1. Data Factory
  2. Trigger Inbound Shipment Event
POST
/data_factory/inboundShipmentEvent
curl --request POST \
     --url https://sandbox.masonhub.co/dragonfly-cosmetics-demo/api/v1/data_factory/inboundShipmentEvent \
     --header 'Authorization: Bearer <token>' \
     --header 'Content-Type: application/json' \
     --data '{
  "customer_identifier": "<string>",
  "event": "<string>",
  "randomize_receipt_qty": "false",
  "randomize_inventory_statuses": "false"
}'

Simulate inbound shipment receiving events to test receiving workflows and inventory updates.

DataFactory is only available in the sandbox environment.

​
Request Body

customer_identifier
required
string

Shipment customer identifier.

event
required
string

Event type. Options: onDock, receivingStarted, receivingCompleted.

randomize_receipt_qty
default:false
boolean

Randomize received quantities for over/under receipt testing.

randomize_inventory_statuses
default:false
boolean

Randomize inventory statuses (available, damaged, quality-control, etc.).

curl -X POST "https://app.masonhub.co/{account}/api/v1/data_factory/inboundShipmentEvent" \
  -H "Authorization: Bearer your_jwt_token" \
  -H "Content-Type: application/json" \
  -d '[{
    "customer_identifier": "shipment32432",
    "event": "receivingCompleted",
    "randomize_receipt_qty": true,
    "randomize_inventory_statuses": true
  }]'
{
  "success": true,
  "data": [{
    "customer_identifier": "shipment32432",
    "event": "receivingCompleted",
    "status": "received"
  }]
}

​
Available Events

1

On Dock

Shipment arrived at facility
2

Receiving Started

Receiving process has begun
3

Receiving Completed

All items received and processed

​
Randomization Options

When enabled, randomization helps test variance scenarios:

  • randomize_receipt_qty: Simulates over/under receipts
  • randomize_inventory_statuses: Items received into mixed statuses (available, damaged, quality-control, refurbishing, under-investigation)

​
Use Cases