Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Customers

Manage customer information within a customer list.

For instructions on how to retrieve access token for admin APIs: https://developer.salesforce.com/docs/commerce/commerce-api/guide/authorization-for-admin-apis.html

Example with admin auth

import { Customer, ClientConfig } from "commerce-sdk";
// or
const { Customer, ClientConfig } = require("commerce-sdk");

const clientConfig: ClientConfig = {
  parameters: {
    clientId: "XXXXXX",
    organizationId: "XXXX",
    shortCode: "XXX",
    siteId: "XX"
  }
};

token = { access_token: 'INSERT_ACCESS_TOKEN_HERE' };

clientConfig.headers['authorization'] = `Bearer ${token.access_token}`;
const customersClient = new Customer.Customers(clientConfig);
API Version: 0.0.29
Last Updated:

Hierarchy

  • BaseClient
    • Customers

Index

Type aliases

Constructors

Properties

Methods

Type aliases

Static AlreadyExists

AlreadyExists: {}

Type declaration

Static AsyncCreated

AsyncCreated: {}

Type declaration

Static AttributeDefinition

AttributeDefinition: { defaultValue?: PropertyValueDefinition; description: L10nString; id?: string; key?: boolean; localizable?: boolean; mandatory?: boolean; max?: number; min?: number; minLength?: number; multiValueType?: boolean; name: L10nString; possibleValues?: Array<PropertyValueDefinition>; regularExpression?: string; scale?: number; searchable?: boolean; siteSpecific?: boolean; system?: boolean; type: string; unit?: L10nString; visible?: boolean }

Type declaration

  • Optional defaultValue?: PropertyValueDefinition
  • description: L10nString
  • Optional id?: string
  • Optional key?: boolean
  • Optional localizable?: boolean
  • Optional mandatory?: boolean
  • Optional max?: number
  • Optional min?: number
  • Optional minLength?: number
  • Optional multiValueType?: boolean
  • name: L10nString
  • Optional possibleValues?: Array<PropertyValueDefinition>
  • Optional regularExpression?: string
  • Optional scale?: number
  • Optional searchable?: boolean
  • Optional siteSpecific?: boolean
  • Optional system?: boolean
  • type: string
  • Optional unit?: L10nString
  • Optional visible?: boolean

Static BadRequest

BadRequest: {}

Type declaration

Static BoolFilter

BoolFilter: { filters?: Array<Filter>; operator: string } & {}

Static BoolQuery

BoolQuery: { must?: Array<Query>; mustNot?: Array<Query>; should?: Array<Query> } & {}

Static ChangeControlled

ChangeControlled: { createdBy?: string; creationDate?: any; lastModifiedBy?: string; modificationDate?: any } & {}

Static ChangeControlledDataType

ChangeControlledDataType: { createdBy?: string; creationDate?: any; lastModifiedBy?: string; modificationDate?: any } & {}

Static ClosedObject

ClosedObject: {} & {}

Static Credentials

Credentials: { enabled?: boolean; locked?: boolean; login: string; passwordQuestion?: string } & {}

Static Customer

Customer: { birthday?: any; companyName?: string; creationDate?: any; credentials?: Credentials; customerId?: string; customerNo: string; email?: string; fax?: string; firstName?: string; gender?: number; jobTitle?: string; lastLoginTime?: any; lastModified?: any; lastName: string; lastVisitTime?: any; phoneBusiness?: string; phoneHome?: string; phoneMobile?: string; preferredLocale?: string; previousLoginTime?: any; previousVisitTime?: any; primaryAddress?: CustomerAddress; salutation?: string; secondName?: string; suffix?: string; title?: string } & {}

Static CustomerAddress

CustomerAddress: { address1?: string; address2?: string; addressId: string; city?: string; companyName?: string; countryCode: string; creationDate?: any; etag?: string; firstName?: string; fullName?: string; jobTitle?: string; lastModified?: any; lastName: string; phone?: string; postBox?: string; postalCode?: string; salutation?: string; secondName?: string; stateCode?: string; suffix?: string; suite?: string; title?: string } & {}

Static CustomerAddressResult

CustomerAddressResult: { data?: Array<CustomerAddress>; limit?: number; offset?: number; total?: number } & {}

Static CustomerGroup

CustomerGroup: { creationDate: string; description: string; id: string; inDeletion: boolean; memberCount: number; rule: CustomerGroupRule; type: string } & {}

Static CustomerGroupRule

CustomerGroupRule: { description: string } & {}

Static CustomerGroupSearchBadRequest

CustomerGroupSearchBadRequest: {}

Type declaration

Static CustomerGroupSearchResult

CustomerGroupSearchResult: { hits: Array<CustomerGroup>; limit: number; offset: any; query: Query; sorts?: Array<Sort>; total: any } & {}

Static CustomerList

CustomerList: { id: string } & {}

Static CustomerSearchHit

CustomerSearchHit: { data: Customer; relevance: number } & {}

Static CustomerSearchResult

CustomerSearchResult: { hits: Array<CustomerSearchHit>; limit: number; offset: any; query: Query; sorts?: Array<Sort>; total: any } & {}

Static DateConditionalRequest

DateConditionalRequest: {}

Type declaration

Static DateRangeFilter

DateRangeFilter: {}

Type declaration

Static DatetimeRangeFilter

DatetimeRangeFilter: {}

Type declaration

Static Error

Error: { detail?: string; instance?: string; title?: string; type: string } & {}

Static ErrorResponse

ErrorResponse: { detail?: string; instance?: string; title?: string; type: string } & {}

Static EtagConditionalRequest

EtagConditionalRequest: {}

Type declaration

Static EtagResponse

EtagResponse: {}

Type declaration

Static Filter

Filter: { boolFilter?: BoolFilter; queryFilter?: QueryFilter; range2Filter?: Range2Filter; rangeFilter?: RangeFilter; termFilter?: TermFilter } & {}

Static FilteredQuery

FilteredQuery: { filter: Filter; query: Query } & {}

Static Forbidden

Forbidden: {}

Type declaration

Static IntegerRangeFilter

IntegerRangeFilter: {}

Type declaration

Static L10nString

L10nString: {} & {}

Static LocalizedString

LocalizedString: {} & {}

Static MatchAllQuery

MatchAllQuery: {} & {}

Static Money

Money: { currencyMnemonic?: string; value?: number } & {}

Static MoneyMnemonic

MoneyMnemonic: { currencyMnemonic?: string; value?: number } & {}

Static NestedQuery

NestedQuery: { path: string; query: Query; scoreMode?: string } & {}

Static NoPropertiesAllowed

NoPropertiesAllowed: {}

Type declaration

Static NotFound

NotFound: {}

Type declaration

Static NumericRangeFilter

NumericRangeFilter: {}

Type declaration

Static OffsetPaginated

OffsetPaginated: {}

Type declaration

Static OpenObject

OpenObject: {} & {}

Static PaginatedSearchResult

PaginatedSearchResult: { hits?: Array<object>; limit: number; offset: any; query: Query; sorts?: Array<Sort>; total: any } & {}

Static PaginatedSearchResultBase

PaginatedSearchResultBase: { hits?: Array<object>; limit: number; offset: any; query: Query; sorts?: Array<Sort>; total: any } & {}

Static PropertyDefinition

PropertyDefinition: { defaultValue?: PropertyValueDefinition; description: L10nString; id?: string; key?: boolean; localizable?: boolean; mandatory?: boolean; max?: number; min?: number; minLength?: number; multiValueType?: boolean; name: L10nString; possibleValues?: Array<PropertyValueDefinition>; regularExpression?: string; scale?: number; searchable?: boolean; siteSpecific?: boolean; system?: boolean; type: string; unit?: L10nString; visible?: boolean } & {}

Static PropertyValueDefinition

PropertyValueDefinition: { description: L10nString; displayValue: L10nString; id: string; position?: number; value: string }

Type declaration

  • description: L10nString
  • displayValue: L10nString
  • id: string
  • Optional position?: number
  • value: string

Static Query

Query: { boolQuery?: BoolQuery; filteredQuery?: FilteredQuery; matchAllQuery?: MatchAllQuery; nestedQuery?: NestedQuery; termQuery?: TermQuery; textQuery?: TextQuery } & {}

Static QueryFilter

QueryFilter: { query: Query } & {}

Static QueryParamsLimit

QueryParamsLimit: {}

Type declaration

Static QueryParamsOffset

QueryParamsOffset: {}

Type declaration

Static Range2Filter

Range2Filter: { filterMode?: string; fromField: string; fromInclusive?: boolean; fromValue?: any; toField: string; toInclusive?: boolean; toValue?: any } & {}

Static RangeFilter

RangeFilter: {}

Type declaration

Static RateLimited

RateLimited: {}

Type declaration

Static RateLimited2

RateLimited2: {}

Type declaration

Static RateLimited3

RateLimited3: {}

Type declaration

Static RateLimited4

RateLimited4: {}

Type declaration

Static RateLimited5

RateLimited5: {}

Type declaration

Static SearchRequest

SearchRequest: { limit?: number; offset?: any; query: Query; sorts?: Array<Sort> } & {}

Static SearchRequestBase

SearchRequestBase: { limit?: number; offset?: any; query: Query; sorts?: Array<Sort> } & {}

Static Selectable

Selectable: {}

Type declaration

Static SimpleSearchResult

SimpleSearchResult: { hits?: Array<object>; limit: number; offset: any; total: any } & {}

Static SimpleSearchResultBase

SimpleSearchResultBase: { hits?: Array<object>; limit: number; offset: any; total: any } & {}

Static SiteSpecific

SiteSpecific: {}

Type declaration

Static Sort

Sort: { field: string; sortOrder?: string } & {}

Static SpecifiedPropertiesAllowed

SpecifiedPropertiesAllowed: {} & {}

Static SyncCreated

SyncCreated: {}

Type declaration

Static TermFilter

TermFilter: { field: string; operator: string; values?: Array<any> } & {}

Static TermQuery

TermQuery: { fields: Array<string>; operator: string; values?: Array<any> } & {}

Static TextQuery

TextQuery: { fields: Array<string>; searchPhrase: string } & {}

Static Unauthorized

Unauthorized: {}

Type declaration

Constructors

constructor

  • new Customers(config: ClientConfig): Customers
  • Parameters

    • config: ClientConfig

    Returns Customers

Properties

clientConfig

clientConfig: ClientConfig

Methods

createAddressForCustomerInCustomerList

  • createAddressForCustomerInCustomerList(options: { body: CustomerAddress; fetchOptions?: RequestInit; headers?: {}; parameters?: { customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }): Promise<CustomerAddress>
  • createAddressForCustomerInCustomerList<T>(options: { body: CustomerAddress; fetchOptions?: RequestInit; headers?: {}; parameters?: { customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : Customers.CustomerAddress>
  • The action creates a new customer address with the given address information.

    If you would like to get a raw Response object use the other createAddressForCustomerInCustomerList function.

    Parameters

    • options: { body: CustomerAddress; fetchOptions?: RequestInit; headers?: {}; parameters?: { customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: CustomerAddress
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { customerNo: string; listId: string; organizationId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<CustomerAddress>

    A promise of type Customers.CustomerAddress.

  • The action creates a new customer address with the given address information.

    Type parameters

    • T: boolean

    Parameters

    • options: { body: CustomerAddress; fetchOptions?: RequestInit; headers?: {}; parameters?: { customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: CustomerAddress
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { customerNo: string; listId: string; organizationId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : Customers.CustomerAddress>

    A promise of type Response if rawResponse is true, a promise of type Customers.CustomerAddress otherwise.

createCustomerInCustomerList

  • createCustomerInCustomerList(options: { body: Customer; fetchOptions?: RequestInit; headers?: {}; parameters?: { customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }): Promise<Customer | Customer>
  • createCustomerInCustomerList<T>(options: { body: Customer; fetchOptions?: RequestInit; headers?: {}; parameters?: { customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : Customers.Customer | Customers.Customer>
  • Action to create a new customer. The customer is created using the specified customer number, credentials, and customer information. This action verifies the following:

    • Login acceptance criteria and uniqueness.
    • Mandatory customer properties.

    If the action fails to create the customer, it returns a 400 fault with an appropriate message.

    If you would like to get a raw Response object use the other createCustomerInCustomerList function.

    Parameters

    • options: { body: Customer; fetchOptions?: RequestInit; headers?: {}; parameters?: { customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: Customer
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { customerNo: string; listId: string; organizationId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<Customer | Customer>

    A promise of type Customers.Customer | Customers.Customer.

  • Action to create a new customer. The customer is created using the specified customer number, credentials, and customer information. This action verifies the following:

    • Login acceptance criteria and uniqueness.
    • Mandatory customer properties.

    If the action fails to create the customer, it returns a 400 fault with an appropriate message.

    Type parameters

    • T: boolean

    Parameters

    • options: { body: Customer; fetchOptions?: RequestInit; headers?: {}; parameters?: { customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: Customer
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { customerNo: string; listId: string; organizationId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : Customers.Customer | Customers.Customer>

    A promise of type Response if rawResponse is true, a promise of type Customers.Customer | Customers.Customer otherwise.

createCustomerList

  • createCustomerList(options: { body: Customer; fetchOptions?: RequestInit; headers?: {}; parameters?: { listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }): Promise<Customer>
  • createCustomerList<T>(options: { body: Customer; fetchOptions?: RequestInit; headers?: {}; parameters?: { listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : Customers.Customer>
  • Action to create a new customer. The customer is created using the specified credentials and customer information. This action verifies the following:

    • Login acceptance criteria and uniqueness.
    • Mandatory customer properties.

    If the action fails to create the customer, it returns a 400 fault with an appropriate message.

    If you would like to get a raw Response object use the other createCustomerList function.

    Parameters

    • options: { body: Customer; fetchOptions?: RequestInit; headers?: {}; parameters?: { listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: Customer
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { listId: string; organizationId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<Customer>

    A promise of type Customers.Customer.

  • Action to create a new customer. The customer is created using the specified credentials and customer information. This action verifies the following:

    • Login acceptance criteria and uniqueness.
    • Mandatory customer properties.

    If the action fails to create the customer, it returns a 400 fault with an appropriate message.

    Type parameters

    • T: boolean

    Parameters

    • options: { body: Customer; fetchOptions?: RequestInit; headers?: {}; parameters?: { listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: Customer
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { listId: string; organizationId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : Customers.Customer>

    A promise of type Response if rawResponse is true, a promise of type Customers.Customer otherwise.

deleteCustomerFromCustomerList

  • deleteCustomerFromCustomerList(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }): Promise<void>
  • deleteCustomerFromCustomerList<T>(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : void>
  • Deletes the customer, including all related information like the customer addresses.

    If you would like to get a raw Response object use the other deleteCustomerFromCustomerList function.

    Parameters

    • Optional options: { fetchOptions?: RequestInit; headers?: {}; parameters?: { customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { customerNo: string; listId: string; organizationId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<void>

    A promise of type void.

  • Deletes the customer, including all related information like the customer addresses.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: { fetchOptions?: RequestInit; headers?: {}; parameters?: { customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { customerNo: string; listId: string; organizationId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : void>

    A promise of type Response if rawResponse is true, a promise of type void otherwise.

getAddressForCustomerFromCustomerList

  • getAddressForCustomerFromCustomerList(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { addressId: string; customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }): Promise<CustomerAddress>
  • getAddressForCustomerFromCustomerList<T>(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { addressId: string; customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : Customers.CustomerAddress>
  • Action that returns a single customer address from a customer list.

    If you would like to get a raw Response object use the other getAddressForCustomerFromCustomerList function.

    Parameters

    • Optional options: { fetchOptions?: RequestInit; headers?: {}; parameters?: { addressId: string; customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { addressId: string; customerNo: string; listId: string; organizationId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<CustomerAddress>

    A promise of type Customers.CustomerAddress.

  • Action that returns a single customer address from a customer list.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: { fetchOptions?: RequestInit; headers?: {}; parameters?: { addressId: string; customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { addressId: string; customerNo: string; listId: string; organizationId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : Customers.CustomerAddress>

    A promise of type Response if rawResponse is true, a promise of type Customers.CustomerAddress otherwise.

getAddressesForCustomerFromCustomerList

  • getAddressesForCustomerFromCustomerList(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { customerNo: string; limit?: number; listId: string; offset?: any; organizationId?: string } & {}; retrySettings?: OperationOptions }): Promise<CustomerAddressResult>
  • getAddressesForCustomerFromCustomerList<T>(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { customerNo: string; limit?: number; listId: string; offset?: any; organizationId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : Customers.CustomerAddressResult>
  • Action that returns a pageable list of all customer addresses. The default page size is 10 customer addresses.

    If you would like to get a raw Response object use the other getAddressesForCustomerFromCustomerList function.

    Parameters

    • Optional options: { fetchOptions?: RequestInit; headers?: {}; parameters?: { customerNo: string; limit?: number; listId: string; offset?: any; organizationId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { customerNo: string; limit?: number; listId: string; offset?: any; organizationId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<CustomerAddressResult>

    A promise of type Customers.CustomerAddressResult.

  • Action that returns a pageable list of all customer addresses. The default page size is 10 customer addresses.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: { fetchOptions?: RequestInit; headers?: {}; parameters?: { customerNo: string; limit?: number; listId: string; offset?: any; organizationId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { customerNo: string; limit?: number; listId: string; offset?: any; organizationId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : Customers.CustomerAddressResult>

    A promise of type Response if rawResponse is true, a promise of type Customers.CustomerAddressResult otherwise.

getCustomerFromCustomerList

  • getCustomerFromCustomerList(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }): Promise<Customer>
  • getCustomerFromCustomerList<T>(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : Customers.Customer>
  • Action to get customer information.

    If you would like to get a raw Response object use the other getCustomerFromCustomerList function.

    Parameters

    • Optional options: { fetchOptions?: RequestInit; headers?: {}; parameters?: { customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { customerNo: string; listId: string; organizationId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<Customer>

    A promise of type Customers.Customer.

  • Action to get customer information.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: { fetchOptions?: RequestInit; headers?: {}; parameters?: { customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { customerNo: string; listId: string; organizationId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : Customers.Customer>

    A promise of type Response if rawResponse is true, a promise of type Customers.Customer otherwise.

removeAddressForCustomerInCustomerList

  • removeAddressForCustomerInCustomerList(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { addressId: string; customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }): Promise<void>
  • removeAddressForCustomerInCustomerList<T>(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { addressId: string; customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : void>
  • Action which deletes a customer address.

    If you would like to get a raw Response object use the other removeAddressForCustomerInCustomerList function.

    Parameters

    • Optional options: { fetchOptions?: RequestInit; headers?: {}; parameters?: { addressId: string; customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { addressId: string; customerNo: string; listId: string; organizationId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<void>

    A promise of type void.

  • Action which deletes a customer address.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: { fetchOptions?: RequestInit; headers?: {}; parameters?: { addressId: string; customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { addressId: string; customerNo: string; listId: string; organizationId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : void>

    A promise of type Response if rawResponse is true, a promise of type void otherwise.

searchCustomerGroup

  • searchCustomerGroup(options: { body: SearchRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<CustomerGroupSearchResult>
  • searchCustomerGroup<T>(options: { body: SearchRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : Customers.CustomerGroupSearchResult>
  • Search for customer groups in a given Site Id. The query attribute specifies a complex query that can be used to narrow down the search. These are the list of searchable attributes:

    Attribute Type
    id String
    description String
    type String

    Note: This endpoint is available with the B2C Commerce release 24.2.

    If you would like to get a raw Response object use the other searchCustomerGroup function.

    Parameters

    • options: { body: SearchRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: SearchRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<CustomerGroupSearchResult>

    A promise of type Customers.CustomerGroupSearchResult.

  • Search for customer groups in a given Site Id. The query attribute specifies a complex query that can be used to narrow down the search. These are the list of searchable attributes:

    Attribute Type
    id String
    description String
    type String

    Note: This endpoint is available with the B2C Commerce release 24.2.

    Type parameters

    • T: boolean

    Parameters

    • options: { body: SearchRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: SearchRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : Customers.CustomerGroupSearchResult>

    A promise of type Response if rawResponse is true, a promise of type Customers.CustomerGroupSearchResult otherwise.

searchCustomerInCustomerList

  • searchCustomerInCustomerList(options: { body: SearchRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { customerListId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }): Promise<CustomerSearchResult>
  • searchCustomerInCustomerList<T>(options: { body: SearchRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { customerListId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : Customers.CustomerSearchResult>
  • Action to search for customers in a customer list. The query attribute specifies a complex query that can be used to narrow down the search. These are the list of searchable attributes:

    Attribute Type
    customerNo String
    firstName String
    secondName String
    lastName String
    suffix String
    salutation String
    title String
    fax String
    phoneHome String
    phoneBusiness String
    phoneMobile String
    email String
    gender Integer
    companyName String
    credentials.login String
    credentials.enabled Boolean

    If you would like to get a raw Response object use the other searchCustomerInCustomerList function.

    Parameters

    • options: { body: SearchRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { customerListId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: SearchRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { customerListId: string; organizationId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<CustomerSearchResult>

    A promise of type Customers.CustomerSearchResult.

  • Action to search for customers in a customer list. The query attribute specifies a complex query that can be used to narrow down the search. These are the list of searchable attributes:

    Attribute Type
    customerNo String
    firstName String
    secondName String
    lastName String
    suffix String
    salutation String
    title String
    fax String
    phoneHome String
    phoneBusiness String
    phoneMobile String
    email String
    gender Integer
    companyName String
    credentials.login String
    credentials.enabled Boolean

    Type parameters

    • T: boolean

    Parameters

    • options: { body: SearchRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { customerListId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: SearchRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { customerListId: string; organizationId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : Customers.CustomerSearchResult>

    A promise of type Response if rawResponse is true, a promise of type Customers.CustomerSearchResult otherwise.

updateAddressForCustomerInCustomerList

  • updateAddressForCustomerInCustomerList(options: { body: CustomerAddress; fetchOptions?: RequestInit; headers?: {}; parameters?: { addressId: string; customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }): Promise<CustomerAddress>
  • updateAddressForCustomerInCustomerList<T>(options: { body: CustomerAddress; fetchOptions?: RequestInit; headers?: {}; parameters?: { addressId: string; customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : Customers.CustomerAddress>
  • Action which updates an address of a customer with the given address information.

    If you would like to get a raw Response object use the other updateAddressForCustomerInCustomerList function.

    Parameters

    • options: { body: CustomerAddress; fetchOptions?: RequestInit; headers?: {}; parameters?: { addressId: string; customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: CustomerAddress
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { addressId: string; customerNo: string; listId: string; organizationId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<CustomerAddress>

    A promise of type Customers.CustomerAddress.

  • Action which updates an address of a customer with the given address information.

    Type parameters

    • T: boolean

    Parameters

    • options: { body: CustomerAddress; fetchOptions?: RequestInit; headers?: {}; parameters?: { addressId: string; customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: CustomerAddress
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { addressId: string; customerNo: string; listId: string; organizationId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : Customers.CustomerAddress>

    A promise of type Response if rawResponse is true, a promise of type Customers.CustomerAddress otherwise.

updateCustomerInCustomerList

  • updateCustomerInCustomerList(options: { body: Customer; fetchOptions?: RequestInit; headers?: {}; parameters?: { customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }): Promise<Customer>
  • updateCustomerInCustomerList<T>(options: { body: Customer; fetchOptions?: RequestInit; headers?: {}; parameters?: { customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : Customers.Customer>
  • Updates the customer with the specified information. The customer number is allowed to be updated but results in a CustomerNumberAlreadyInUseException if there is another customer with the same customer number existing.

    If you would like to get a raw Response object use the other updateCustomerInCustomerList function.

    Parameters

    • options: { body: Customer; fetchOptions?: RequestInit; headers?: {}; parameters?: { customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: Customer
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { customerNo: string; listId: string; organizationId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<Customer>

    A promise of type Customers.Customer.

  • Updates the customer with the specified information. The customer number is allowed to be updated but results in a CustomerNumberAlreadyInUseException if there is another customer with the same customer number existing.

    Type parameters

    • T: boolean

    Parameters

    • options: { body: Customer; fetchOptions?: RequestInit; headers?: {}; parameters?: { customerNo: string; listId: string; organizationId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: Customer
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { customerNo: string; listId: string; organizationId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : Customers.Customer>

    A promise of type Response if rawResponse is true, a promise of type Customers.Customer otherwise.

Generated using TypeDoc