Expanding events

Gain a better understanding of the events that are available for expansion, the extra data they contain, and how to subscribe to them

Your account can be configured so that Digital River expands the data.object of certain event types before pushing them to a webhook's designated address. Currently, four expandable events exist: order.accepted, order.cancelled, order.refunded, and fulfillment.created.

Relative to their default version, items[].productDetails in these enhanced events contains (1) physical , a boolean which indicates whether Digital River classified that product as physical or digital, and (2) metadata, assuming you defined this parameter in the SKU or productDetails.

You can also access these additional key-value pairs by making a get order request with the expand query parameter set to true.

{
    "id": "e2ab8696-53fc-4ac9-9f5f-f38eb61fbf05",
    "type": "order.accepted",
    "data": {
        "object": {
            "id": "295759800336",
            ...
            "items": [
                {
                    "id": "229219830336",
                    ...
                    "productDetails": {
                        "id": "sku_8128ce28-d4a8-475b-9fce-6e78c38da88b",
                        ...
                        "physical": true,
                        "metadata": {
                            "more": "data",
                            "evenMore": "data"
                        },
                        ...
                    },
                    ...
                }
            ],
            ...
        }
    },
    ...
}

If you think your application could use this extra data to, for example, populate customer notifications or determine whether the product is physical and its details need to be sent to your logistics provider, you'll first need to ask your Digital River representative to turn the feature on. Once that's done, for each of the supported event types, you'll be able to choose between its standard or expanded version when configuring a webhook in Digital River Dashboard.

Last updated