Item Events

Order item event types, what triggers each one, and the fields its payload carries
View as Markdown

These events fire on the order item object. To receive them, register the item.* pattern — or any individual event below — against a webhook target. See Configure Webhooks via API for how to create a target and define filters.


Event types

EventDescription
item.createTriggered when an item is created. This event will only occur once for an item, but can occur many times for the associated subscription.
item.change_quantityTriggered when the quantity of an item is modified. This event can be triggered more than once for an item.
item.removeTriggered when the item is removed from an order. When this happens, it is deleted from the order. If the item was associated with an active subscription, a corresponding item.create event will be generated. This event will only occur once for an item, but can occur many times for the associated subscription.
item.item_subscribeTriggered when a subscription is created from an item that originally was a “one-time” item - an item in an order that customer had not subscribed to. This event will only occur once for an item.
item.update_priceTriggered when the price of an item is updated. This event can be triggered more than once for an item. NOTE: This event can only be triggered when the update item price API endpoint is used.
item.sku_swap—
item.successfully_placedTriggered when the associated order’s placement response indicates it was processed successfully and GMV was realized. This event will only occur once for an item, but can occur many times for the associated subscription. Related: order.success event
item.*Matches every event in this family.

Payload

NameTypeDescriptionExample
idstrIdentifier of the event”mmmm4444nnnn3333pppp”
typestrThe type of event that occurredSee below for full list of event types
createdintTime since epoch when the event occurred1622589211
datajsonEvent data objectSee JSON below
data.object.typestrResource type of event”Subscription”
data.object.merchantstrIdentifier of merchant”aaaa1111bbbb2222cccc”
data.object.public_idstrPublic ID of resource. Should be used to retrieve additional resource object data via OG API if necessary.”zzzz9999yyyy8888xxxx”
data.customerstrThe merchant_user_id — the ID from the merchant system, not our internal public ID”h183738”
data.productstrThe external product ID from the merchant’s system”SKUabc”
data.orderstrThe public ID from Ordergroove’s system of the order in which this item exists”1234e74444dd115555d8bc7cccc043b0”
data.subscriptionstrIf the item is part of a subscription, this will contain the public ID of that subscription in Ordergroove’s system”bc7cccc043b01234e74444155”
Example Data
{
"id": "mmmm4444nnnn3333pppp",
"type": "item.create",
"created": 1622589211,
"data": {
"object": {
"type": "item",
"merchant": "aaaa1111bbbb2222cccc",
"public_id": "zzzz9999yyyy8888xxxx",
"customer": "m1234576",
"product": "SKUabc",
"order": "1234e74444dd115555d8bc7cccc043b0",
"subscription": "bc7cccc043b01234e74444155"
}
}
}