Marketplace Subscriptions
Authorization (HMAC)
To verify that the payloads your webhooks receive actually come from us, we require that you implement HMAC authentication schema.
HMAC constructs an information-rich header that contains information about the sender, while providing security to ensure that the request has not been forged or tampered with in transit.
For more information read here
Available Subscriptions
- 3rd party app uninstalled
- 3rd party app installation requested
- 3rd party app installation request cancelled
- 3rd party app installation validation requested
- 3rd party app installed domains updated
3rd party app uninstalled
This event is triggered when any 3rd party app has been uninstalled.
{
"event": {
"name": "marketplace.Location.deleted",
"component": "marketplace",
"resource": "Location",
"action": "deleted",
"version": "v1",
"subscriptionId": 1,
"dispatchedAt": "2019-10-15T17:00:00.000Z"
},
"payload": {
"locationId": 1
}
}
Payload:
| Name | Type | Description |
|---|---|---|
| locationId* | integer | The Customer Hub location ID |
Response:
A successful response is accepted, e.g.: 2xx
3rd party app installation requested
This event is triggered when an installation for a 3rd party app has been requested.
{
"event": {
"name": "marketplace.InstallationRequest.created",
"component": "marketplace",
"resource": "InstallationRequest",
"action": "created",
"version": "v1",
"subscriptionId": 1,
"dispatchedAt": "2019-10-15T17:00:00.000Z"
},
"payload": {
"locationId": 1,
"guid": "07a3a97e-6154-4e18-97a0-4b59cdd79007",
"activeDomains": ["ONLINE_STORE"]
}
}
Payload:
| Name | Type | Description |
|---|---|---|
| locationId* | integer | The Customer Hub location ID |
| guid* | string | Installation request GUID |
| activeDomains | string[] | Subset of the app's supported domains requested for activation. |
Response:
A successful response is accepted, e.g.: 2xx
3rd party app installation request cancelled
This event is triggered when any 3rd party app installation request has been cancelled before installation is complete.
{
"event": {
"name": "marketplace.InstallationRequest.cancelled",
"component": "marketplace",
"resource": "InstallationRequest",
"action": "cancelled",
"version": "v1",
"subscriptionId": 1,
"dispatchedAt": "2019-10-15T17:00:00.000Z"
},
"payload": {
"locationId": 1,
"guid": "07a3a97e-6154-4e18-97a0-4b59cdd79007"
}
}
Payload:
| Name | Type | Description |
|---|---|---|
| locationId* | integer | The Customer Hub location ID |
| guid* | string | Installation request GUID |
Response:
A successful response is accepted, e.g.: 2xx
3rd party app installation validation requested
This event is triggered when an installation for a 3rd party app has been requested and needs additional validation.
{
"event": {
"name": "marketplace.InstallationValidation.created",
"component": "marketplace",
"resource": "InstallationValidation",
"action": "created",
"version": "v1",
"subscriptionId": 1,
"dispatchedAt": "2019-10-15T17:00:00.000Z"
},
"payload": {
"locationId": 1,
"countryCode": "US",
"installationRequest": { ... }
}
}
Payload:
| Name | Type | Description |
|---|---|---|
| locationId* | integer | The Customer Hub location ID |
| countryCode* | string | ISO 3166-1 alpha-2 country code of the location |
Additional fields match the ones provided during app installation.
Response:
A successful response is accepted: 200 or 204
To reject the installation, return a non-2xx status code. The details field from the response body will be passed back to the caller as error details, if provided.
Subscriber rejection response body:
{
...
"details": [
{ "property": "propertyValue", "message": "..." }
]
}
Each item in details:
| Name | Type | Description |
|---|---|---|
| property | string | The property that failed validation |
| message | string | Human-readable description of the validation failure |
Caller error response:
{
"status": 400,
"timestamp": "2019-10-15T17:00:00.000Z",
"message": "Installation payload validation failed",
"details": [
{ "property": "propertyValue", "message": "..." }
]
}
3rd party app installed domains updated
This event is triggered when the set of active domains for an installed app at a location changes.
{
"event": {
"name": "marketplace.AppInstalledDomains.updated",
"component": "marketplace",
"resource": "AppInstalledDomains",
"action": "updated",
"version": "v1",
"subscriptionId": 1,
"dispatchedAt": "2019-10-15T17:00:00.000Z"
},
"payload": {
"locationId": 1,
"domains": {
"ONLINE_STORE": "ACTIVE",
"LOYALTY": "INACTIVE"
}
}
}
Payload:
| Name | Type | Description |
|---|---|---|
| locationId* | integer | The Customer Hub location ID |
| domains* | object | Map of domain name to its status ("ACTIVE" or "INACTIVE") |
Response:
A successful response is accepted, e.g.: 2xx