Retail Cloud API

GET Search for customers

GET /services/apexrest/spi/customer/search

Operation ID: searchForCustomers.

Retrieves a list of customers matching the given search criteria.

Parameters

  • firstName (query, string) Enter the first name of the customer.
  • lastName (query, string) Enter the last name of the customer.
  • phone (query, string) Enter the mobile phone number of the customer.
  • email (query, string) Enter the email address of the customer.
  • id (query, string) Enter the Salesforce Account ID of the customer.

Responses

  • 200 Successful response with customer details

    Media type: application/json. Schema: object.

    • errorMessage (string, nullable)
    • errorCode (string, nullable)
    • customers (array of object)
      • profile (object)
        • phoneMobile (string, nullable)
        • loyaltyId (string, nullable)
        • lastName (string)
        • firstName (string)
        • email (string, nullable)
        • customerId (string)
      • loyaltyProfile (object, nullable)
        • rewards (array of object)
          • rewardName (string)
          • rewardId (string)
          • code (string)
          • amount (number, nullable)
        • loyaltyId (string)
        • lastName (string)
        • firstName (string)
        • currentPoints (number)
        • accountNumber (string)
  • 400 Invalid request parameters
  • 500 Internal server error