# Syncing subscription statuses

edrone offers a mechanism to notify the e-commerce platform that a customer subscription status has been changed. The eCommerce platform needs to provide an HTTPS endpoint that will be automatically called upon subscription status change.

Example https://www.a_shop.com/update_subscriber_status

The following fields are sent (POST) to the eCommerce platform.

# NATIVE_5 (introduces SMS subscription status synchronization)

Parameter name Description
subscription_status_type_id Indicates which subscription status type has been changed
  • 1 - EMAIL
  • 2 - SMS
email Customer email address
phone Customer phone
subscriber_status Email/phone subscription status:
  • 0 - unsubscribed
  • 1 - subscribed
  • empty - information not available
subscription_status_reason Subscription status reason for:
  • EMAIL - https://edrone.me/pl/docs/#subscription-status-reason
  • SMS - https://edrone.me/pl/docs/#sms-subscription-status-reason
event_date UTC date when the customer subscription status was changed.
event_id Unique event identifier
app_id Unique shop identifier - available in Mission Control (Settings > Integration)
signature HMAC that can be used by the eCommerce platform to verify that the request is authentic. It uses a secret (app_secret) that is available in Mission Control (Settings > Integration)

Example (PHP)
$hash=hash("sha256",($subscription_status_type_id == 1? $email : $phone).$subscribeStatus.$subscriptionStatusReason.$eventDate.$eventId.$secret.$appId, false);
$signature = base64_encode($hash);

# NATIVE_4 (current)

Parameter name Description
email Customer email address
subscriber_status Email subscription status:
  • 0 - unsubscribed
  • 1 - subscribed
  • empty - information not available
subscription_status_reason Subscription status reason: https://edrone.me/pl/docs/#subscription-status-reason
event_date UTC date when the customer subscription status was changed.
event_id Unique event identifier
app_id Unique shop identifier - available in Mission Control (Settings > Integration)
signature HMAC that can be used by ecommerce platform to verify that the request is authentic. It uses a secret (app_secret) that is available in Mission Control (Settings > Integration)

Example (PHP)
$hash=hash("sha256",$email.$subscribeStatus.$subscriptionStatusReason.$eventDate.$eventId.$secret.$appId, false);
$signature = base64_encode($hash);

# NATIVE_3 (deprecated)

Parameter name Description
email Customer email address
subscriber_status Email subscription status:
  • 0 - unsubscribed
  • 1 - subscribed
  • empty - information not available
event_date UTC date when the customer subscription status was changed.
event_id Unique event identifier
app_id Unique shop identifier - available in Mission Control (Settings > Integration)
signature HMAC that can be used by ecommerce platform to verify that the request is authentic. It uses a secret (app_secret) that is available in Mission Control (Settings > Integration)

Example (PHP)
$hash=hash("sha256",$email.$subscribeStatus.$eventDate.$eventId.$secret.$appId, false);
$signature = base64_encode($hash);

# NATIVE_2 (deprecated)

Parameter name Description
email Customer email address
subscriber_status Email subscription status:
  • 0 - unsubscribed
  • 1 - subscribed
  • empty - information not available
event_date UTC date when the customer subscription status was changed.
event_id Unique event identifier
signature HMAC that can be used by ecommerce platform to verify that the request is authentic. It uses a secret (app_secret) that is available in Mission Control (Settings > Integration)

Example (PHP)
$hash=hash("sha256",$email.$subscribeStatus.$eventDate.$eventId.$secret, false);
$signature = base64_encode($hash);

# NATIVE_1 (deprecated)

Parameter name Description
email Customer email address
signature HMAC that can be used by ecommerce platform to verify that the request is authentic. It uses a secret (app_secret) that is available in Mission Control (Settings > Integration)

Example (PHP)
$hash=hash("sha256",$email.$secret, false);
$signature = base64_encode($hash);

# When is webhook invoked?

  • We can send notification on every subscription status change. This can be configured in Mission Control.
  • Currently we do not invoke the webhook when customers are manually imported via CSV file

To add subscription status endpoint, login to your Mission Control Panel then go to Settings and Platforms.