Customer subscription
| Event Group | Event Identification |
|---|---|
| customers_marketing_consent | customers_marketing_consent/update |
Customer subscription
Request Headers
- X-Shopline-Topic string requiredThe unique identifier for the event.Example:
orders/edited - X-Shopline-Hmac-Sha256 string requiredThe signature of the request. Upon receiving the request, you must verify the signature to confirm the authenticity and integrity of the data.Example:
XWmrwMey6OsLMeiZKwP4FppHH3cmAiiJJAweH5Jo4bM= - X-Shopline-Shop-Domain string requiredThe store domain.Example:
example.myshopline.com - X-Shopline-Shop-Id string requiredThe store ID.Example:
1610418123456 - X-Shopline-Merchant-Id string requiredThe merchant ID.Example:
2000001234 - X-Shopline-API-Version string requiredThe API version.Example:
v20250601 - X-Shopline-Webhook-Id string requiredThe ID of this Webhook event.Example:
b54557e48a5fbf7d70bcd043
Request Body
- accepts_marketing booleanSubscription mail or notExample:
true - accepts_marketing_updated_at stringMailbox subscription timeExample:
2022-12-16T11:06:11+08:00 - accepts_mobile_marketing booleanAccept telemarketing or notExample:
true - accepts_mobile_marketing_updated_at stringTelephone subscription time (see IOS8601 for the format)Example:
2022-12-16T11:06:11+08:00 addressesobject[]
Address information listaddress1 stringAddress 1Example:7720 Cherokee Roadaddress2 stringAddress 2Example:22 Streetcity stringCityExample:Hagermancompany stringCompanyExample:Joycountry stringCountryExample:United Statescountry_code stringCountry codeExample:UScustomer_id stringCustomer idExample:2004324532default booleanDefault address or notExample:truefirst_name stringNameExample:wudeid stringAddress IDExample:SL201342344234525last_name stringLast nameExample:Jamesphone stringPhone numberExample:008615098695473province stringProvinceExample:Kentuckyprovince_code stringProvincial encodingExample:KYzip stringZip codeExample:40202- asid stringFB login IDExample:
456542342 - birthday stringCustomer birthday Format: YYYYMMDDExample:
19930426 - created_at stringCreation timeExample:
2022-12-16T11:06:11+08:00 - currency stringCurrencyExample:
CNY default_addressobject
Default addressaddress1 stringAddress 1Example:7720 Cherokee Roadaddress2 stringAddress 2Example:22 Streetcity stringCityExample:Hagermancompany stringCompanyExample:Joycountry stringCountryExample:United Statescountry_code stringCountry codeExample:UScustomer_id stringCustomer idExample:20024344default booleanDefault address or notExample:truefirst_name stringNameExample:Bobid stringAddress IDExample:SL201UA5006511321220969539last_name stringLast nameExample:Jamesphone stringPhone numberExample:008613923874352province stringProvinceExample:Kentuckyprovince_code stringProvincial encodingExample:KYzip stringZip codeExample:40202- email stringMailboxExample:
gungcherny@gamil.com email_marketing_consentobject
E-mail marketing subscription informationconsent_collected_from stringSubscription information sourceExample:consent_collected_fromconsent_updated_at stringSubscription change timeExample:2022-12-16T11:06:11+08:00opt_in_level integerSubscription method ( 0 : unknown ; 1 : single_opt_in ; 2 : confirmed_opt_in )Example:1state integerSubscription status ( 0 : cancelled subscription ; 1 : on subscription ; 2 : not on subscription ; 3 : on-subscription confirmation )Example:1- email_subscribe_flag integerMailbox subscription status 0 : cancelled subscription , 1 : already available , 2 : not availableExample:
1 - first_name stringNameExample:
wude - gender stringGender : male / female / others/secretExample:
male - id stringCustomer idExample:
2003242345 - language stringCustomer languageExample:
en - last_name stringLast nameExample:
James - last_order_id stringRecent order numberExample:
2007732692139103132 - mobile_subscribe_flag integerMobile phone subscription status 0 : cancelled subscription , 1 : already available , 2 : not availableExample:
1 - multipass_identifier stringMultipass logoExample:
multipass_identifier - nick_name stringUser nicknameExample:
Bob James - note stringNotesExample:
high spent customer - orders_count longOrder quantityExample:
4 - phone stringPhone numberExample:
008615087594362 sms_marketing_consentobject
Sms marketing subscription informationconsent_collected_from stringSubscription information sourceExample:consent_collected_fromconsent_updated_at stringSubscription change timeExample:2022-12-16T11:06:11+08:00opt_in_level integerSubscription method ( 0 : unknown ; 1 : single_opt_in ; 2 : confirmed_opt_in )Example:1state integerSubscription status ( 0 : cancelled subscription ; 1 : on subscription ; 2 : not availableExample:1- social_customer stringSocial media user IDExample:
62384242394395 - state stringCustomer status [ 0 : disabled account , 1 : to enable account , 2 : invited account , 3 : valid account ]Example:
2 - subscribeActionType integerSubscription behavior 1 , mailbox subscription ; 2 , sms subscription ; 3 , cancelled mailbox subscription ; 4 , cancelled text message subscriptionExample:
1 - tags stringCustomer tagExample:
test - total_spent stringTotal cost amountExample:
3243 - updated_at stringUpdate timeExample:
2022-12-16T11:06:11+08:00 - verified_email booleanVerify if e-mail or notExample:
true
Status Codes
After receiving a webhook notification from SHOPLINE, you must respond with the following format:
HTTP/1.1 200 OKFor more information about how to subscribe to webhooks and webhook response rules, refer to Webhook overview.
Was this article helpful to you?