Customers
Scope: visitor
and above
This endpoint retrieves customer details and implements pagination using a cursor-based approach.
You can optionally include a timestamp parameter to filter the results based on customer records updated after the provided timestamp. If no timestamp is provided, all customer details are returned without any time-based filtering.
The endpoint supports cursor pagination, where a cursor value is included in the response to facilitate navigation through the results. The maximum number of records per page is limited to 100.
To retrieve the list of customers which have been changed after the timestamp (e.g. 2023-04-10T00:00:00)
Returns the customers that come after the specified cursor
An alias name that represents a particular brand that is using the API
GET /customers/search HTTP/1.1
Host:
Authorization: Basic username:password
X-DotApparel-Name: text
shop: text
Accept: */*
{
"data": [
{
"id": 65432,
"code": "SMITJOHN22",
"firstname": "John",
"surname": "Smith",
"startDate": "2021-03-25 00:00:00",
"updateTimeStamp": "2023-03-06 10:50:16",
"contact": {
"email": "[email protected]",
"phones": {
"home": "(03) 8375 9586",
"mobile": "(04) 8375 9586",
"work": "(03) 8375 9586"
}
},
"privacy": false,
"dateOfBirth": "",
"retailRep": "No",
"retailCust": "Yes",
"address": {
"addressLine1": "Level 5",
"addressLine2": "111 Cecil St",
"city": "South Melbourne",
"state": "VIC",
"postcode": "3205",
"country": "Australia"
},
"shopifyAdminId": "gid://shopify/Customer/6477890125896",
"shopifyLegacyId": "6477890125896",
"loyaltyCode": "99",
"loyaltyName": "Example loyalty",
"joinedStoreId": "4983",
"joinedStoreCode": "Doncaster",
"attributes": [
{
"key": "foo",
"value": "bar"
}
]
}
],
"meta": {
"hasNextPage": true,
"endCursor": "string"
}
}
Scope: visitor
and above
This endpoint retrieves customer details by accepting a parameter of either a valid email address or a specific timestamp.
If an email address is provided, the endpoint checks that the email address is valid and associated with an existing customer record, and returns the person records that match the email entered.
If a specific timestamp is provided, the endpoint checks that the timestamp is valid and no more than 7 days ago, and returns a list of person records that have been updated after the timestamp. It is important to be aware that this parameter requires the Apparel21 Retail API version 2022.1 or a more recent version.
The email address of the customer
To retrieve the list of customers which have been changed after the timestamp (e.g. 2023-04-10T00:00:00)
An alias name that represents a particular brand that is using the API
GET /customers HTTP/1.1
Host:
Authorization: Basic username:password
X-DotApparel-Name: text
shop: text
Accept: */*
{
"data": [
{
"id": 65432,
"code": "SMITJOHN22",
"firstname": "John",
"surname": "Smith",
"title": "MR",
"initials": "JJ",
"sex": "M",
"jobTitle": "Office Admin",
"startDate": "2021-03-25 00:00:00",
"updateTimeStamp": "2023-03-06 10:50:16",
"references": [
{
"type": "foo",
"value": "bar"
}
],
"isAgent": false,
"currency": {
"code": "AUD",
"format": "#,##0.00 'Aud'"
},
"loyalties": [
{
"id": 1022,
"loyaltyTypeId": 1022,
"loyaltyType": "VIP Gold loyalty",
"cardNo": "LM12345678",
"expiry": "2015-10-29",
"balance": 100,
"creditStatus": "1321",
"message": "Example message",
"joinDate": "2014-10-01",
"statusId": "1234"
}
],
"rewardsAccounts": [
{
"id": 1234,
"programId": 1,
"programName": "Loyalty Rewards",
"tierId": 2,
"tierName": "Tier 2"
}
],
"contact": {
"email": "[email protected]",
"phones": {
"home": "(03) 8375 9586",
"mobile": "(04) 8375 9586",
"work": "(03) 8375 9586"
}
},
"privacy": false,
"addresses": [
{
"billing": {
"contactName": "DotApparel",
"companyName": "DotApparel",
"addressLine1": "Level 5",
"addressLine2": "111 Cecil St",
"city": "South Melbourne",
"state": "VIC",
"postcode": "3205",
"country": "Australia"
},
"delivery": {
"contactName": "DotApparel",
"companyName": "DotApparel",
"addressLine1": "Level 5",
"addressLine2": "111 Cecil St",
"city": "South Melbourne",
"state": "VIC",
"postcode": "3205",
"country": "Australia"
}
}
],
"dateOfBirth": "",
"shopifyAdminId": "gid://shopify/Customer/6477890125896",
"shopifyLegacyId": "6477890125896"
}
]
}
Scope: visitor
and above
This endpoint retrieves customer details by an associated Apparel21 Person ID.
The endpoint checks that the email address is valid and associated with an existing customer record. If the ID is valid, the endpoint retrieves the customer's record and returns a success message with a JSON object containing their information.
The Apparel21 Person ID
An alias name that represents a particular brand that is using the API
GET /customers/{ap21_person_id} HTTP/1.1
Host:
Authorization: Basic username:password
X-DotApparel-Name: text
shop: text
Accept: */*
{
"data": {
"id": 65432,
"code": "SMITJOHN22",
"shopifyAdminId": "gid://shopify/Customer/6477890125896",
"shopifyLegacyId": "6477890125896",
"firstname": "John",
"surname": "Smith",
"title": "MR",
"initials": "JJ",
"sex": "M",
"jobTitle": "Office Admin",
"startDate": "2021-03-25 00:00:00",
"updateTimeStamp": "2023-03-06 10:50:16",
"references": [
{
"type": "foo",
"value": "bar"
}
],
"isAgent": false,
"currency": {
"code": "AUD",
"format": "#,##0.00 'Aud'"
},
"loyalties": [
{
"id": 1022,
"loyaltyTypeId": 1022,
"loyaltyType": "VIP Gold loyalty",
"cardNo": "LM12345678",
"expiry": "2015-10-29",
"balance": 100,
"creditStatus": "1321",
"message": "Example message",
"joinDate": "2014-10-01",
"statusId": "1234"
}
],
"rewardsAccounts": [
{
"id": 1234,
"programId": 1,
"programName": "Loyalty Rewards",
"tierId": 2,
"tierName": "Tier 2"
}
],
"contact": {
"email": "[email protected]",
"phones": {
"home": "(03) 8375 9586",
"mobile": "(04) 8375 9586",
"work": "(03) 8375 9586"
}
},
"privacy": false,
"addresses": [
{
"billing": {
"contactName": "DotApparel",
"companyName": "DotApparel",
"addressLine1": "Level 5",
"addressLine2": "111 Cecil St",
"city": "South Melbourne",
"state": "VIC",
"postcode": "3205",
"country": "Australia"
},
"delivery": {
"contactName": "DotApparel",
"companyName": "DotApparel",
"addressLine1": "Level 5",
"addressLine2": "111 Cecil St",
"city": "South Melbourne",
"state": "VIC",
"postcode": "3205",
"country": "Australia"
}
}
],
"dateOfBirth": ""
}
}
Scope: maintainer
and above
This endpoint creates new customers by accepting required information including first name, last name, and unique email address, as well as optional contact number and address.
The endpoint checks that all required fields are present and that the email is not already associated with an existing customer. If the required information is valid, the endpoint creates a new customer record and returns a success message with a JSON object containing the new customer's ID and their information.
NOTE: The endpoint accepts boolean
fields emailSubscription
and smsSubscription
. If either of these fields is set to true
, it will automatically override the privacy
field to false
. Both of these fields can modify customer references in Apparel21. However, this process requires mapping configuration within DotApparel Core. If you require assistance with this configuration, please reach out to [email protected]
An alias name that represents a particular brand that is using the API
John
Smith
The field will be set to false if either emailSubscription or smsSubscription is true.
false
false
false
[email protected]
(04) 8375 9586
POST /customers HTTP/1.1
Host:
Authorization: Basic username:password
X-DotApparel-Name: text
shop: text
Content-Type: application/json
Accept: */*
Content-Length: 589
{
"firstname": "John",
"surname": "Smith",
"privacy": false,
"emailSubscription": false,
"smsSubscription": false,
"email": "[email protected]",
"mobile": "(04) 8375 9586",
"billingAddress": {
"contactName": "DotApparel",
"companyName": "DotApparel",
"addressLine1": "Level 5",
"addressLine2": "111 Cecil St",
"city": "South Melbourne",
"state": "VIC",
"postcode": "3205",
"country": "Australia"
},
"deliveryAddress": {
"contactName": "DotApparel",
"companyName": "DotApparel",
"addressLine1": "Level 5",
"addressLine2": "111 Cecil St",
"city": "South Melbourne",
"state": "VIC",
"postcode": "3205",
"country": "Australia"
},
"dateOfBirth": ""
}
{
"data": {
"id": 65432,
"code": "SMITJOHN22",
"shopifyAdminId": "gid://shopify/Customer/6477890125896",
"shopifyLegacyId": "6477890125896",
"firstname": "John",
"surname": "Smith",
"title": "MR",
"initials": "JJ",
"sex": "M",
"jobTitle": "Office Admin",
"startDate": "2021-03-25 00:00:00",
"updateTimeStamp": "2023-03-06 10:50:16",
"references": [
{
"type": "foo",
"value": "bar"
}
],
"isAgent": false,
"currency": {
"code": "AUD",
"format": "#,##0.00 'Aud'"
},
"loyalties": [
{
"id": 1022,
"loyaltyTypeId": 1022,
"loyaltyType": "VIP Gold loyalty",
"cardNo": "LM12345678",
"expiry": "2015-10-29",
"balance": 100,
"creditStatus": "1321",
"message": "Example message",
"joinDate": "2014-10-01",
"statusId": "1234"
}
],
"rewardsAccounts": [
{
"id": 1234,
"programId": 1,
"programName": "Loyalty Rewards",
"tierId": 2,
"tierName": "Tier 2"
}
],
"contact": {
"email": "[email protected]",
"phones": {
"home": "(03) 8375 9586",
"mobile": "(04) 8375 9586",
"work": "(03) 8375 9586"
}
},
"privacy": false,
"addresses": [
{
"billing": {
"contactName": "DotApparel",
"companyName": "DotApparel",
"addressLine1": "Level 5",
"addressLine2": "111 Cecil St",
"city": "South Melbourne",
"state": "VIC",
"postcode": "3205",
"country": "Australia"
},
"delivery": {
"contactName": "DotApparel",
"companyName": "DotApparel",
"addressLine1": "Level 5",
"addressLine2": "111 Cecil St",
"city": "South Melbourne",
"state": "VIC",
"postcode": "3205",
"country": "Australia"
}
}
],
"dateOfBirth": ""
}
}
Scope: maintainer
and above
This endpoint updates existing customers by accepting optional information including first name, last name, contact number, and address.
The endpoint checks that the first name and last name are not empty before updating the customer record. If the required information is valid, the endpoint updates the customer's record and returns a success message with a JSON object containing the customer's ID and their updated information.
NOTE: The endpoint accepts boolean
fields emailSubscription
and smsSubscription
. If either of these fields is set to true
, it will automatically override the privacy
field to false
. Both of these fields can modify customer references in Apparel21. However, this process requires mapping configuration within DotApparel Core. If you require assistance with this configuration, please reach out to [email protected]
The Apparel21 Person ID
An alias name that represents a particular brand that is using the API
John
Smith
The field will be set to false if either emailSubscription or smsSubscription is true.
false
false
false
[email protected]
(04) 8375 9586
PUT /customers/{ap21_person_id} HTTP/1.1
Host:
Authorization: Basic username:password
X-DotApparel-Name: text
shop: text
Content-Type: application/json
Accept: */*
Content-Length: 589
{
"firstname": "John",
"surname": "Smith",
"privacy": false,
"emailSubscription": false,
"smsSubscription": false,
"email": "[email protected]",
"mobile": "(04) 8375 9586",
"billingAddress": {
"contactName": "DotApparel",
"companyName": "DotApparel",
"addressLine1": "Level 5",
"addressLine2": "111 Cecil St",
"city": "South Melbourne",
"state": "VIC",
"postcode": "3205",
"country": "Australia"
},
"deliveryAddress": {
"contactName": "DotApparel",
"companyName": "DotApparel",
"addressLine1": "Level 5",
"addressLine2": "111 Cecil St",
"city": "South Melbourne",
"state": "VIC",
"postcode": "3205",
"country": "Australia"
},
"dateOfBirth": ""
}
{
"data": {
"id": 65432,
"code": "SMITJOHN22",
"shopifyAdminId": "gid://shopify/Customer/6477890125896",
"shopifyLegacyId": "6477890125896",
"firstname": "John",
"surname": "Smith",
"title": "MR",
"initials": "JJ",
"sex": "M",
"jobTitle": "Office Admin",
"startDate": "2021-03-25 00:00:00",
"updateTimeStamp": "2023-03-06 10:50:16",
"references": [
{
"type": "foo",
"value": "bar"
}
],
"isAgent": false,
"currency": {
"code": "AUD",
"format": "#,##0.00 'Aud'"
},
"loyalties": [
{
"id": 1022,
"loyaltyTypeId": 1022,
"loyaltyType": "VIP Gold loyalty",
"cardNo": "LM12345678",
"expiry": "2015-10-29",
"balance": 100,
"creditStatus": "1321",
"message": "Example message",
"joinDate": "2014-10-01",
"statusId": "1234"
}
],
"rewardsAccounts": [
{
"id": 1234,
"programId": 1,
"programName": "Loyalty Rewards",
"tierId": 2,
"tierName": "Tier 2"
}
],
"contact": {
"email": "[email protected]",
"phones": {
"home": "(03) 8375 9586",
"mobile": "(04) 8375 9586",
"work": "(03) 8375 9586"
}
},
"privacy": false,
"addresses": [
{
"billing": {
"contactName": "DotApparel",
"companyName": "DotApparel",
"addressLine1": "Level 5",
"addressLine2": "111 Cecil St",
"city": "South Melbourne",
"state": "VIC",
"postcode": "3205",
"country": "Australia"
},
"delivery": {
"contactName": "DotApparel",
"companyName": "DotApparel",
"addressLine1": "Level 5",
"addressLine2": "111 Cecil St",
"city": "South Melbourne",
"state": "VIC",
"postcode": "3205",
"country": "Australia"
}
}
],
"dateOfBirth": ""
}
}
Last updated
Was this helpful?