About Customer ​
Access scope
Multiple access scopes needed — refer to each endpoint for access scope requirements.
The customer module helps merchants maintain and analyze customer relationships. Genstore provides RESTful interfaces for managing online store customer information. Through these interfaces, merchants can efficiently handle customer information, including contact details, order history, and email marketing preferences.
Core Features
- Create Customer: Create new customer records.
- Delete Customer: Remove existing customer records.
- Query Customer: Retrieve specific customer details.
- List Customers: Get a list of store customers.
TIP
Before using the Customer APIs, please ensure your account has sufficient permissions to perform interface operations.
Use Cases
- Customer Profile Sync: CRM systems can sync customer data changes in real-time using the query interface.
- Marketing Segmentation: Marketing platforms can create targeted campaigns using customer attributes from the list interface.
Endpoints
EVENT customers/merge: Customer Merge
EVENT customers/update: Customer Update
EVENT customers/delete: Customer Delete
EVENT customers/create: Customer created
Customer Object ​
Create and manage customers.
Properties ​
{
"customer": {
"lastName": "li",
"addresses": [
{
"zip": "23456",
"firstName": "heihei",
"lastName": "du",
"address2": "上海闵行",
"city": "上海",
"phone": "2345653464",
"address1": "上海嘉定",
"countryCode": "CN",
"provinceCode": "SH",
"company": "公司地址",
"isDefaultAddress": "false",
"id": "879"
}
],
"notes": "this is new customer",
"totalSpent": "13",
"taxExempt": "true",
"taxExemptions": {
"applyToAllRegion": "true",
"taxExemptionRegions": [
{
"country": "US",
"applyToAllSubdivision": "false",
"subdivisions": "["NYC"]"
}
]
},
"updateTime": "2024-18-12T08:18:49",
"smsMarketingConsent": {
"state": "SUBSCRIBED",
"consentUpdateTime": "2024-11-12T08:18:49.125"
},
"tags": "[ "xinsheng", "human" ]",
"emailMarketingConsent": {
"state": "SUBSCRIBED",
"consentUpdateTime": "2024-11-12T08:18:49.125"
},
"firstName": "test23",
"ordersCount": "2",
"createTime": "2024-18-12T08:18:49",
"phone": "13315034487",
"id": "1020000013062",
"state": "DECLINED",
"email": "1731399528@qq.com",
"verifiedEmail": "true",
"defaultAddress": {
"zip": "20000",
"firstName": "heihei",
"lastName": "chen",
"address2": "cao he jing",
"city": "shanghai",
"phone": "13315035578",
"address1": "xu hui",
"countryCode": "CN",
"provinceCode": "FJ",
"company": "demo",
"isDefaultAddress": "true",
"id": "878"
}
}
}
EVENT Customer Merge ​
This webhook is triggered whenever a customer account is merged.
Access scope
Requires ANY of the following access scopes: write_customers read_customers
Topic
EVENT customers/merge
Event Data
* COMPLETED - Customer merge request completed;
* FAILED - Customer merge failed;
* IN_PROGRESS - Customer merge request is currently in progress;
* REQUESTED - Customer merge requested.
{
"jobId": "123456789",
"customerDeletedId": "111222333",
"customerKeptId": "987654321",
"errorFields": [
{
"field": "deletedAt",
"message": "The customer does not exist."
}
],
"status": "COMPLETED"
}
EVENT Customer Update ​
This webhook is triggered whenever a customer account is updated.
Access scope
Requires ANY of the following access scopes: write_customers read_customers
Topic
EVENT customers/update
Event Data
{
"customer": {
"lastName": "li",
"addresses": [
{
"zip": "23456",
"firstName": "heihei",
"lastName": "du",
"address2": "cao he jing",
"city": "shanghai",
"phone": "+14255550100",
"address1": "xu hui",
"countryCode": "CN",
"provinceCode": "SH",
"company": "demo",
"isDefaultAddress": "false",
"id": "879"
}
],
"notes": "this is new customer",
"totalSpent": "13.10",
"taxExempt": "true",
"taxExemptions": {
"applyToAllRegion": "true",
"taxExemptionRegions": [
{
"country": "US",
"applyToAllSubdivision": "false",
"subdivisions": [
"NYC"
]
}
]
},
"updateTime": "2024-11-12T08:18:49.125Z",
"smsMarketingConsent": {
"state": "SUBSCRIBED",
"consentUpdateTime": "2024-11-12T08:18:49.125Z"
},
"tags": [
"xinsheng",
"human"
],
"emailMarketingConsent": {
"state": "SUBSCRIBED",
"consentUpdateTime": "2024-11-12T08:18:49.125Z"
},
"firstName": "test23",
"ordersCount": "2",
"createTime": "2024-11-12T08:18:49.125Z",
"phone": "+14255550100",
"id": "1020000013062",
"state": "DECLINED",
"email": "1731399528@qq.com",
"verifiedEmail": "true",
"defaultAddress": {
"zip": "20000",
"firstName": "heihei",
"lastName": "chen",
"address2": "cao he jing",
"city": "shanghai",
"phone": "+14255550100",
"address1": "xu hui",
"countryCode": "CN",
"provinceCode": "FJ",
"company": "demo",
"isDefaultAddress": "true",
"id": "878"
}
}
}
EVENT Customer Delete ​
This webhook is triggered whenever a customer account is deleted.
Access scope
Requires ANY of the following access scopes: write_customers read_customers
Topic
EVENT customers/delete
Event Data
{
"customer": {
"firstName": "test23",
"lastName": "li",
"createTime": "2024-11-12T08:18:49.125Z",
"phone": "+14255550100",
"updateTime": "2024-11-13T08:18:49.125Z",
"id": "1020000013062",
"email": "1731399528@qq.com"
}
}
EVENT Customer created ​
This webhook is triggered whenever a new customer account is created.
Access scope
Requires ANY of the following access scopes: write_customers read_customers
Topic
EVENT customers/create
Event Data
{
"customer": {
"lastName": "li",
"addresses": [
{
"zip": "23456",
"firstName": "heihei",
"lastName": "du",
"address2": "cao he jing",
"city": "shanghai",
"phone": "+14255550100",
"address1": "xu hui",
"countryCode": "CN",
"provinceCode": "SH",
"company": "demo",
"isDefaultAddress": "false",
"id": "879"
}
],
"notes": "this is new customer",
"totalSpent": "13.10",
"taxExempt": "true",
"taxExemptions": {
"applyToAllRegion": "true",
"taxExemptionRegions": [
{
"country": "US",
"applyToAllSubdivision": "false",
"subdivisions": [
"NYC"
]
}
]
},
"updateTime": "2024-11-12T08:18:49.125Z",
"smsMarketingConsent": {
"state": "SUBSCRIBED",
"consentUpdateTime": "2024-11-12T08:18:49.125Z"
},
"tags": [
"xinsheng",
"human"
],
"emailMarketingConsent": {
"state": "SUBSCRIBED",
"consentUpdateTime": "2024-11-12T08:18:49.125Z"
},
"firstName": "test23",
"ordersCount": "2",
"createTime": "2024-11-12T08:18:49.125Z",
"phone": "+14255550100",
"id": "1020000013062",
"state": "DECLINED",
"email": "1731399528@qq.com",
"verifiedEmail": "true",
"defaultAddress": {
"zip": "20000",
"firstName": "heihei",
"lastName": "chen",
"address2": "cao he jing",
"city": "shanghai",
"phone": "+14255550100",
"address1": "xu hui",
"countryCode": "CN",
"provinceCode": "FJ",
"company": "demo",
"isDefaultAddress": "true",
"id": "878"
}
}
}
About Customer
Access scope
Multiple access scopes needed — refer to each endpoint for access scope requirements.
The customer module helps merchants maintain and analyze customer relationships. Genstore provides RESTful interfaces for managing online store customer information. Through these interfaces, merchants can efficiently handle customer information, including contact details, order history, and email marketing preferences.
Core Features
- Create Customer: Create new customer records.
- Delete Customer: Remove existing customer records.
- Query Customer: Retrieve specific customer details.
- List Customers: Get a list of store customers.
TIP
Before using the Customer APIs, please ensure your account has sufficient permissions to perform interface operations.
Use Cases
- Customer Profile Sync: CRM systems can sync customer data changes in real-time using the query interface.
- Marketing Segmentation: Marketing platforms can create targeted campaigns using customer attributes from the list interface.
Customer Object
Create and manage customers.
Properties
EVENT Customer Merge
This webhook is triggered whenever a customer account is merged.
Access scope
Requires ANY of the following access scopes: write_customers read_customers
Topic
EVENT customers/merge
EVENT Customer Update
This webhook is triggered whenever a customer account is updated.
Access scope
Requires ANY of the following access scopes: write_customers read_customers
Topic
EVENT customers/update
EVENT Customer Delete
This webhook is triggered whenever a customer account is deleted.
Access scope
Requires ANY of the following access scopes: write_customers read_customers
Topic
EVENT customers/delete
EVENT Customer created
This webhook is triggered whenever a new customer account is created.
Access scope
Requires ANY of the following access scopes: write_customers read_customers
Topic
EVENT customers/create