Search for Customers

Returns a list of customers for the provided query parameters.

Method Type URI
GET

v90/ws/customer.ws
?customerName={customerName}
&crmId={crmId}
&refId={refId}
&pageIndex={pageIndex}
&pageSize={pageSize}
&sortCol={sortCol}
&sortOrder={sortOrder}
&vendorId={vendorId}

Example URL: http://hostname:8080/ems/v90/ws/customer.ws?customerName=ABCINC &crmId=crm34&refId=CRMN554&pageIndex=5&pageSize=10&sortCol=customerName&sortOrder=asc&vendorId=2

URI Parameters

Parameter Description Type
customerName (Optional) The customer name. String
crmId (Optional) CRM ID. String
refId (Optional) Reference ID. String
pageIndex (Optional) The starting page number. Integer (>0)
pageSize (Optional) The number of customers retrieved per request. Integer (>0)
sortCol (Optional) Sort against the column. String (crmId, cstmrId, customerName, refId, type)
sortOrder (Optional) The order to sort. String (asc, desc)
vendorId (Optional) The Customers which are associated with the given vendor are returned. Integer (>0)

NOTE    By default, a GET call returns a maximum of 200 entries per page. You can change this by modifying the pageIndex and pageSize values. (To change the default maximum number of returned entries for all GET calls for Products, Entitlements, and Customers, modify the Max Records per Page (Web Services) value in the Sentinel LDK-EMS Administration Console. For details, see the Sentinel LDK–EMS Configuration Guide.)

Sample Response

HTTP Status Code: 200

Success

Response Header:

X-Total-Count: The total number of entries. You can use X-Total-Count to calculate the total number of pages by dividing X-Total-Count by pageSize (X-Total-Count÷pageSize=number of pages). For example, suppose your application returns an X-Total-Count of 17 and the pageSize is 15. 17÷15=1.333 or 2 pages in total because each page includes a maximum of 15 entries. Similarly, suppose your application returns an X-Total-Count of 1103 and the pageSize is 15. 1103÷15=73.533 or 74 pages in total.

Response Body

<listResponse type="customer" count="6">
   <instance customerId="6" name="Priya Shetye" customerRefId="aaaaaaa6-bbb7-ccc8-ddd9-eeeeeeeeeee0" refId1="106" type="ind" enabled="true" phone="+973-93850001" fax="" billingZip="11234" billingAddress="24 Hegde Drive" billingCity="Bangalore" billingCountry="India" billingState="" vendorId="1" defaultEmail="p.shetye025@testsite.com" defaultContactName="Priya Shetye"/>
   <instance customerId="5" name="Parag Mahajan" customerRefId="aaaaaaa5-bbb6-ccc7-ddd8-eeeeeeeeeee9" refId1="105" type="ind" enabled="true" phone="+973-93850123" fax="" billingZip="23432" billingAddress="112 Main St" billingCity="Pune" billingCountry="India" billingState="" vendorId="1" defaultEmail="pmahajan@miain.com" defaultContactName="Parag Mahajan"/>
   <instance customerId="4" name="Robert Jones" customerRefId="aaaaaaa4-bbb5-ccc6-ddd7-eeeeeeeeeee8" refId1="104" type="ind" enabled="true" phone="845-311-0321232" fax="" billingZip="10952" billingAddress="148 Highview La" billingCity="New Square" billingCountry="" billingState="NY" vendorId="1" defaultEmail="rjr12@zahav15.net" defaultContactName="Robert Jones"/>
   <instance customerId="3" name="Peter Adams" customerRefId="aaaaaaa3-bbb4-ccc5-ddd6-eeeeeeeeeee7" refId1="103" type="ind" enabled="true" phone="555-8872-0977" fax="" billingZip="62204" billingAddress="1104 Fifth Ave" billingCity="Athens" billingCountry="" billingState="GA" vendorId="1" defaultEmail="adamsp@eliashim.com" defaultContactName="Peter Adams"/>
   <instance customerId="2" name="Sara Brown" customerRefId="aaaaaaa2-bbb3-ccc4-ddd5-eeeeeeeeeee6" refId1="102" type="ind" enabled="true" phone="555-234-7783" fax="" billingZip="62204" billingAddress="654 Four Mile Dr" billingCity="Arlington" billingCountry="" billingState="VA" vendorId="1" defaultEmail="sara@fast-ag.com" defaultContactName="Sara Brown"/>
   <instance customerId="1" name="John Smith" customerRefId="aaaaaaa1-bbb2-ccc3-ddd4-eeeeeeeeeee5" refId1="101" type="ind" enabled="true" phone="555-8872-0973" fax="" billingZip="34897" billingAddress="1104 Fifth Ave" billingCity="Athens" billingCountry="" billingState="GA" vendorId="1" defaultEmail="smithj@eliashim.com" defaultContactName="John Smith"/>
</listResponse>

NOTE   The order of the search result is decided on the basis of CSTMRId which acts as a unique identifier for each customer in the database.

Failure

Response Body:

<listResponse type="customer" count="0"/>