Søk

Søk benyttes når du ønsker å finne Digipost brukere basert på et søkestreng. Endepunktet returnerer opp til 10 søketreff.

Search 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.

Det er veldig viktig å merke at søkeresultatene som Digipost leverer tilbake inkluderer ikke nødvendigvis den personen du ønsker å sende til. Resultatet er bare treff basert på søkestrengen. Det gjelder også hvis dette endepunktet returnerer bare ett treff. Bruk av dette endepunktet forutsetter derfor en mennekelig vurdering av resultatet på søket før den faktiske utsendelsen utføres (typisk i et sluttbrukergrensesnitt i avsenders system). Hvis formålet er en 100% maskinell flyt fra avsenders perspektiv må endepunktet Identify recipient benyttes.

It is very important to note that the search results returned do not necessarily include the actual person you are looking 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 Indentify recipient endpoint should be used.

Endepunkt

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>

Et treff på en virksomhet vil resultere i følgende:

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>

Kommentarer

Additional comments