API: Job/Retrieve

Summary

Fetches the postal address of a given sedamo address code or an e-mail address.

URL

https://api.sedamo.info/2.0/job/retrieve

Authentication

Required

Parameters
Response

★ = These data are always given. All other are optional or can be empty string “” or null.

Example call
sedamo_api_method_job_retrieve.php
<?php
$data = array(
     'format' => "JSON",
     'apikey' => "TestTestTestTestTestTestTestTestTestTest",
     'title' => "Mr",
     'addrline1' => "ATTN Mr John Doe",
     'addrline2' => "ACME Ltd",
     'sedamo' => "ABCDEFGH",
     'flagairmail'  => 1,
     'flagregistered'  => 0
);
 
$url = "https://api.sedamo.info/2.0/job/retrieve?" . http_build_query($data);
$json = file_get_contents($url);
$json_array = json_decode($json, true);  // 2nd parameter "true": returns result as an array 
var_dump($json_array);  // shows array 

Example with a given e-mail address, the recipient's data have been added where available.

Example of a returned JSON object:

{
    "sedamo":"ABCDEFGH",
    "nameline1":"Frau Maria Muster",
    "nameline2":"c/o Sprachschule Beispiel",
    "sex":"female",
    "birthday":"2007-06-05",
    "phone":"49203088668811",
    "mobile":"8612088668811",
    "fax":null,
    "language":"de",
    "addtype":"home",
    "addline1LATIN":"Jose-Mamon-Gebaeude",
    "addline1NATIVE":"José-Mâmon-Gebäude",
    "addline2LATIN":"",
    "addline2NATIVE":"",
    "streetLATIN":"Gefaellige-Muster-Strasse",
    "streetNATIVE":"Gefällige-Muster-Straße",
    "housenoLATIN":"56a",
    "housenoNATIVE":"56a",
    "districtLATIN":"Altstadt",
    "districtNATIVE":"Altstadt",
    "postcodeLATIN":"12345",
    "postcodeNATIVE":"12345",
    "cityLATIN":"Duesseldorf",
    "cityNATIVE":"Düsseldorf",
    "provinceLATIN":"Nordrhein-Westfalen",
    "provinceNATIVE":"Nordrhein-Westfalen",
    "countryISO2":"DE",
    "countryISO3":"DEU",
    "countryENGLISH":"Germany",
    "countryFRENCH":"Allemagne",
    "countryFRENCHcap":"ALLEMAGNE",
    "countryNATIVE":"Deutschland",
    "countryDIALLINGCODE":"49",
    "comment":"",
    "latitude":"171.2182748",
    "longitude":"66.7823445",
    "address_native":"Frau Maria Muster⏎c/o Sprachschule Beispiel⏎José-Mâmon-Gebäude⏎Altstadt⏎Gefällige-Muster-Straße 56a⏎12345 Düsseldorf⏎Germany⏎ALLEMAGNE",
    "address_latin":"Frau Maria Muster⏎c/o Sprachschule Beispiel⏎Jose-Mamon-Gebaeude⏎Altstadt⏎Gefaellige-Muster-Strasse 56a⏎12345 Duesseldorf⏎Germany⏎ALLEMAGNE",
    "var":"session::1a6b",
    "tracer":"recorded08",
    "status": "ok",
    "lastchanged": "2035-12-31 12:33:00"
}

Example of a returned XML string:

<?xml version="1.0" encoding="UTF-8"?>
<sedamo>
     <status>ok</status>
     <sedamo>ABCDEFGH</sedamo>
     <nameline1>Frau Maria Muster</nameline1>
     <nameline2>c/o Sprachschule Beispiel</nameline2>
     <sex>female</sex>
     <birthday>2007-06-05</birthday>
     <phone>49203088668811</phone>
     <mobile>8612088668811</mobile>
     <fax></fax>
     <language>de</language>
     <addtype>home</addtype>
     <addline1LATIN>Jose-Mamon-Gebaeude</addline1LATIN>
     <addline1NATIVE>José-Mâmon-Gebäude</addline1NATIVE>
     <addline2LATIN></addline2LATIN>
     <addline2NATIVE></addline2NATIVE>
     <streetLATIN>Gefaellige-Muster-Strasse</streetLATIN>
     <streetNATIVE>Gefällige-Muster-Straße</streetNATIVE>
     <housenoLATIN>56a</housenoLATIN>
     <housenoNATIVE>56a</housenoNATIVE>
     <districtLATIN>Altstadt</districtLATIN>
     <districtNATIVE>Altstadt</districtNATIVE>
     <postcodeLATIN>12345</postcodeLATIN>
     <postcodeNATIVE>12345</postcodeNATIVE>
     <cityLATIN>Duesseldorf</cityLATIN>
     <cityNATIVE>Düsseldorf</cityNATIVE>
     <provinceLATIN>Nordrhein-Westfalen</provinceLATIN>
     <provinceNATIVE>Nordrhein-Westfalen</provinceNATIVE>
     <countryISO2>DE</countryISO2>
     <countryISO3>DEU</countryISO3>
     <countryENGLISH>Germany</countryENGLISH>
     <countryFRENCH>Allemagne</countryFRENCH>
     <countryFRENCHcap>ALLEMAGNE</countryFRENCHcap>
     <countryNATIVE>Deutschland</countryNATIVE>
     <countryDIALLINGCODE>49</countryDIALLINGCODE>
     <comment></comment>
     <latitude>171.2182748</latitude>
     <longitude>66.7823445</longitude>
     <address_native>Frau Maria Muster⏎c/o Sprachschule Beispiel⏎José-Mâmon-Gebäude⏎Altstadt⏎Gefällige-Muster-Straße 56a⏎12345 Düsseldorf⏎Germany⏎ALLEMAGNE</address_native>
     <address_latin>Frau Maria Muster⏎c/o Sprachschule Beispiel⏎Jose-Mamon-Gebaeude⏎Altstadt⏎Gefaellige-Muster-Strasse 56a⏎12345 Duesseldorf⏎Germany⏎ALLEMAGNE</address_latin>
     <var>session::1a6b</var>
     <tracer>recorded08</tracer>
     <status>ok</status>
    <lastchanged>2035-12-31 12:33:00</lastchanged>
</sedamo>

Back to sedamo API start page

1)
The 1st address line might be set if e-mail is used to retrieve the address, e.g. filled with the name of the receiver. Can be overwritten.
2)
The 2nd address line might be set if e-mail is used to retrieve the address, e.g. filled with the name of the receiver. Can be overwritten.