POST v1/contacts/search

Search for available contacts using the search filters.

Request Information

URI Parameters

None.

Body Parameters

ContactSearchParameters
NameDescriptionTypeAdditional information
Name

string

None.

Email

string

None.

Phone

string

None.

AccountName

Name of a customer or vendor to which the contacts should be associated to. This will do a like search on customer and vendor name.

string

None.

Active

Value can be True, False or Null. Passing Null will return both active and inactive contacts. Default Value is Null.

boolean

None.

DateCreatedRange

The date and time (in company time zone) when the contact was created.

DateRange

None.

LastUpdatedDateRange

The date and time (in company time zone) when the contact was last updated.

DateRange

None.

PageIndex

zero-based page number

integer

None.

PageSize

Default value is 100

integer

Range: inclusive between 1 and 1000

SortExpression

Specify the field name to sort the result set by. It can be one of the fields returned by the search.

string

None.

SortOrder

Specify Sort Order. Ascending=1, Descending=2. Default value is 1 (Ascending)

integer

Range: inclusive between 1 and 2

Request Formats

application/json, text/json

Sample:
{
  "name": "sample string 1",
  "email": "sample string 2",
  "phone": "sample string 3",
  "accountName": "sample string 4",
  "active": true,
  "dateCreatedRange": null,
  "lastUpdatedDateRange": null,
  "pageIndex": 5,
  "pageSize": 6,
  "sortExpression": "sample string 7",
  "sortOrder": 8
}

application/xml, text/xml

Sample:
<ContactSearchParameters xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models.CRM">
  <PageIndex xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models">5</PageIndex>
  <PageSize xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models">6</PageSize>
  <SortExpression xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models">sample string 7</SortExpression>
  <SortOrder xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models">8</SortOrder>
  <AccountName>sample string 4</AccountName>
  <Active>true</Active>
  <DateCreatedRange xmlns:d2p1="http://schemas.datacontract.org/2004/07/BAPI.Models" i:nil="true" />
  <Email>sample string 2</Email>
  <LastUpdatedDateRange xmlns:d2p1="http://schemas.datacontract.org/2004/07/BAPI.Models" i:nil="true" />
  <Name>sample string 1</Name>
  <Phone>sample string 3</Phone>
</ContactSearchParameters>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

SearchResultOfContactSearchResult
NameDescriptionTypeAdditional information
TotalCount

integer

None.

Data

Collection of ContactSearchResult

None.

Response Formats

application/json, text/json

Sample:
{
  "totalCount": 1,
  "data": [
    {
      "id": 1,
      "firstName": "sample string 2",
      "lastName": "sample string 3",
      "dateCreated": "2024-04-25T08:55:27.0359046-04:00",
      "lastUpdatedDate": "2024-04-25T08:55:27.0359046-04:00",
      "active": true
    },
    {
      "id": 1,
      "firstName": "sample string 2",
      "lastName": "sample string 3",
      "dateCreated": "2024-04-25T08:55:27.0359046-04:00",
      "lastUpdatedDate": "2024-04-25T08:55:27.0359046-04:00",
      "active": true
    }
  ]
}

application/xml, text/xml

Sample:
<SearchResultOfContactSearchResultJSBqjE6T xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models">
  <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/BAPI.Models.CRM">
    <d2p1:ContactSearchResult>
      <d2p1:Active>true</d2p1:Active>
      <d2p1:DateCreated>2024-04-25T08:55:27.0359046-04:00</d2p1:DateCreated>
      <d2p1:FirstName>sample string 2</d2p1:FirstName>
      <d2p1:Id>1</d2p1:Id>
      <d2p1:LastName>sample string 3</d2p1:LastName>
      <d2p1:LastUpdatedDate>2024-04-25T08:55:27.0359046-04:00</d2p1:LastUpdatedDate>
    </d2p1:ContactSearchResult>
    <d2p1:ContactSearchResult>
      <d2p1:Active>true</d2p1:Active>
      <d2p1:DateCreated>2024-04-25T08:55:27.0359046-04:00</d2p1:DateCreated>
      <d2p1:FirstName>sample string 2</d2p1:FirstName>
      <d2p1:Id>1</d2p1:Id>
      <d2p1:LastName>sample string 3</d2p1:LastName>
      <d2p1:LastUpdatedDate>2024-04-25T08:55:27.0359046-04:00</d2p1:LastUpdatedDate>
    </d2p1:ContactSearchResult>
  </Data>
  <TotalCount>1</TotalCount>
</SearchResultOfContactSearchResultJSBqjE6T>