These events are emitted by the Inventory API (btrz-api-inventory) when custom content is created, updated, or deleted.
Events
| Action |
Event name |
Endpoint |
| Create custom content |
customContent.created |
POST /custom-content |
| Update custom content |
customContent.updated |
PUT /custom-content/:customContentId |
| Delete custom content |
customContent.deleted |
DELETE /custom-content/:customContentId |
Payload example created and updated
{
"id": "string",
"attemptId": "string",
"livemode": "boolean",
"created": "int",
"event": "string",
"data": {
"_id": "5f243d100617680712e78dd5",
"accountId": "5f243d100617680712e78dd6",
"name": "string",
"lang": "en-us",
"enabled": true,
"ord": 1,
"title": "string",
"text": "string",
"imgUrl": "string",
"pageId": "string",
"position": "pre",
"createdBy": "5f243d100617680712e78dd7",
"updatedBy": "5f243d100617680712e78dd7",
"createdAt": {
"value": "2020-11-10T15:02:11Z",
"offset": 0
},
"updatedAt": {
"value": "2020-11-10T15:02:11Z",
"offset": 0
}
}
}
Field descriptions — data (customContent.created / customContent.updated)
| Field |
Type |
Description |
| _id |
string |
Custom content id (24 hex characters). |
| accountId |
string |
Account (provider) id. |
| name |
string |
Name for the piece of content. |
| lang |
string |
Language for the content (e.g. en-us). |
| pageId |
string |
Id of a valid custom or standard page. |
| position |
string |
For standard pageId: "pre" or "post" (placement relative to existing controls). |
| title |
string |
Optional title for the content. |
| text |
string |
Optional text for the content. |
| imgUrl |
string |
Optional URL to a public image. |
| mainUrl |
string |
Optional main link URL. |
| ord |
integer |
Order number. |
| enabled |
boolean |
Whether the custom content is enabled. |
| createdBy |
string |
User id that created this resource (24 hex). |
| updatedBy |
string |
User id that last updated this resource (24 hex). |
| createdAt |
object |
BzDate: date the object was created. |
| updatedAt |
object |
BzDate: date the object was last updated. |
Payload example deleted
{
"id": "string",
"attemptId": "string",
"livemode": "boolean",
"created": "int",
"event": "string",
"data": {
"customContentId": "string"
}
}
Field descriptions — data (customContent.deleted)
| Field |
Type |
Description |
| customContentId |
string |
The deleted custom content id (24 hex characters). |