(Legacy) Customer Profile API (1.0.0)
Download OpenAPI specification:Download
Represents customer information related to multiple customer data operations. A customer
is identified by a customer id
in NewStore. You can use this resource
to manage customers and also for clienteling activities in NewStore applications.
Typically, customers are created automatically when they place an order online or when they provide their email address during an in-store purchase.
Note: The Customer Profile API v1 will be deprecated and NewStore will announce the migration plan soon for the retailers using this API. We recommend that all new integrations use the latest Customer Profile API v2. Please use the migration guide to migrate from this version to the new version.
List customer profiles Deprecated
Returns a searchable list of consumer profiles.
Note: This endpoint is designed for paginated front-end use with a search function. It is not suitable for exporting a comprehensive list of all customers due to the following limitations:
- Pagination Per Page Limit: Up to 500 profiles can be fetched per page.
- Total Profiles Limit: There is a maximum limit of 10,000 profiles.
- API Error Beyond Limit: When trying to paginate beyond 10,000 profiles, the API will start returning errors.
query Parameters
q | string The search term to filter customers. The term is compared to the
values in the |
sort | string The sort to be applied to customers response. |
offset | integer <int64> >= 0 Default: 0 The customer profiles page offset. |
count | integer <int64> [ 1 .. 500 ] Default: 10 The number of requested customer profiles. |
Responses
Response samples
- 200
- 400
- 500
- 502
{- "profiles": [
- {
- "id": "NS-EU-01FXX4RSTKMVBFPBVZFPGM97ZW-01FXX4S1V1R8M4PF9H1S1D82CX",
- "display_id": "string",
- "email": "string",
- "full_name": "string",
- "phone_number": "string",
- "store_id": "string",
- "created_by": "string",
- "extended_attributes": {
- "loyalty_id": {
- "data_type": "string",
- "value": "0123456789"
}
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "pagination_info": {
- "count": 0,
- "total": 0,
- "offset": 0
}
}
Get or create customer profile Deprecated
Retrieves an existing customer profile or creates a new customer profile in case it has not been created yet.
Request Body schema: application/json
email required | string <email> Email of the customer. |
full_name | string or null <= 256 Full name of the customer, including first, middle and last name. |
phone_number | string or null Phone number of the customer in E.164 format. |
store_id | string or null The identifier of the store, profile is being created in. |
created_by | string or null The identifier of the associate creating profile |
object [ 0 .. 20 ] items Additional attributes for a customer. |
Responses
Request samples
- Payload
{- "email": "user@example.com",
- "full_name": "string",
- "phone_number": "string",
- "store_id": "string",
- "created_by": "string",
- "extended_attributes": {
- "loyalty_id": {
- "data_type": "string",
- "value": "0123456789"
}
}
}
Response samples
- 200
- 201
- 400
- 409
- 422
- 500
- 502
{- "id": "NS-EU-01FXX4RSTKMVBFPBVZFPGM97ZW-01FXX4S1V1R8M4PF9H1S1D82CX",
- "display_id": "string",
- "email": "string",
- "full_name": "string",
- "phone_number": "string",
- "store_id": "string",
- "created_by": "string",
- "extended_attributes": {
- "loyalty_id": {
- "data_type": "string",
- "value": "0123456789"
}
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
Get customer profile Deprecated
Returns a single customer profile for the given customer profile_id
.
path Parameters
profile_id required | string Profile ID |
Responses
Response samples
- 200
- 400
- 404
- 500
- 502
{- "id": "NS-EU-01FXX4RSTKMVBFPBVZFPGM97ZW-01FXX4S1V1R8M4PF9H1S1D82CX",
- "display_id": "string",
- "email": "string",
- "full_name": "string",
- "phone_number": "string",
- "store_id": "string",
- "created_by": "string",
- "extended_attributes": {
- "loyalty_id": {
- "data_type": "string",
- "value": "0123456789"
}
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
Update customer profile Deprecated
Updates an existing customer profile for the given profile_id
.
path Parameters
profile_id required | string Profile ID |
Request Body schema: application/json
last_updated_at required | string <date-time> Timestamp of the latest profile update. |
string <email> Email of the customer. | |
full_name | string or null <= 256 Full name of the customer, including first, middle and last name. |
phone_number | string or null Phone number of the customer in E.164 format. |
store_id | string or null The identifier of the store, profile is being created in. |
created_by | string or null The identifier of the associate creating profile |
object [ 0 .. 20 ] items Additional attributes for a customer. |
Responses
Request samples
- Payload
{- "last_updated_at": "2019-08-24T14:15:22Z",
- "email": "user@example.com",
- "full_name": "string",
- "phone_number": "string",
- "store_id": "string",
- "created_by": "string",
- "extended_attributes": {
- "loyalty_id": {
- "data_type": "string",
- "value": "0123456789"
}
}
}
Response samples
- 200
- 404
- 409
- 422
- 500
- 502
{- "id": "NS-EU-01FXX4RSTKMVBFPBVZFPGM97ZW-01FXX4S1V1R8M4PF9H1S1D82CX",
- "display_id": "string",
- "email": "string",
- "full_name": "string",
- "phone_number": "string",
- "store_id": "string",
- "created_by": "string",
- "extended_attributes": {
- "loyalty_id": {
- "data_type": "string",
- "value": "0123456789"
}
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
Request customer profile deletion Deprecated
Creates request for customer profile deletion.
path Parameters
profile_id required | string Profile ID |
Responses
Response samples
- 400
- 404
- 409
- 500
- 502
{- "request_id": "some-request-id",
- "message": "An error happened.",
- "type": "about:blank",
- "title": "string"
}
Get or create address Deprecated
Retrieves an existing address or creates a new address in case it has not been added yet.
path Parameters
profile_id required | string Profile ID |
Request Body schema: application/json
full_name required | string Full name. |
company_name | string or null Company name. |
address_line_1 required | string First line of the address. Typically, the street and house number. |
address_line_2 | string Second line of the address. Typically, the apartment number or PO box |
zip_code required | string Postal code of the address. |
city required | string The city/town of the address. |
state | string or null State/province or region of the address. |
country_code required | string Country code in ISO 3166-1 alpha-2 format. |
contact_phone | string or null Phone number of the address. |
Responses
Request samples
- Payload
{- "full_name": "string",
- "company_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "zip_code": "string",
- "city": "string",
- "state": "string",
- "country_code": "string",
- "contact_phone": "string"
}
Response samples
- 200
- 201
- 400
- 404
- 422
- 500
- 502
{- "id": "NS-EU-01FXX4THCG41RFCXVEQGKD60Y4-01FXX4TTF7X8CF5JR3B35TD70F",
- "full_name": "string",
- "company_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "zip_code": "string",
- "city": "string",
- "state": "string",
- "country_code": "string",
- "contact_phone": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
List addresses for profile id Deprecated
Returns a list of addresses for given customer profile_id
.
path Parameters
profile_id required | string Profile ID |
query Parameters
offset | integer <int64> >= 0 Default: 0 The addresses page offset. |
count | integer <int64> [ 1 .. 1000 ] Default: 10 The number of requested addresses. |
Responses
Response samples
- 200
- 404
- 500
- 502
{- "addresses": [
- {
- "id": "NS-EU-01FXX4THCG41RFCXVEQGKD60Y4-01FXX4TTF7X8CF5JR3B35TD70F",
- "full_name": "string",
- "company_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "zip_code": "string",
- "city": "string",
- "state": "string",
- "country_code": "string",
- "contact_phone": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "pagination_info": {
- "count": 0,
- "total": 0,
- "offset": 0
}
}
Get address for profile id and address id Deprecated
Returns an address for the given customer profile_id
and address_id
.
path Parameters
profile_id required | string Profile ID |
address_id required | string Address ID |
Responses
Response samples
- 200
- 400
- 404
- 500
- 502
{- "id": "NS-EU-01FXX4THCG41RFCXVEQGKD60Y4-01FXX4TTF7X8CF5JR3B35TD70F",
- "full_name": "string",
- "company_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "zip_code": "string",
- "city": "string",
- "state": "string",
- "country_code": "string",
- "contact_phone": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
Update address Deprecated
Updates address for the given customer profile_id
and address_id
.
path Parameters
profile_id required | string Profile ID |
address_id required | string Address ID |
Request Body schema: application/json
last_updated_at required | string <date-time> |
full_name | string or null Full name. |
company_name | string or null Company name. |
address_line_1 | string or null First line of the address. Typically, the street and house number. |
address_line_2 | string or null Second line of the address. Typically, the apartment number or PO box |
zip_code | string or null Postal code of the address. |
city | string or null The city/town of the address. |
state | string or null State/province or region of the address. |
country_code | string or null Country code in ISO 3166-1 alpha-2 format. |
contact_phone | string or null Phone number of the address. |
Responses
Request samples
- Payload
{- "last_updated_at": "2019-08-24T14:15:22Z",
- "full_name": "string",
- "company_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "zip_code": "string",
- "city": "string",
- "state": "string",
- "country_code": "string",
- "contact_phone": "string"
}
Response samples
- 200
- 404
- 409
- 422
- 500
- 502
{- "id": "NS-EU-01FXX4THCG41RFCXVEQGKD60Y4-01FXX4TTF7X8CF5JR3B35TD70F",
- "full_name": "string",
- "company_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "zip_code": "string",
- "city": "string",
- "state": "string",
- "country_code": "string",
- "contact_phone": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
Delete address Deprecated
Deletes address from the latest customer profile.
path Parameters
profile_id required | string Profile ID |
address_id required | string Address ID |
Responses
Response samples
- 400
- 404
- 409
- 500
- 502
{- "request_id": "some-request-id",
- "message": "An error happened.",
- "type": "about:blank",
- "title": "string"
}
Store a new PII data entry in a residency compliant way Deprecated
Stores a new PII data entry in a residency compliant way.
Request Body schema: application/json
content_type required | string The media type of the content data. |
content required | string <binary> The file content to store. |
ttl | integer <int64> Time to live in days, will be kept indefinitely if not set. |
Responses
Request samples
- Payload
{- "content_type": "application/pdf",
- "content": "string",
- "ttl": 30
}
Response samples
- 201
- 400
- 500
{- "id": "NS-EU-a5548746-acc1-4d75-81b9-72aec2bfebb7"
}
Get data entry for the provided data ID Deprecated
Returns data for the given data_id
, depending on the defined content-type.
path Parameters
data_id required | string^NS-[A-Z]{2}-[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[... Example: NS-EU-a5548746-acc1-4d75-81b9-72aec2bfebb7 Data ID |
Responses
Response samples
- 400
- 404
- 500
{- "request_id": "some-request-id",
- "message": "An error happened.",
- "type": "about:blank",
- "title": "string"
}
Delete data Deprecated
Deletes data entry for the given data_id
.
path Parameters
data_id required | string^NS-[A-Z]{2}-[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[... Example: NS-EU-a5548746-acc1-4d75-81b9-72aec2bfebb7 Data ID |
Responses
Response samples
- 400
- 404
- 500
{- "request_id": "some-request-id",
- "message": "An error happened.",
- "type": "about:blank",
- "title": "string"
}
Tokenize PII data Deprecated
Tokenizes PII data that is not related to a profile, tokens are only valid for 30 days.
Request Body schema: application/json
required | object [ 1 .. 25 ] properties Sensitive data to be tokenized. | ||
|
Responses
Request samples
- Payload
{- "data": {
- "email": "john.doe@example.org",
- "key1": "foo",
- "key2": "bar"
}
}
Response samples
- 200
- 400
- 500
{- "tokens": {
- "email": "NS-EU-01FXX5DQ3NP19AKJK7045F5ST2-01FXX5DZFQ9CJQ3D29JPTXXXRX"
}, - "errors": {
- "key1": "retryable_error",
- "key2": "internal_error"
}
}
Detokenize multiple tokens Deprecated
Detokenizes a list of tokens for profiles, addresses, or data entries.
Request Body schema: application/json
tokens required | object [ 1 .. 25 ] properties NewStore platform tokens. |
Responses
Request samples
- Payload
{- "tokens": {
- "key1": "NS-EU-01FXX4SCM7D4FCFJT8ZKD4JRV7-01FXX4SHNQQK1XDQHTZX6V6608",
- "key2": "NS-EU-01FXX4SPXKPQCEWSZRZS9D7992-01FXX4SWFJKK66QGEEWQ8TRPAM"
}
}
Response samples
- 200
- 400
- 500
{- "data": {
- "key1": "john.doe@example.org"
}, - "errors": {
- "key2": "token_not_found_error"
}
}