Events
Was this page helpful?
Events
Every event O2M sends, with an example of its data.
Overview
O2M sends one event for each change, in a standard envelope with the details in data.
All events
| Event | Sent when |
|---|---|
stock.changed | An item's sellable number changed. |
order.created | An order was imported from a channel or created. |
order.status_changed | An order moved to another status. |
shipment.dispatched | A parcel was handed to its courier. |
goods_receipt.received | Goods were received. |
ping | You clicked Send a test. It does not need ticking. |
Each example below shows the whole body. Your code should ignore fields it does not know, as new ones can be added.
stock.changed
Body
{
"id": "0b1f6c1e-6c55-4d0e-9d8a-2f4c3a1e7b90",
"event": "stock.changed",
"created_at": "2026-10-02T10:00:00.000Z",
"company_id": "12",
"data": {
"sku": "MUG-BLUE",
"sellable": 13,
"reason": "stock_decreased"
}
}| Field | Type | Description |
|---|---|---|
sku | string | The item. |
sellable | number | The number on offer now. |
reason | string | stock_increased or stock_decreased. |
order.created
Body
{
"id": "0b1f6c1e-6c55-4d0e-9d8a-2f4c3a1e7b90",
"event": "order.created",
"created_at": "2026-10-02T10:00:00.000Z",
"company_id": "12",
"data": {
"id": "4410",
"order_id": "SO-1001",
"channel": "mysite",
"status": "placed",
"channel_status": null
}
}| Field | Type | Description |
|---|---|---|
id | string | O2M's ID for the order. |
order_id | string | The order's number. |
channel | string | Where it came from. |
status | string | The order's status. |
channel_status | string or null | The status in the channel's own words. |
To get the lines and address, retrieve the order using id.
order.status_changed
Body
{
"id": "0b1f6c1e-6c55-4d0e-9d8a-2f4c3a1e7b90",
"event": "order.status_changed",
"created_at": "2026-10-02T10:00:00.000Z",
"company_id": "12",
"data": {
"id": "4410",
"order_id": "SO-1001",
"channel": "mysite",
"status": "shipped",
"channel_status": null,
"previous_status": "processing"
}
}The same as order.created, plus previous_status.
shipment.dispatched
Body
{
"id": "0b1f6c1e-6c55-4d0e-9d8a-2f4c3a1e7b90",
"event": "shipment.dispatched",
"created_at": "2026-10-02T10:00:00.000Z",
"company_id": "12",
"data": {
"id": "77",
"number": "SHP-2627-00012",
"order": {
"id": "4410",
"order_id": "SO-1001",
"channel": "mysite"
},
"warehouse": "BLR",
"courier": "Delhivery",
"awb": "1234567890",
"dispatched_at": "2026-10-02T15:00:00.000Z",
"lines": [
{
"sku": "MUG-BLUE",
"quantity": 2
}
]
}
}| Field | Type | Description |
|---|---|---|
id, number | string | O2M's ID and the parcel's number. |
order | object | The order's id, order_id and channel. |
warehouse | string | The warehouse's code. |
courier, awb | string or null | The courier and its tracking number. |
dispatched_at | string | When it was handed over. |
lines | array | The sku and quantity of each item in the parcel. |
goods_receipt.received
Body
{
"id": "0b1f6c1e-6c55-4d0e-9d8a-2f4c3a1e7b90",
"event": "goods_receipt.received",
"created_at": "2026-10-02T10:00:00.000Z",
"company_id": "12",
"data": {
"id": "91",
"number": "GRN-2627-00091",
"warehouse": "Bengaluru",
"quality_check": false,
"lines": [
{
"sku": "MUG-BLUE",
"quantity": 100,
"lot_no": "L-2026-10"
}
]
}
}| Field | Type | Description |
|---|---|---|
id, number | string | O2M's ID and the receipt's number. |
warehouse | string | The warehouse's name. |
quality_check | boolean | Whether the units wait for a quality check. |
lines | array | The sku, quantity and lot_no of each line. |
ping
Body
{
"id": "0b1f6c1e-6c55-4d0e-9d8a-2f4c3a1e7b90",
"event": "ping",
"created_at": "2026-10-02T10:00:00.000Z",
"company_id": "12",
"data": {
"message": "A test event from O2M"
}
}