Search

The Search endpoint should be used when you wish to find a Digipost user based on a query string. The search endpoint will return up to 10 search results.

The search results returned do not necessarily include the actual person you are searching for. The search results are only based on the actual query string being used. This is also true when the search result includes only one person. This endpoint must be supplemented with a human check of whether the returned results include the actual person that is being searched for. This must be done before digital mail is sent and is typically done in the application/system where the integration is implemented. If the goal is to implement a 100% automatic workflow, then the Identify recipient endpoint should be used.

Endpoint

https://api.digipost.no/recipients/search

Verb

HTTP GET

Request

https://api.digipost.no/recipients/search/{input}

Response

200
Content-Type: application/vnd.digipost-v8+xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<recipients xmlns="http://api.digipost.no/schema/v8">
    <recipient>
        <firstname>OLA</firstname>
        <middlename></middlename>
        <lastname>NORDMAN</lastname>
        <digipost-address>ola.nordmann#1234</digipost-address>
        <mobile-number>*****527</mobile-number>
        <address>
            <street>BURMAVEIEN</street>
            <house-number>100</house-number>
            <house-letter>A</house-letter>
            <additional-addressline></additional-addressline>
            <zip-code>9170</zip-code>
            <city>LONGYEARBYEN</city>
        </address>
        <link rel="https://api.digipost.no/relations/self"
              uri="https://api.digipost.no/recipients/ola.nordmann#1234"
              media-type="application/vnd.digipost-v8+xml"/>
    </recipient>
    <link rel="https://api.digipost.no/relations/self" uri="https://api.digipost.no/recipients/search/ola+nordmann"
          media-type="application/vnd.digipost-v8+xml"/>
</recipients>

An organisation will be included in the response in the following manner:

200
Content-Type: application/vnd.digipost-v8+xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<recipients xmlns="http://api.digipost.no/schema/v8">
    <recipient>
        <digipost-address>min.bedrift#1234</digipost-address>
        <mobile-number>*****638</mobile-number>
        <organisation-number>123456789</organisation-number>
        <organisation-name>Min Bedrift</organisation-name>
        <link rel="https://api.digipost.no/relations/self"
              uri="https://api.digipost.no/recipients/min.bedrift#1234"
              media-type="application/vnd.digipost-v8+xml"/>
    </recipient>
    <link rel="https://api.digipost.no/relations/self" uri="https://api.digipost.no/recipients/search/min+bedrift"
          media-type="application/vnd.digipost-v8+xml"/>
</recipients>

Additional Comments

  • The person’s Digipost-address should be used as identification when sending digital mail. The other information is included in the response to help you verify that the Digipost user returned is actually the person you are searching for.
  • An example search query string is “ola+nordmann+burmaveien+longyearbyen”