POST api/Customer/GetCustomers
Gets the list of Customers based on advanced filtering.
Request Information
URI Parameters
None.
Body Parameters
Filter parameters
CustomersFilterPostName | Description | Type | Additional information |
---|---|---|---|
PageIndex |
The requested page index |
integer |
None. |
PageSize |
The requested page size |
integer |
None. |
Name |
Filter by Name, if set |
string |
None. |
CustomerGroupId |
Filter by Customer group, if set |
integer |
None. |
Filter by Email, if set |
string |
None. |
|
EmailDomain |
Filter by email domains, if set |
string |
None. |
LastUpdatedDateFromUtc |
Filter by the date of the last customer update - from. |
date |
None. |
LastUpdatedDateUntilUtc |
Filter by the date of the last customer update - until. |
date |
None. |
Request Formats
application/json, text/json
Sample:
{ "PageIndex": 0, "PageSize": 10, "Name": null, "CustomerGroupId": null, "Email": null, "EmailDomain": null, "LastUpdatedDateFromUtc": null, "LastUpdatedDateUntilUtc": null }
application/xml, text/xml
Sample:
<CustomersFilterPost xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.Posts"> <CustomerGroupId i:nil="true" /> <Email i:nil="true" /> <EmailDomain i:nil="true" /> <LastUpdatedDateFromUtc i:nil="true" /> <LastUpdatedDateUntilUtc i:nil="true" /> <Name i:nil="true" /> <PageIndex>0</PageIndex> <PageSize>10</PageSize> </CustomersFilterPost>
Response Information
Resource Description
HttpStatusCode 200 OK or 400 BadRequest with Message.
GetCustomersResultName | Description | Type | Additional information |
---|---|---|---|
PagedCustomers |
A page with Customer rows. |
CustomerRow |
None. |
Response Formats
application/json, text/json
Sample:
{ "PagedCustomers": { "PageIndex": 0, "PageSize": 10, "TotalItems": 1, "TotalPages": 1, "Items": [ { "Id": 1, "Name": "Company Ltd.", "Location": "", "Disabled": false, "FieldData": null, "LastUpdatedUtc": null, "CustomerGroups": [ { "Id": 1, "Name": "VIP", "Color": "#ffffff", "Description": "Our best customers" } ], "Tags": [ { "Id": 1, "Name": "Sample tag", "Static": true, "Color": "#ffffff", "Type": 2 }, { "Id": 2, "Name": "Sample 2", "Static": true, "Color": "#fafafa", "Type": 2 } ], "ExternalId": null } ] } }
application/xml, text/xml
Sample:
<GetCustomersResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.Results"> <PagedCustomers> <Items> <GetCustomersResult.CustomerRow> <CustomerGroups xmlns:d5p1="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.DataStructures"> <d5p1:CustomerGroupData> <d5p1:Color>#ffffff</d5p1:Color> <d5p1:Description>Our best customers</d5p1:Description> <d5p1:Id>1</d5p1:Id> <d5p1:Name>VIP</d5p1:Name> </d5p1:CustomerGroupData> </CustomerGroups> <Disabled>false</Disabled> <ExternalId i:nil="true" /> <FieldData xmlns:d5p1="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.DataStructures" i:nil="true" /> <Id>1</Id> <LastUpdatedUtc i:nil="true" /> <Location></Location> <Name>Company Ltd.</Name> <Tags xmlns:d5p1="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.DataStructures"> <d5p1:TagData> <d5p1:Color>#ffffff</d5p1:Color> <d5p1:Id>1</d5p1:Id> <d5p1:Name>Sample tag</d5p1:Name> <d5p1:Static>true</d5p1:Static> <d5p1:Type>UserAndCompany</d5p1:Type> </d5p1:TagData> <d5p1:TagData> <d5p1:Color>#fafafa</d5p1:Color> <d5p1:Id>2</d5p1:Id> <d5p1:Name>Sample 2</d5p1:Name> <d5p1:Static>true</d5p1:Static> <d5p1:Type>UserAndCompany</d5p1:Type> </d5p1:TagData> </Tags> </GetCustomersResult.CustomerRow> </Items> <PageIndex>0</PageIndex> <PageSize>10</PageSize> <TotalItems>1</TotalItems> <TotalPages>1</TotalPages> </PagedCustomers> </GetCustomersResult>