Market place modifiers webhooks
This page documents webhook events related to marketplace modifiers from the Inventory API (marketplace-modifiers resource).
Inventory API – marketplace-modifiers resource
Emitted when a marketplace modifier is created (POST /marketplace-modifiers), updated (PUT /marketplace-modifiers/:marketplaceModifierId), or deleted (DELETE /marketplace-modifiers/:marketplaceModifierId).
Events (Inventory API)
| Action | Event name | Endpoint |
|---|---|---|
| Create a new marketplace modifier | marketplacemodifiers.created |
POST /marketplace-modifiers |
| Update an existing marketplace modifier | marketplacemodifiers.updated |
PUT /marketplace-modifiers/:marketplaceModifierId |
| Delete an existing marketplace modifier | marketplacemodifiers.deleted |
DELETE /marketplace-modifiers/:marketplaceModifierId |
Payload example – created (Inventory API)
The data object for marketplacemodifiers.created is the full created marketplace modifier (same shape as the API response marketplaceModifier).
{
"attemptId": "2ddeb855-1cfe-43a1-ad93-f7729668e2d4",
"created": 1634755442,
"data": {
"_id": "617063718c37ca13819479d9",
"accountId": "52a377ec430c7d4e220001fc",
"channel": "backoffice",
"createdAt": {
"offset": 0,
"value": "2021-10-20T18:44:01.957Z"
},
"createdBy": "55fc2f318791db6e1a0000b6",
"currency": "CAD",
"destinationId": "",
"loyaltyAccumulateRatio": 0,
"loyaltyRedeemRatio": 0,
"onewayPriceModifier": {
"type": "%",
"value": 12000
},
"openReturnPriceModifier": {
"type": "%",
"value": 0
},
"operatingCompanyId": "60124ad1b853e227502ec796",
"originId": "",
"productId": "52a377ec430c7d4e220001fe",
"returnPriceModifier": {
"type": "%",
"value": 0
},
"sameDayRoundtripPriceModifier": {
"type": "%",
"value": 0
},
"updatedAt": {
"offset": 0,
"value": "2021-10-20T18:44:01.958Z"
},
"updatedBy": "55fc2f318791db6e1a0000b6",
"weight": 5120
},
"event": "marketplacemodifiers.created",
"id": "74d17558-896e-4b82-a752-84ed98237a7f",
"livemode": true
}
Payload example – updated (Inventory API)
The data object for marketplacemodifiers.updated is the full updated marketplace modifier (same shape as the API response marketplaceModifier).
{
"attemptId": "a53c0979-c965-49a9-8bb1-388a41d9364c",
"created": 1634755850,
"data": {
"_id": "61577d04a25cf913db0fa912",
"accountId": "52a377ec430c7d4e220001fc",
"channel": "backoffice",
"createdAt": {
"offset": 0,
"value": "2021-10-01T21:26:28.645Z"
},
"createdBy": "55fc2f318791db6e1a0000b6",
"currency": "CAD",
"destinationId": "",
"loyaltyAccumulateRatio": 0,
"loyaltyRedeemRatio": 0,
"onewayPriceModifier": {
"type": "$",
"value": 235000
},
"openReturnPriceModifier": {
"type": "%",
"value": 0
},
"operatingCompanyId": "611bbe812fccef3a94f9b00b",
"originId": "",
"productId": "52a377ec430c7d4e220001fe",
"returnPriceModifier": {
"type": "%",
"value": 0
},
"sameDayRoundtripPriceModifier": {
"type": "%",
"value": 0
},
"updatedAt": {
"offset": 0,
"value": "2021-10-20T18:50:44.469Z"
},
"updatedBy": "55fc2f318791db6e1a0000b6",
"weight": 5120
},
"event": "marketplacemodifiers.updated",
"id": "c504e355-0d10-4516-98e6-a62b97e739c7",
"livemode": true
}
Payload example – deleted (Inventory API)
The data object for marketplacemodifiers.deleted contains only the id of the deleted marketplace modifier.
{
"attemptId": "68f8601d-f49c-44cf-a7aa-e89c37d2dad3",
"created": 1634755852,
"data": {
"marketplaceModifierId": "61577d04a25cf913db0fa912"
},
"event": "marketplacemodifiers.deleted",
"id": "65298dd1-a335-4ec0-8175-1fa53f8eaf60",
"livemode": true
}
Field descriptions – data (created / updated)
data matches the Inventory API MarketplaceModifier schema. Main fields:
| Field | Type | Description |
|---|---|---|
| _id | string | Marketplace modifier id (24 hex characters). |
| accountId | string | The ID of the account to which it belongs. |
| channel | string | The channel (e.g. backoffice). May be deprecated in favour of channels array. |
| channels | array of string | List of channels. |
| currency | string | The currency ISO code (e.g. CAD, EUR, USD). |
| productId | string | The product id. |
| operatingCompanyId | string | The operating company id. |
| originId | string | Origin station id. |
| destinationId | string | Destination station id. |
| onewayPriceModifier | object | Price modifier for one-way (type: $ or %, value). |
| returnPriceModifier | object | Price modifier for return (type, value). |
| openReturnPriceModifier | object | Price modifier for open return (type, value). |
| sameDayRoundtripPriceModifier | object | Price modifier for same-day roundtrip (type, value). |
| loyaltyRedeemRatio | number | Loyalty redeem ratio. |
| loyaltyAccumulateRatio | number | Loyalty accumulate ratio. |
| weight | number | The assigned weight for rule ordering. |
| disabled | boolean | If true, this modifier will not be applied to new purchases. |
| deleted | boolean | If true, this modifier is marked as deleted. |
| createdBy | string | The user that created this resource. |
| updatedBy | string | The last user that updated this resource. |
| createdAt | object | The date the object was created (BzDate: offset, value). |
| updatedAt | object | The date the object was last updated (BzDate: offset, value). |
Other fields may be present as defined in the Inventory API MarketplaceModifier schema (e.g. brandIds, fareIds, routeIds, scheduleId, shiftZones, price, regularPrice, sell/trip date ranges, oAndDs).
Field descriptions – data (deleted)
| Field | Type | Description |
|---|---|---|
| marketplaceModifierId | string | Id of the deleted marketplace modifier (24 hex characters). |