Customer created
| Event Group | Event Identification |
|---|---|
| customers | customers/create |
Occurs whenever a customer is created.
Request Headers
- Content-Type string requiredThe field must be set to the fixed value
application/json; charset=utf-8. - 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 booleanWhether the customer accepts subscribing to marketing information via email.
true: Acceptsfalse: Does not accept
DEPRECATEDThis parameter is deprecated from API version v20250601. - accepts_marketing_updated_at stringThe date and time when the customer's subscription status for email marketing was last updated. Format: ISO 8601.DEPRECATEDThis parameter is deprecated from API version v20250601.Example:
2022-12-16T11:06:11+08:00 - accepts_mobile_marketing booleanWhether the customer accepts subscribing to marketing information via SMS.
true: Acceptsfalse: Does not accept
DEPRECATEDThis parameter is deprecated from API version v20250601. - accepts_mobile_marketing_updated_at stringThe date and time when the customer's subscription status for SMS marketing was last updated. Format: ISO 8601.DEPRECATEDThis parameter is deprecated from API version v20250601.Example:
2022-12-16T11:06:11+08:00 addressesobject[]
A list of customer addresses.address1 stringThe first line of the address. This typically includes information such as the street address or a post office box number.Example:7720 Cherokee Roadaddress2 stringThe second line of the address. This typically includes information such as apartment, suite, or unit number.Example:Apartment 2city stringThe city in the address.Example:Hagermancompany stringThe customer's company.country stringThe country or region in the address.Example:United Statescountry_code stringA two-letter country or region code that follows the ISO 3166-1 (alpha 2) standard, used to identify a specific country or region in the address.Example:UScustomer_id stringThe unique identifier for the customer.Example:2007347234default booleanWhether the address is set as the default address.true: Set as the default address.false: Not set as the default address.
first_name stringThe customer's first name.Example:Bobid stringThe unique identifier for the address.Example:SL201UA4840334721187149827last_name stringThe customer's last name.Example:Jamesphone stringThe customer's mobile phone number.Example:008613987985473province stringThe province or state in the address.Example:Kentuckyprovince_code stringThe code for the province or state, represented by a custom code or the portion after the hyphen (-) in the ISO 3166-2 code. For example,RIinUS-RIorENGinGB-ENG.zip stringThe postal code information of the address.Example:40202- asid stringThe unique app-scoped user identifier provided after the customer logs in via Facebook.
attributesobject[]
Additional customer information (formatted as key-value pairs) collected during registration.key stringThe key or name of the attribute.Example:plugin.membership.invite_codevalue stringThe value of the attribute.Example:WELCOME- birthday stringThe customer's birthday. Format:
yyyyMMdd.Example:20210831 - created_at stringThe date and time when the customer was created. Format: ISO 8601.Example:
2022-12-16T11:06:11+08:00 - currency stringThe currency used by the customer to place an order. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard.Example:
USD default_addressobject
The default address.address1 stringThe first line of the address. This typically includes information such as the street address or a post office box number.Example:7720 Cherokee Roadaddress2 stringThe second line of the address. This typically includes information such as apartment, suite, or unit number.Example:Apartment 2city stringThe city in the address.Example:Hagermancompany stringThe company name.Example:Joycountry stringThe country or region in the address.Example:United Statescountry_code stringA two-letter country or region code that follows the ISO 3166-1 (alpha 2) standard, used to identify a specific country or region in the address.Example:UScustomer_id stringThe unique identifier for the customer.Example:2007347234default booleanWhether the address is set as the default address.true: Set as the default address.false: Not set as the default address.
first_name stringThe customer's first name.Example:Bobid stringThe unique identifier for the address.Example:SL201UA4840334721187149827last_name stringThe customer's last name.Example:Jamesphone stringThe customer's mobile phone number.Example:008613977865436province stringThe province or state in the address.Example:Kentuckyprovince_code stringThe code for the province or state, represented by a custom code or the portion after the hyphen (-) in the ISO 3166-2 code. For example,RIinUS-RIorENGinGB-ENG.zip stringThe postal code information of the address.Example:40202- email stringThe customer's email address.Example:
steve@example.com email_marketing_consentobject
The information about the email marketing subscription.consent_collected_from stringThe source of the subscription information.Example:extInfoconsent_updated_at stringThe date and time when the subscription status was updated. Format: ISO 8601.Example:2021-08-31T02:20:26+08:00opt_in_level integerThe subscription method. Valid values are:0: Unknown1: Single opt-in2: Confirmed opt-in
The default value depends on whether Email marketing consent checkbox is preselected is enabled under Settings > Customer Account > Marketing options in the SHOPLINE Admin.- Enabled: The default value is
2. - Disabled: The default value is
1.
state integerEmail subscription status. Valid values are:0: Unsubscribed1: Subscribed2: Not subscribed
- email_subscribe_flag integerThe final subscription status of email marketing. The value is determined based on the parameters within
email_marketing_consent. Valid values are:0: Unsubscribed1: Subscribed2: Not subscribed
- first_name stringThe customer's first name.Example:
Bob - gender stringThe customer's gender. Valid values are:
0: Unknown1: Male2: Female3: Secret
- id stringThe customer's unique ID .Example:
2007347234 - language stringThe customer's language.Example:
en - last_name stringThe customer's last name.Example:
James - last_order_id stringThe order number of the most recent order.DEPRECATEDThis parameter is deprecated from API version v20250601.Example:
200066283289389 - mobile_subscribe_flag integerThe final subscription status of SMS marketing. The value is determined based on the parameters within
sms_marketing_consent. Valid values are:0: Unsubscribed1: Subscribed2: Not subscribed
- multipass_identifier stringA unique identifier for the customer that logs in with Multipass.Example:
extInfo - nick_name stringThe customer's nickname.Example:
Bob James - note stringThe merchant's notes on the customer.
- orders_count longThe number of orders.DEPRECATEDThis parameter is deprecated from API version v20250601.
- phone stringThe customer's mobile phone number.Example:
008613987675435 sms_marketing_consentobject
The information about the SMS marketing subscription.consent_collected_from stringThe source of the subscription information.Example:extInfoconsent_updated_at stringThe date and time when the subscription status was updated. Format: ISO 8601.Example:2022-12-16T11:06:11+08:00opt_in_level integerThe subscription method. Valid values are:0: Unknown1: Single opt-in2: Confirmed opt-in
state integerSMS subscription status. Valid values are:0: Unsubscribed1: Subscribed2: Not subscribed
- social_customer stringThe customer's unique ID on social media.DEPRECATEDThis parameter is deprecated from API version v20250601.Example:
7566553464365 - state stringThe customer's status. Valid values are:
0: Blacklisted1: Not invited2: Invited3: Registered
- tags stringThe tags to be added to the customer, with multiple tags separated by commas.
- total_spent stringTotal cost amount.DEPRECATEDThis parameter is deprecated from API version v20250601.
- updated_at stringThe date and time when the customer was updated. Format: ISO 8601.Example:
2022-09-07T10:53:31+08:00 - verified_email booleanWhether the email has been verified.
true: Verifiedfalse: Unverified
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?