Skip to main content

(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.

customerProfile

Customer profiles operations

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 email, fullname and phonenumber fields. A partial match is also considered a match.

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

Content type
application/json
{
  • "profiles": [
    ],
  • "pagination_info": {
    }
}

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

Content type
application/json
{
  • "email": "user@example.com",
  • "full_name": "string",
  • "phone_number": "string",
  • "store_id": "string",
  • "created_by": "string",
  • "extended_attributes": {
    }
}

Response samples

Content type
application/json
{
  • "id": "NS-EU-01FXX4RSTKMVBFPBVZFPGM97ZW-01FXX4S1V1R8M4PF9H1S1D82CX",
  • "display_id": "string",
  • "email": "string",
  • "full_name": "string",
  • "phone_number": "string",
  • "store_id": "string",
  • "created_by": "string",
  • "extended_attributes": {
    },
  • "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

Content type
application/json
{
  • "id": "NS-EU-01FXX4RSTKMVBFPBVZFPGM97ZW-01FXX4S1V1R8M4PF9H1S1D82CX",
  • "display_id": "string",
  • "email": "string",
  • "full_name": "string",
  • "phone_number": "string",
  • "store_id": "string",
  • "created_by": "string",
  • "extended_attributes": {
    },
  • "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.

email
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

Content type
application/json
{
  • "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": {
    }
}

Response samples

Content type
application/json
{
  • "id": "NS-EU-01FXX4RSTKMVBFPBVZFPGM97ZW-01FXX4S1V1R8M4PF9H1S1D82CX",
  • "display_id": "string",
  • "email": "string",
  • "full_name": "string",
  • "phone_number": "string",
  • "store_id": "string",
  • "created_by": "string",
  • "extended_attributes": {
    },
  • "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

Content type
application/problem+json
{
  • "request_id": "some-request-id",
  • "message": "An error happened.",
  • "type": "about:blank",
  • "title": "string"
}

address

Customer profile address operations

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

Content type
application/json
{
  • "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

Content type
application/json
{
  • "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

Content type
application/json
{
  • "addresses": [
    ],
  • "pagination_info": {
    }
}

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

Content type
application/json
{
  • "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

Content type
application/json
{
  • "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

Content type
application/json
{
  • "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

Content type
application/problem+json
{
  • "request_id": "some-request-id",
  • "message": "An error happened.",
  • "type": "about:blank",
  • "title": "string"
}

data

Data operations

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

Content type
application/json
{
  • "content_type": "application/pdf",
  • "content": "string",
  • "ttl": 30
}

Response samples

Content type
application/json
{
  • "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

Content type
application/problem+json
{
  • "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

Content type
application/problem+json
{
  • "request_id": "some-request-id",
  • "message": "An error happened.",
  • "type": "about:blank",
  • "title": "string"
}

tokenOperations

Token operations

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.

property name*
additional property
any

Responses

Request samples

Content type
application/json
{
  • "data": {
    }
}

Response samples

Content type
application/json
{
  • "tokens": {
    },
  • "errors": {
    }
}

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

Content type
application/json
{
  • "tokens": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "errors": {
    }
}