Class ByProjectKeyInStoreKeyByStoreKeyCustomersRequestBuilder

Constructors

Properties

args: {
    baseUri?: string;
    executeRequest: executeRequest;
    pathArgs: {
        projectKey: string;
        storeKey: string;
    };
}

Type declaration

  • Optional baseUri?: string
  • executeRequest: executeRequest
  • pathArgs: {
        projectKey: string;
        storeKey: string;
    }
    • projectKey: string
    • storeKey: string

Methods

  • Parameters

    • Optional methodArgs: {
          headers?: {
              [key: string]: string | string[];
          };
          queryArgs?: {
              expand?: string | string[];
              limit?: number;
              offset?: number;
              sort?: string | string[];
              where?: string | string[];
              withTotal?: boolean;
              [key: string]: QueryParam;
          };
      }
      • Optional headers?: {
            [key: string]: string | string[];
        }
        • [key: string]: string | string[]
      • Optional queryArgs?: {
            expand?: string | string[];
            limit?: number;
            offset?: number;
            sort?: string | string[];
            where?: string | string[];
            withTotal?: boolean;
            [key: string]: QueryParam;
        }
        • [key: string]: QueryParam
        • Optional expand?: string | string[]
        • Optional limit?: number
        • Optional offset?: number
        • Optional sort?: string | string[]
        • Optional where?: string | string[]
        • Optional withTotal?: boolean

    Returns ApiRequest<CustomerPagedQueryResponse>

  • Checks if a Customer exists for a given Query Predicate. Returns a 200 OK status if any Customers match the Query Predicate or a 404 Not Found otherwise.

    Parameters

    • Optional methodArgs: {
          headers?: {
              [key: string]: string | string[];
          };
          queryArgs?: {
              where?: string | string[];
              [key: string]: QueryParam;
          };
      }
      • Optional headers?: {
            [key: string]: string | string[];
        }
        • [key: string]: string | string[]
      • Optional queryArgs?: {
            where?: string | string[];
            [key: string]: QueryParam;
        }
        • [key: string]: QueryParam
        • Optional where?: string | string[]

    Returns ApiRequest<void>

  • When using this endpoint, if omitted, the Customer stores field is set to the Store specified in the path parameter.

    If the `anonymousCart` field is set on the [CustomerDraft](ctp:api:type:CustomerDraft), then the newly created Customer will be assigned to that [Cart](ctp:api:type:Cart).
    Similarly, if the `anonymousId` field is set, the Customer will be set on all [Carts](ctp:api:type:Cart), [Orders](ctp:api:type:Order), [ShoppingLists](ctp:api:type:ShoppingList) and [Payments](ctp:api:type:Payment) with the same `anonymousId`.
    If a Cart with a `store` field specified, the `store` field must reference the same [Store](ctp:api:type:Store) specified in the `{storeKey}` path parameter.

    Creating a Customer produces the [CustomerCreated](ctp:api:type:CustomerCreatedMessage) Message. Simultaneously creating two Customers with the same email address can return a [LockedField](ctp:api:type:LockedFieldError) error.

    Parameters

    • methodArgs: {
          body: CustomerDraft;
          headers?: {
              [key: string]: string | string[];
          };
          queryArgs?: {
              expand?: string | string[];
              [key: string]: QueryParam;
          };
      }
      • body: CustomerDraft
      • Optional headers?: {
            [key: string]: string | string[];
        }
        • [key: string]: string | string[]
      • Optional queryArgs?: {
            expand?: string | string[];
            [key: string]: QueryParam;
        }
        • [key: string]: QueryParam
        • Optional expand?: string | string[]

    Returns ApiRequest<CustomerSignInResult>