O2M Logo
One to Many
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

EventSent when
stock.changedAn item's sellable number changed.
order.createdAn order was imported from a channel or created.
order.status_changedAn order moved to another status.
shipment.dispatchedA parcel was handed to its courier.
goods_receipt.receivedGoods were received.
pingYou 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"
  }
}
FieldTypeDescription
skustringThe item.
sellablenumberThe number on offer now.
reasonstringstock_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
  }
}
FieldTypeDescription
idstringO2M's ID for the order.
order_idstringThe order's number.
channelstringWhere it came from.
statusstringThe order's status.
channel_statusstring or nullThe 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
      }
    ]
  }
}
FieldTypeDescription
id, numberstringO2M's ID and the parcel's number.
orderobjectThe order's id, order_id and channel.
warehousestringThe warehouse's code.
courier, awbstring or nullThe courier and its tracking number.
dispatched_atstringWhen it was handed over.
linesarrayThe 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"
      }
    ]
  }
}
FieldTypeDescription
id, numberstringO2M's ID and the receipt's number.
warehousestringThe warehouse's name.
quality_checkbooleanWhether the units wait for a quality check.
linesarrayThe 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"
  }
}