SearchAdapter Web Services

<back to all web services

PersonSearch

The following routes are available for this service:
GET/personSearch for persons
Search Parameters:
NameParameterData TypeRequiredDescription
QueryStringbodystringNo
ReturnAllContactPointsbodyboolNo
Rowsbodyint?No
Offsetbodyint?No
FiltersbodyList<string>No
FacetsbodyList<string>No
FieldsbodyList<string>No
SortBybodyList<string>No
ProfilebodystringNo
PersonSearchResponse Parameters:
NameParameterData TypeRequiredDescription
HitsbodyList<PersonHit>No
SearchResponseBase Parameters:
NameParameterData TypeRequiredDescription
QueryTimeMilliSecondsbodyintNo
NumberOfHitsbodylongNo
ResponseStatusbodyResponseStatusNo
VersionbodystringNo
FacetsbodyList<Facet>No
ProfilebodystringNo
PersonHit Parameters:
NameParameterData TypeRequiredDescription
ScorebodydoubleNo
PersonbodyPersonNo
ReservedbodyboolNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /xml/reply/PersonSearch HTTP/1.1 
Host: api-dev.1881.no 
Content-Type: application/xml
Content-Length: length

<PersonSearch xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/O1881.SearchAdapter.ServiceModel">
  <Facets xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </Facets>
  <Fields xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </Fields>
  <Filters xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </Filters>
  <Offset>0</Offset>
  <Profile>String</Profile>
  <QueryString>String</QueryString>
  <ReturnAllContactPoints>false</ReturnAllContactPoints>
  <Rows>0</Rows>
  <SortBy xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </SortBy>
</PersonSearch>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<PersonSearchResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/O1881.SearchAdapter.ServiceModel">
  <Facets>
    <Facet>
      <Type>String</Type>
      <Values>
        <FacetValue>
          <Count>0</Count>
          <FilterValue>String</FilterValue>
          <Value>String</Value>
        </FacetValue>
      </Values>
    </Facet>
  </Facets>
  <NumberOfHits>0</NumberOfHits>
  <Profile>String</Profile>
  <QueryTimeMilliSeconds>0</QueryTimeMilliSeconds>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
      </d2p1:ResponseError>
    </d2p1:Errors>
  </ResponseStatus>
  <Version>String</Version>
  <Hits>
    <PersonHit>
      <Person>
        <Birthdate>0001-01-01T00:00:00</Birthdate>
        <ContactPoints>
          <ContactPoint>
            <Label>String</Label>
            <Name>String</Name>
            <Type>String</Type>
            <Value>String</Value>
            <Values>
              <KeyValue>
                <Key>String</Key>
                <Type>String</Type>
                <Value>String</Value>
              </KeyValue>
            </Values>
          </ContactPoint>
        </ContactPoints>
        <Firstname>String</Firstname>
        <Gender>String</Gender>
        <Groups>
          <Group>
            <Id>0</Id>
            <IsMainGroup>false</IsMainGroup>
            <TopNode>
              <Children>
                <GroupMember>
                  <Children>
                    <GroupMember>
                      <Children>
                        <GroupMember i:nil="true" />
                      </Children>
                      <ContactPoint>
                        <Label>String</Label>
                        <Name>String</Name>
                        <Type>String</Type>
                        <Value>String</Value>
                        <Values>
                          <KeyValue>
                            <Key>String</Key>
                            <Type>String</Type>
                            <Value>String</Value>
                          </KeyValue>
                        </Values>
                      </ContactPoint>
                    </GroupMember>
                  </Children>
                  <ContactPoint>
                    <Label>String</Label>
                    <Name>String</Name>
                    <Type>String</Type>
                    <Value>String</Value>
                    <Values>
                      <KeyValue>
                        <Key>String</Key>
                        <Type>String</Type>
                        <Value>String</Value>
                      </KeyValue>
                    </Values>
                  </ContactPoint>
                </GroupMember>
              </Children>
              <ContactPoint>
                <Label>String</Label>
                <Name>String</Name>
                <Type>String</Type>
                <Value>String</Value>
                <Values>
                  <KeyValue>
                    <Key>String</Key>
                    <Type>String</Type>
                    <Value>String</Value>
                  </KeyValue>
                </Values>
              </ContactPoint>
            </TopNode>
          </Group>
        </Groups>
        <Id>String</Id>
        <Lastname>String</Lastname>
        <Middlename>String</Middlename>
        <PostalAddress>
          <Number>String</Number>
          <PostOffice>String</PostOffice>
          <PostalArea>String</PostalArea>
          <PostalCode>String</PostalCode>
          <PostalCountry>String</PostalCountry>
          <Value>String</Value>
        </PostalAddress>
        <Relations>
          <Relation>
            <Direction>String</Direction>
            <Id>String</Id>
            <Name>String</Name>
            <Target>
              <HasLink>false</HasLink>
              <Id>String</Id>
              <Type>String</Type>
              <Values>
                <KeyValue>
                  <Key>String</Key>
                  <Type>String</Type>
                  <Value>String</Value>
                </KeyValue>
              </Values>
            </Target>
            <Type>String</Type>
            <Values>
              <KeyValue>
                <Key>String</Key>
                <Type>String</Type>
                <Value>String</Value>
              </KeyValue>
            </Values>
          </Relation>
        </Relations>
        <StreetAddress>
          <AddressText>String</AddressText>
          <CityArea>String</CityArea>
          <CitySector>String</CitySector>
          <Coordinate>
            <Latitude>0</Latitude>
            <Longitude>0</Longitude>
          </Coordinate>
          <Country>String</Country>
          <County>String</County>
          <HouseLetter>String</HouseLetter>
          <HouseNumber>String</HouseNumber>
          <Municipality>String</Municipality>
          <MunicipalityCode>String</MunicipalityCode>
          <PostalArea>String</PostalArea>
          <PostalCode>String</PostalCode>
          <Region>String</Region>
          <StreetName>String</StreetName>
          <TradeArea>String</TradeArea>
          <TradeAreaId>0</TradeAreaId>
          <Values>
            <KeyValue>
              <Key>String</Key>
              <Type>String</Type>
              <Value>String</Value>
            </KeyValue>
          </Values>
        </StreetAddress>
        <Values>
          <KeyValue>
            <Key>String</Key>
            <Type>String</Type>
            <Value>String</Value>
          </KeyValue>
        </Values>
      </Person>
      <Reserved>false</Reserved>
      <Score>0</Score>
    </PersonHit>
  </Hits>
</PersonSearchResponse>