Item Event Object
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 | object | Type | 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.object.customer | str | The merchant_user_id AKA the id from merchant system - not our internal public ID | "h183738" |
data.object.product | str | The external product ID from the merchant's system | "SKUabc" |
data.object.order | str | The public ID from Ordergroove's system of the order in which this item exists. | "1234e74444dd115555d8bc7cccc043b0" |
data.object.subscription | str | If item is part of a subscription this will contain the public ID of that subscription in Ordergroove's system | "bc7cccc043b01234e74444155" |
data.object.offer | str | Offer record ID | "1234e74444dd115555d8bc7cccc043b0" |
data.object.quantity | int | Number of items | 1 |
data.object.price | str | Unit price of item | '20.00' |
data.object.total_price | str | Final item price after all item level incentives have been applied | '20.00' |
data.object.first_placed | int | Unix timestamp of the first day the item was attempted to be placed. This is only set for items that enter our "out of stock" workflow. | 1300375961 |
data.object.components | object | List of objects representing the bundle components/products | [ {"product": "product_1"}, {"product": "product_2"} ] |
- 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",
"offer": "a748aa648ac811e8af3bbc764e106cf4",
"quantity": 1,
"price": '20.00',
"total_price": '20.00',
"first_placed": null,
"components": [
{"product": "product_1"},
{"product": "product_2"}
]
}
}
}
Item Event Types
-
item.create
-
item.change_quantity
-
item.remove
-
item.item_subscribe
-
item.update_price
-
item.successfully_placed
-
item.out_of_stock
Triggered when an item is created.
This event will only occur once for an item, but can occur
many times for the associated subscription.
Triggered when the quantity of an item is modified.
This event can be triggered more than once for an item.
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.
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.
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
NOTE: This event can only be triggered when the update item price API endpoint is used
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
Related: order.success event
Triggered when an item is detected as not having enough inventory to be fulfilled.
The Ordergroove application moves the item to be attempted for processing the next day.
The payload provides the order the item was moved to.
NOTE: This retry mechanism occurs a limited number of times. At the end of the retry cycle the item is deleted. This event is not triggered at the end of the retry cycle.
NOTE: This retry mechanism occurs a limited number of times. At the end of the retry cycle the item is deleted. This event is not triggered at the end of the retry cycle.