Item Events
Order item event types, what triggers each one, and the fields its payload carries
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
| Event | Description |
|---|---|
item.create | Triggered 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_quantity | Triggered when the quantity of an item is modified. This event can be triggered more than once for an item. |
item.remove | Triggered 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_subscribe | Triggered 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_price | Triggered 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_placed | Triggered 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
| Name | Type | Description | Example |
|---|---|---|---|
id | str | Identifier of the event | ”mmmm4444nnnn3333pppp” |
type | str | The type of event that occurred | See below for full list of event types |
created | int | Time since epoch when the event occurred | 1622589211 |
data | json | Event data object | See JSON below |
data.object.type | str | Resource type of event | ”Subscription” |
data.object.merchant | str | Identifier of merchant | ”aaaa1111bbbb2222cccc” |
data.object.public_id | str | Public ID of resource. Should be used to retrieve additional resource object data via OG API if necessary. | ”zzzz9999yyyy8888xxxx” |
data.customer | str | The merchant_user_id — the ID from the merchant system, not our internal public ID | ”h183738” |
data.product | str | The external product ID from the merchant’s system | ”SKUabc” |
data.order | str | The public ID from Ordergroove’s system of the order in which this item exists | ”1234e74444dd115555d8bc7cccc043b0” |
data.subscription | str | If 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"}}}