NAV
Shell JavaScript Python PHP GO C# Java Object-C

DAO API v1.0.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Protocol for dao parcelservice

Version 130
Effective since 13-03-2025

All records will be filled if status=OK.

That means if there are no registrations at the time of TrackNTrace response, then the “result” will contain an empty array []. In case of status=”Fejl” the errortext must be set.

All Textfields are UTF-8 encoded.

History:

Version Description
Changes in 130 daoDirekte/leveringsordre.php: Added new response field "jobaddressno" daoDirekte/ShoptildirekteLeveringsordre.php: Added new response field "jobaddressno" daoDirekte/hometohomeorder.php: Added new response field "jobaddressno"
Changes in 129 Track & Trace: Added note about differences in daoHOME and daoSHOP events being displayed
Changes in 128 daoGLOBAL: specification of which countries demands a phone number
Changes in 127 daoGLOBAL added
Changes in 126 daoSHOP request added response “afstand_direkte”, “afstand_minutter”, “position_from_postal”
Changes in 125 createclaim: Used to create a claim case with dao.
Changes in 124 TrackNTrace_V1: Deprecated.
TrackNTrace_V2: Identical to V1 but including shopid in the response for token calls.
Changes in 123 TrackNTrace_V1: Added field for external tracking links for international deliveries.
Changes in 122 Added field in c2cindleveringsordre.php and ShoptildirekteLeveringsOrdre.php. Sender notification can be disabled .
Changes in 121 Added response field in TrackNTrace_V1.php to show which type of event the package has received (Shop/Home/Natxpress)
Changes in 120 Added parameters for sender information to all products
Changes in 119 Logo changes and reworded description of return label
Changes in 118 DAOPakkeshop/leveringsordre.php: Added parameter ”Priority” (not required).
Changes in 117 TrackNTrace_V1.php: Added parameter for language. Takes either DA or EN, not required, defaults to DA
Changes in 116 DAOPakkeshop/ReturOrdre.php: New field “Faktura” – Reference. Not mandatory.
Changes in 115 HentLabel.php: New selections for choice of label format – ”100x150p” for portrait orientation and ”100x150l” for landscape orientation.

Base URLs:

Authentication

Claim

Create claim

Code samples

# You can also use wget
curl -X GET https://{{baseurlapi}}/createclaim.php \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://{{baseurlapi}}/createclaim.php',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://{{baseurlapi}}/createclaim.php', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://{{baseurlapi}}/createclaim.php', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{{baseurlapi}}/createclaim.php", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "https://{{baseurlapi}}/createclaim.php";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

URL obj = new URL("https://{{baseurlapi}}/createclaim.php");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /createclaim.php

Called when you want to create a claim with dao.

Fields in the request:

Parameter Description
kundeid Customer ID at dao
kode Issued password for dao’s parcel-api
type Lost or damaged
(“bortkommet” / “beskadiget”)
stregkode The barcode that you want to create a claim for
referencenr Your optional reference nummer
pris Price of the parcel.
format JSON, XML or CSV. Default JSON

Response:

json:

{
⠀⠀"status": ”OK”,                            // ”OK” or ”FEJL”
⠀⠀​​”fejlkode”: ””,                              // N3 – Error-code if ”FEJL”
⠀⠀”fejltekst”: ””,                              // A80 – Error-description if ”FEJL”
}

Parameters

Name In Type Required Description
kundeid query string false Blah
kode query string false none
type query string false none
referencenr query integer false none
stregkode query integer false none
pris query integer false none
format query string false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Contact information

Update Contactinformation

Code samples

# You can also use wget
curl -X GET https://{{baseurlapi}}/DAOPakkeshop/OpdaterKontaktOplysning.php \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://{{baseurlapi}}/DAOPakkeshop/OpdaterKontaktOplysning.php',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://{{baseurlapi}}/DAOPakkeshop/OpdaterKontaktOplysning.php', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://{{baseurlapi}}/DAOPakkeshop/OpdaterKontaktOplysning.php', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{{baseurlapi}}/DAOPakkeshop/OpdaterKontaktOplysning.php", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "https://{{baseurlapi}}/DAOPakkeshop/OpdaterKontaktOplysning.php";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

URL obj = new URL("https://{{baseurlapi}}/DAOPakkeshop/OpdaterKontaktOplysning.php");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /DAOPakkeshop/OpdaterKontaktOplysning.php

Called if recipient has set a wrong email/mobile-number and these are to be updated.

If email/sms notification regarding parcel pickup has been sent prior to this call, another notification will be send.

Fields in the request:

Parameter Description
kundeid Customer ID at dao
kode Issued password for dao’s parcel-api
stregkode Barcode for parcel to be updated
mobil Recipient corrected mobile
email Recipient corrected email
format JSON, XML or CSV. Default JSON

Response:

{
⠀⠀"status": ”OK”,                            // ”OK” or ”FEJL”
⠀⠀​​”fejlkode”: ””,                              // N3 – Error-code if ”FEJL”
⠀⠀”fejltekst”: ””,                              // A80 – Error-description if ”FEJL”
}

Parameters

Name In Type Required Description
kundeid query string false none
kode query string false none
stregkode query integer false none
mobil query integer false none
email query string false none
format query string false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

daoHOME

daoHOME request

Code samples

# You can also use wget
curl -X GET https://{{baseurlapi}}/DAODirekte/LeveringsForespoergsel.php \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://{{baseurlapi}}/DAODirekte/LeveringsForespoergsel.php',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://{{baseurlapi}}/DAODirekte/LeveringsForespoergsel.php', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://{{baseurlapi}}/DAODirekte/LeveringsForespoergsel.php', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{{baseurlapi}}/DAODirekte/LeveringsForespoergsel.php", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "https://{{baseurlapi}}/DAODirekte/LeveringsForespoergsel.php";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

URL obj = new URL("https://{{baseurlapi}}/DAODirekte/LeveringsForespoergsel.php");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /DAODirekte/LeveringsForespoergsel.php

Called when info about a home delivery via daoHOME is wanted.

Fields in the request:

Parameter Description
kundeid Customer ID at dao
kode Issued password for dao’s parcel-api
postnr DK zip-code of recipient address. May include nation-code (ISO 3166-1 Alfa 2, default DK)
adresse Recipient address. str max45
dato Delivery date – default tomorrow or 18:00 the day after tomorrow.

If date is less than default, the default is used. ETA moved to the next scheduled delivery date.

If sameday is 1 then default is today or after 17:00 tomorrow.
sameday Same day delivery. 0 or 1. Default 0
format JSON, XML. Default JSON

Response:

{
⠀⠀"status": ”OK”,⠀⠀⠀⠀⠀⠀ // ”OK” or ”FEJL”
⠀⠀”fejlkode”: ””,⠀⠀⠀⠀⠀⠀⠀// N3 - Error-code if ”FEJL”
⠀⠀”fejltekst”: ””,⠀⠀⠀⠀⠀⠀    // A80 – Error-description if ”FEJL”
⠀⠀"resultat": {
⠀⠀⠀⠀⠀⠀”udsortering” : ”E”⠀⠀⠀⠀⠀⠀   // A3 – Code for sorting
⠀⠀⠀⠀⠀⠀”labelTekst1” : ”76201”⠀⠀⠀ // A20 – Text for label (route/shop)
⠀⠀⠀⠀⠀⠀”labelTekst2” : ”5432345”⠀   // A20 – Text for label (route-designation)
⠀⠀⠀⠀⠀⠀”ETA” : ”2014-08-01 05:40” // A16 – ETA of delivery at customer
⠀⠀}
}

Parameters

Name In Type Required Description
kundeid query string false none
kode query string false none
postnr query integer false none
adresse query string false none
dato query string false none
format query string false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

daoHOME order

Code samples

# You can also use wget
curl -X GET https://{{baseurlapi}}/DAODirekte/leveringsordre.php \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://{{baseurlapi}}/DAODirekte/leveringsordre.php',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://{{baseurlapi}}/DAODirekte/leveringsordre.php', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://{{baseurlapi}}/DAODirekte/leveringsordre.php', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{{baseurlapi}}/DAODirekte/leveringsordre.php", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "https://{{baseurlapi}}/DAODirekte/leveringsordre.php";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

URL obj = new URL("https://{{baseurlapi}}/DAODirekte/leveringsordre.php");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /DAODirekte/leveringsordre.php

Called when placing an order for home-delivery via daoHOME.

Fields in the request:

Parameter Description
kundeid Customer ID at dao (String 45)
kode Issued password for dao’s parcel-api
postnr DK zip code of recipient address. may include nation code (ISO 3166-1 Alfa 2, default DK) (String 45)
adresse Recipient address. (String 45)
navn Recipient name. (String 45)
mobil Recipient mobile number for sms-notification. (String 12)
email Recipient e-mail for mail-notification. (String 60)
dato Scheduled Date of delivery – default tomorrow or after 18:00 the day after tomorrow. Format is YYYY-MM-DD

If dato is less than default, then default is used. ETA will be moved to the next scheduled delivery date.

If sameday is 1 then default is today or after 17:00 tomorrow. (Date)
vaegt Parcel weight in grams. (String 45)
l,h,b Parcel length, height and width respectively. Dimensions expressed in centimeters. (? bliver ikke brugt)
faktura Customer invoice number (String 45)
afsenderid Choice of sender-profile, if the customer has more than one sender profile (Optional)
afsender_navn Parcel sender’s name (Optional)
afsender_adresse Parcel sender’s address (Optional)
afsender_postnr Parcel sender’s zipcode (Optional)
afsender_email Parcel sender’s email (Optional)
afsender_mobil Parcel sender’s phone (Optional)
sameday Same day delivery. 0 or 1. Default 0
test value=1 prevents a new barcode and order lines from being created. Default blank
format JSON, XML. Default JSON

Response:

{
⠀⠀"status": ”OK”,               // ”OK” or ”FEJL”
⠀⠀"fejlkode": ””,                 // N3 - Error-code if ”FEJL”
⠀⠀”fejltekst”: ””,                  // A80 – Error-description if ”FEJL”
⠀⠀"resultat":
⠀⠀{
⠀⠀⠀⠀”stregkode” : ” 00057126960000003016”             // A20 – Barcode for label (GS1-128)
⠀⠀⠀⠀”labelTekst1” : ”76201”                                                         // A20 – Text for label (route/shop)
⠀⠀⠀⠀”labelTekst2” : ”5432345”                                                    // A20 – Text for label (route-designation)
⠀⠀⠀⠀”labelTekst3” : ”5431”                                                          // A7 – Text for label (Control code)
⠀⠀⠀⠀”udsortering” : ”E”                                                                 // A3 – Code used in sorting
⠀⠀⠀⠀”ETA” : ”2014-08-01 05:40”                                               // A16 – ETA for delivery to the customer

”jobdaddressno” : ”181”
⠀⠀}
}

Parameters

Name In Type Required Description
postnr query integer false none
adresse query string false none
navn query string false none
mobil query integer false none
email query string false none
dato query string false none
vaegt query integer false none
l query integer false none
h query integer false none
b query integer false none
faktura query integer false none
format query string false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

daoHOME order POST

Code samples

# You can also use wget
curl -X POST https://{{baseurlapi}}/DAODirekte/leveringsordre.php \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://{{baseurlapi}}/DAODirekte/leveringsordre.php',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.post('https://{{baseurlapi}}/DAODirekte/leveringsordre.php', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://{{baseurlapi}}/DAODirekte/leveringsordre.php', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://{{baseurlapi}}/DAODirekte/leveringsordre.php", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }


    /// Make a dummy request
    public async Task MakePostRequest()
    {
      string url = "https://{{baseurlapi}}/DAODirekte/leveringsordre.php";


      await PostAsync(null, url);

    }

    /// Performs a POST Request
    public async Task PostAsync(undefined content, string url)
    {
        //Serialize Object
        StringContent jsonContent = SerializeObject(content);

        //Execute POST request
        HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
    }



    /// Serialize an object to Json
    private StringContent SerializeObject(undefined content)
    {
        //Serialize Object
        string jsonObject = JsonConvert.SerializeObject(content);

        //Create Json UTF8 String Content
        return new StringContent(jsonObject, Encoding.UTF8, "application/json");
    }

    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

URL obj = new URL("https://{{baseurlapi}}/DAODirekte/leveringsordre.php");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST /DAODirekte/leveringsordre.php

Works the same way as daoHOME order but as a POST with a body instead of GET.
The response is the same.

Body parameter

postnr: "7100"
adresse: Islandsvej 1
navn: Jens Hansen
mobil: "12345678"
email: jens@hansen.xx
dato: 2024-02-22
vaegt: "2100"
l: "34"
h: "5"
b: "20"
faktura: "123456"

Query Params

Parameter Description
format json
kundeid Customer ID at dao
kode Issued password for dao’s parcel-api

Body parameter

Parameters

Name In Type Required Description
format query string false none
kundeid query string false none
kode query string false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

daoSHOP

Change Parcelshop

Code samples

# You can also use wget
curl -X GET https://{{baseurlapi}}/DAOPakkeshop/OpdaterShopid.php \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://{{baseurlapi}}/DAOPakkeshop/OpdaterShopid.php',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://{{baseurlapi}}/DAOPakkeshop/OpdaterShopid.php', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://{{baseurlapi}}/DAOPakkeshop/OpdaterShopid.php', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{{baseurlapi}}/DAOPakkeshop/OpdaterShopid.php", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "https://{{baseurlapi}}/DAOPakkeshop/OpdaterShopid.php";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

URL obj = new URL("https://{{baseurlapi}}/DAOPakkeshop/OpdaterShopid.php");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /DAOPakkeshop/OpdaterShopid.php

To be called if the customer wishes a parcel to be shipped to another parcel-shop than initially stated.

Fileds in the request:

Parameter Description
kundeid Customer ID at dao
kode Issued password for dao’s parcel-api
stregkode Barcode to be updated.
shopid The new shopID for the parcel-shop to ship the parcel to
format JSON, XML or CSV. Default JSON

Response :

{
⠀⠀"status": ”OK”,             // ”OK” or ”FEJL”
⠀⠀”fejlkode”: ””,                 // N3 – Error-code if ”FEJL”
⠀⠀”fejltekst”: ””,                 // A80 – Error-description if ”FEJL”
}

Parameters

Name In Type Required Description
kundeid query string false none
kode query string false none
stregkode query string false none
shopid query integer false none
format query string false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Find daoSHOP

Code samples

# You can also use wget
curl -X GET https://{{baseurlapi}}/DAOPakkeshop/FindPakkeshop.php \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://{{baseurlapi}}/DAOPakkeshop/FindPakkeshop.php',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://{{baseurlapi}}/DAOPakkeshop/FindPakkeshop.php', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://{{baseurlapi}}/DAOPakkeshop/FindPakkeshop.php', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{{baseurlapi}}/DAOPakkeshop/FindPakkeshop.php", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "https://{{baseurlapi}}/DAOPakkeshop/FindPakkeshop.php";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

URL obj = new URL("https://{{baseurlapi}}/DAOPakkeshop/FindPakkeshop.php");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /DAOPakkeshop/FindPakkeshop.php

Call when find daoSHOPs

Fields in the request:

Parameter Description
kundeid Customer ID at dao
kode Issued password for dao’s parcel-api
adresse Recipient address.
Set either postnr and adresse OR shopid.
format JSON or XML. Default is JSON
postnr DK zip-code of recipient address.
(Integer 0000 – 9999)
antal (Optional)

Response:

{
      {
      "status": "OK",             // ”OK” or ”ERROR”
      "fejlkode": "",
      "fejltekst": "",
      "resultat": {
            "pakkeshops": [
                  {
                        "shopId": "12345",
                        "type": "Priority",
                        "navn": "Købmanden ",
                        "adresse": "Skelvangsvej 54",
                        "postnr": "7100",
                        "bynavn": "Vejle",
                        "udsortering": "E",
                        "latitude": "57.4859",
                        "longitude": "11.0155",
                        "afstand": "3.068",
                        "aabningstider": {
                               "man": "07:30 - 21:00",
                               "tir": "07:30 - 21:00",
                               "ons": "07:30 - 21:00",
                               "tor": "07:30 - 21:00",
                               "fre": "07:30 - 21:00",
                               "lor": "07:30 - 21:00",
                               "son": "07:30 - 21:00"
                        },
                       "afstand_direkte": "1.67",
                        "afstand_minutter": "5.35"
                   },...
            "udgangspunkt": {
                   "latitude": 57.431499890000002,
                   "longtide": 9.8205504500000006,
                   "position_from_postal": false
            }
      },
      "antal": 10
}

Parameters

Name In Type Required Description
kundeid query string false none
kode query string false none
adresse query string false none
format query string false none
postnr query integer false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

daoSHOP order

Code samples

# You can also use wget
curl -X GET https://{{baseurlapi}}/DAOPakkeshop/leveringsordre.php \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://{{baseurlapi}}/DAOPakkeshop/leveringsordre.php',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://{{baseurlapi}}/DAOPakkeshop/leveringsordre.php', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://{{baseurlapi}}/DAOPakkeshop/leveringsordre.php', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{{baseurlapi}}/DAOPakkeshop/leveringsordre.php", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "https://{{baseurlapi}}/DAOPakkeshop/leveringsordre.php";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

URL obj = new URL("https://{{baseurlapi}}/DAOPakkeshop/leveringsordre.php");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /DAOPakkeshop/leveringsordre.php

Called when placing an order via daoSHOP.

Fields in the request:

Parameter Description
kundeid Customer ID at dao
kode Issued password for dao’s parcel-api
shopid Destination Parcel-shop ID.
(if 0 is set, DAO will find the nearest parcelshop-id based on recipient address)
postnr DK ZipCode of recipient address. may include nation code (ISO 3166-1 Alfa 2, default DK) (Optional)
adresse Recipients address (Optional)
navn Recipients name
mobil Recipients mobile number for sms-notification
email Recipients e-mail for mail-notification. Mobil and/or email must be set.
dato Date of delivery – default tomorrow. Format: YYYY-MM-DD
vaegt Parcel weight in grams
l,h,b Parcel length, height and width respectively. Dimensions expressed in centimeters.
idkrav Comma separated list of:
Driver’s license, passport, Social security certificate and handover-code.
Default is handovercode (4-digit system generated code send to the recipient).
priority For Priority deliveries. Takes 0 or 1 (Not required)
faktura Customer invoice number
afsenderid Choice of sender-profile, if a sender has multiple profiles (Optional)
afsender_navn Parcel sender’s name (Optional)
afsender_adresse Parcel sender’s address (Optional)
afsender_postnr Parcel sender’s zipcode (Optional)
afsender_email Parcel sender’s email (Optional)
afsender_mobil Parcel sender’s phone (Optional)
test Value=1 prevents a new barcode and order lines from being created. Default blank
format JSON, XML. Default JSON

Response:

{
      "status": ”OK”,                                      // ”OK” or ”FEJL”
      "fejlkode": ””,                                         // N3 - Error-code if ”FEJL”
      ”fejltekst”: ””,                                         // A80 – Error-description if ”FEJL”
      "resultat": {
            ”stregkode” : ” 00057126960000003016”             // A20 – barcode for label (GS1-128)
            ”labelTekst1” : ”76201”                                                         // A20 – Text for label (Route/Shop)
            ”labelTekst2” : ”5432345”                                                // A20 – Text for label (Route Designation)
            ”labelTekst3” : ”424578”                                                     // A7 – Text for label (Control code)
            ”udsortering” : ”E”                                                                     // A3 – Code for sorting
            ”ETA” : ”2014-08-01 07:40”                                              // A16 - ETA of delivery at parcel-shop
      }
}

Parameters

Name In Type Required Description
kundeid query string false none
kode query string false none
shopid query integer false none
postnr query integer false none
adresse query string false none
navn query string false none
mobil query integer false none
email query string false none
dato query string false none
vaegt query integer false none
l query integer false none
h query integer false none
b query integer false none
faktura query integer false none
test query integer false none
format query string false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

SHOP2HOME order

Code samples

# You can also use wget
curl -X GET https://{{baseurlapi}}/DAODirekte/ShoptildirekteLeveringsordre.php \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://{{baseurlapi}}/DAODirekte/ShoptildirekteLeveringsordre.php',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://{{baseurlapi}}/DAODirekte/ShoptildirekteLeveringsordre.php', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://{{baseurlapi}}/DAODirekte/ShoptildirekteLeveringsordre.php', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{{baseurlapi}}/DAODirekte/ShoptildirekteLeveringsordre.php", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "https://{{baseurlapi}}/DAODirekte/ShoptildirekteLeveringsordre.php";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

URL obj = new URL("https://{{baseurlapi}}/DAODirekte/ShoptildirekteLeveringsordre.php");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /DAODirekte/ShoptildirekteLeveringsordre.php

Called when placing an order on a package dropped off in a parcel-shop for home delivery via daoHOME.

Fields in the request:

Parameter Description
kundeid Customer ID at dao
kode Issued password for dao’s parcel-api
postnr DK zip-code of recipient address. may include nation code (ISO 3166-1 Alfa 2, default DK)
adresse Recipient address
navn Recipient name
mobil Recipient mobile number for sms-notification
email Recipient e-mail for mail-notification
afsender Parcel sender’s name
afsender_adresse Parcel sender’s address (Optional)
afsender_postnr Parcel sender’s zipcode (Optional)
afs_mobil Parcel sender’s mobile
afs_email Parcel sender’s email
vaegt Parcel weight in grams.
l,h,b Parcel length, height and width respectively. Dimensions expressed in centimeters.
reference Customer reference
afs_notifikation If set to 0, no notifications are sent to sender (Optional, default 1)
test value=1 prevents a new barcode and order lines from being created. Default blank
format JSON, XML. Default JSON

Response:

{
      "status": ”OK”,                                              // ”OK” or ”FEJL”
      "fejlkode": ””,                                                 // N3 – Error-code if ”FEJL”
      ”fejltekst”: ””,                                                 // A80 – Error-description if ”FEJL”
      "resultat":
      {
            ”stregkode” : ”00057126960000003016”             // A20 – Barcode for label (GS1-128)
            ”labellesskode” : ”123 456 789”        // The code to be written on the parcel by the customer
            ”labelTekst1” : ”76201”                                                           // A20 – Text for label (route)
            ”labelTekst2” : ”5432345”                                                  // A20 – Text for label (route-designation)
            ”labelTekst3” : ”5431”                                                             // A7 – text for label (Control code)
            ”udsortering” : ”E”                                                                       // A3 – code for sorting

”jobdaddressno” : ”181”
      }
}

Parameters

Name In Type Required Description
kundeid query string false none
kode query string false none
postnr query integer false none
adresse query string false none
navn query string false none
mobil query integer false none
email query string false none
afsender query string false none
afs_mobil query integer false none
afs_email query string false none
vaegt query integer false none
l query integer false none
h query integer false none
b query integer false none
faktura query integer false none
format query string false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

SHOP2SHOP order

Code samples

# You can also use wget
curl -X GET https://{{baseurlapi}}/DAOPakkeshop/c2cindleveringsordre.php \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://{{baseurlapi}}/DAOPakkeshop/c2cindleveringsordre.php',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://{{baseurlapi}}/DAOPakkeshop/c2cindleveringsordre.php', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://{{baseurlapi}}/DAOPakkeshop/c2cindleveringsordre.php', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{{baseurlapi}}/DAOPakkeshop/c2cindleveringsordre.php", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "https://{{baseurlapi}}/DAOPakkeshop/c2cindleveringsordre.php";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

URL obj = new URL("https://{{baseurlapi}}/DAOPakkeshop/c2cindleveringsordre.php");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /DAOPakkeshop/c2cindleveringsordre.php

Called when placeing and order for drop-off in daoSHOP for pickup in another daoSHOP.

Fields in the request:

Parameter Description
kundeid Customer ID at dao
kode Issued password for dao’s parcel-api
shopid Destination-parcelshop Id. (if 0 dao will find the nearest parcel-shop base on the recipient address)
postnr DK Zip-code of recipient address. may include nation code (ISO 3166-1 Alfa 2, default DK) (Optional)
adresse Recipient address (Optional)
navn Recipient name.
mobil Recipient mobile number for sms-notification
email Recipient e-mail for mail-notification. Mobile and/or email must be.
afsender Parcel sender’s name.
afsender_adresse Parcel sender’s address (Optional)
afsender_postnr Parcel sender’s zipcode (Optional)
afs_mobil Parcel sender’s mobile
afs_email Parcel sender’s email
vaegt parcel weight in grams
l,h,b Parcel length, height and width respectively. Dimensions expressed in centimeters.
idkrav Comma-separated list of:
Driver’s license, passport, Social security certificate and handover-code.

Default is handovercode (4-digit system generated code send to the recipient).
reference Customer reference.
afs_notifikation If set to 0, no notifications are sent to sender (Optional, default 1)
test value=1 prevents a new barcode and order lines from being created. Default blank
format JSON, XML. Default JSON

Response:

{
      "status": ”OK”,                                                                                         // ”OK” or ”FEJL”
      "fejlkode": ””,                                                                                             // N3 - Error-code if ”FEJL”
      ”fejltekst”: ””,                                                                                             // A80 – Error-description if ”FEJL”
      "resultat":
      {
            ”stregkode” : ” 00057126960000003016”            // A20 – Barcode for label (GS1-128)
            ”labellesskode”: ”123 456 789”                  // Code to be written on the parcel by the customer.
            ”udsortering” : ”E”                                                                        // A3 – code for sorting
      }
}

Parameters

Name In Type Required Description
kundeid query string false none
kode query string false none
shopid query integer false none
postnr query integer false none
adresse query string false none
navn query string false none
mobil query integer false none
email query string false none
afsender query string false none
afs_email query string false none
afs_mobil query integer false none
null query string false none
vaegt query integer false none
l query integer false none
h query integer false none
b query integer false none
faktura query integer false none
test query integer false none
format query string false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

daoSHOP return order

Code samples

# You can also use wget
curl -X GET https://{{baseurlapi}}/DAOPakkeshop/returordre.php \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://{{baseurlapi}}/DAOPakkeshop/returordre.php',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://{{baseurlapi}}/DAOPakkeshop/returordre.php', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://{{baseurlapi}}/DAOPakkeshop/returordre.php', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{{baseurlapi}}/DAOPakkeshop/returordre.php", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "https://{{baseurlapi}}/DAOPakkeshop/returordre.php";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

URL obj = new URL("https://{{baseurlapi}}/DAOPakkeshop/returordre.php");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /DAOPakkeshop/returordre.php

Called when a return-order is placed via daoSHOP

Fields in the request:

Parameter Description
kundeid Customer ID at dao
kode Issued password for dao’s parcel-api
postnr DK Zip-code of recipient address. May include nation code (ISO 3166-1 Alfa 2, default DK)
adresse Recipient address
navn Recipient name
afsender Sender identification
afsender_adresse Parcel sender’s address (Optional)
afsender_postnr Parcel sender’s zipcode (Optional)
afs_mobil Sender mobile number (Optional)
afs_email Sender email (Optional)
type ”labelless” or ”withlabel”.

If “withlabel”, the response will contain the data to be printed on a label.

If ”labelless” the response will also contain the labelless code to be written on the parcel prior to being delivered in a parcelshop.

(Optional, default “labelless”)
test value=1 prevents a new barcode and order lines from being created. Default blank
format JSON, XML. Default JSON
faktura Reference for the parcel

Response:

{
      "status": "OK",                                             // ”OK” or ”FEJL”
      "fejlkode": "",                                                // N3 - Error-code if ”FEJL”
      ”fejltekst”: "",                                                // A80 – Error-description if ”FEJL”
      "resultat":
      {
            ”labellesskode”: ”123 456 789”                                    // The code to be written on the parcel.
            ”stregkode” : ” 00057126960000003016”        // A20 – Barcode for label (GS1-128)
            ”labelTekst1” : ”5431”                                                            // A7 – Text for label (Control code)
      }
}

Parameters

Name In Type Required Description
kundeid query string false none
kode query string false none
postnr query integer false none
adresse query string false none
navn query string false none
afsender query string false none
test query integer false none
type query string false none
format query string false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Shop Info Request

Code samples

# You can also use wget
curl -X GET https://{{baseurlapi}}/DAOPakkeshop/ShopInfoRequest.php \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://{{baseurlapi}}/DAOPakkeshop/ShopInfoRequest.php',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://{{baseurlapi}}/DAOPakkeshop/ShopInfoRequest.php', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://{{baseurlapi}}/DAOPakkeshop/ShopInfoRequest.php', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{{baseurlapi}}/DAOPakkeshop/ShopInfoRequest.php", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "https://{{baseurlapi}}/DAOPakkeshop/ShopInfoRequest.php";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

URL obj = new URL("https://{{baseurlapi}}/DAOPakkeshop/ShopInfoRequest.php");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /DAOPakkeshop/ShopInfoRequest.php

When you need routing information regarding a specific shop. Depending on the date, it will likely be serviced by a different route. If no date is supplied it will default to closest delivery day.

Fields in the request:

Parameter Description
kundeid Customer ID at dao
kode Issued password for dao’s parcel-api
shopid ID of the shop you wish to know about
dato (Optional) Date of expected delivery

Response:

{
      "status": ”OK”,             // ”OK” or ”FEJL”
      ”fejlkode”: ””,                 // N3 – Error-code if ”FEJL”
      ”fejltekst”: ””,                 // A80 – Error-description if ”FEJL”
            "resultat": {
            ”sorting_1” : ”E1”
            ”sorting_2” : ”76201”
            ”sorting_3” : ”5432345”
      }
}

Parameters

Name In Type Required Description
kundeid query string false none
kode query string false none
shopid query integer false none
dato query string false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Label

Label request

Code samples

# You can also use wget
curl -X GET https://{{baseurlapi}}/HentLabel.php \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://{{baseurlapi}}/HentLabel.php',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://{{baseurlapi}}/HentLabel.php', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://{{baseurlapi}}/HentLabel.php', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{{baseurlapi}}/HentLabel.php", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "https://{{baseurlapi}}/HentLabel.php";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

URL obj = new URL("https://{{baseurlapi}}/HentLabel.php");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /HentLabel.php

Called when a label for a parcel is wanted

Fields in the request:

Parameter Description
kundeid Customer ID at dao
kode Issued password for dao’s parcel-api
stregkode Parcel barcode (see delivery order)
papir Label Size.
One of the following sizes:
60x100
100x150
A4Foldable
150x100
100x150l
100x150p
format JSON, XML or CSV. Default JSON

Response if OK:
PDF document

Header content-type is set for ”application/pdf”.

Response if FEJL:

{
      "status": ”FEJL”,        // ”OK” or ”FEJL”
      "fejlkode": ””,                // N3 – Error-code if ”FEJL”
      ”fejltekst”: ””,               // A80 – Error-description if ”FEJL”
}

Parameters

Name In Type Required Description
kundeid query string false none
kode query string false none
stregkode query integer false none
papir query string false none
format query string false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Parcel

Revoke parcel

Code samples

# You can also use wget
curl -X GET https://{{baseurlapi}}/DAOPakkeshop/HjemkaldPakke.php \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://{{baseurlapi}}/DAOPakkeshop/HjemkaldPakke.php',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://{{baseurlapi}}/DAOPakkeshop/HjemkaldPakke.php', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://{{baseurlapi}}/DAOPakkeshop/HjemkaldPakke.php', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{{baseurlapi}}/DAOPakkeshop/HjemkaldPakke.php", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "https://{{baseurlapi}}/DAOPakkeshop/HjemkaldPakke.php";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

URL obj = new URL("https://{{baseurlapi}}/DAOPakkeshop/HjemkaldPakke.php");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /DAOPakkeshop/HjemkaldPakke.php

Called if a parcel is to be revoked from a parcel-shop.

Fields in the request:

Parameter Description
kundeid Customer ID at dao
kode Issued password for dao’s parcel-api
stregkode Barcode for parcel to be updated
format JSON, XML or CSV. Default JSON

Response:

{
      "status": ”OK”,             // ”OK” or ”FEJL”
      ”fejlkode”: ””,                 // N3 – Error-code if ”FEJL”
      ”fejltekst”: ””,                 // A80 – Error-description if ”FEJL”
}

Parameters

Name In Type Required Description
kundeid query string false none
kode query string false none
stregkode query integer false none
format query string false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Cancel parcel data

Code samples

# You can also use wget
curl -X GET https://{{baseurlapi}}/AnnullerePakke.php \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://{{baseurlapi}}/AnnullerePakke.php',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://{{baseurlapi}}/AnnullerePakke.php', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://{{baseurlapi}}/AnnullerePakke.php', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{{baseurlapi}}/AnnullerePakke.php", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "https://{{baseurlapi}}/AnnullerePakke.php";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

URL obj = new URL("https://{{baseurlapi}}/AnnullerePakke.php");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /AnnullerePakke.php

Called when a delivery is to be canceled.

Fields in the request:

Parameter Description
kundeid Customer ID at dao
kode Issued password for dao’s parcel-api
stregkode Barcode to be canceled
format JSON, XML or CSV. Default JSON

Response:

{
      "status": ”OK”,             // ”OK” or ”FEJL”
      ”fejlkode”: ””,                 // N3 – Error-code if ”FEJL”
      ”fejltekst”: ””,                 // A80 – Error-description if ”FEJL”
}

Parameters

Name In Type Required Description
kundeid query integer false none
kode query string false none
stregkode query string false none
format query string false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Set parcel-giver information

Code samples

# You can also use wget
curl -X GET https://{{baseurlapi}}/SetGiverOplysninger.php \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://{{baseurlapi}}/SetGiverOplysninger.php',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://{{baseurlapi}}/SetGiverOplysninger.php', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://{{baseurlapi}}/SetGiverOplysninger.php', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{{baseurlapi}}/SetGiverOplysninger.php", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "https://{{baseurlapi}}/SetGiverOplysninger.php";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

URL obj = new URL("https://{{baseurlapi}}/SetGiverOplysninger.php");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /SetGiverOplysninger.php

If a B2C parcel is send as a gift, it is possible to set gift-givers contact infomation (for sms notification)

Fields in the request:

Parameter Description
kundeid Customer ID at dao
kode Issued password for dao’s parcel-api
stregkode Barcode of the parcel to be send as a gift
navn Parcel-giver’s name
mobil Parcel-giver’s mobile number
email Parcel-giver’s email
format JSON, XML or CSV. Default JSON

Response:

{
      "status": ”OK”,             // ”OK” or ”FEJL”
      ”fejlkode”: ””,                 // N3 – Error-code if ”FEJL”
      ”fejltekst”: ””,                 // A80 – Error-description if ”FEJL”
}

Parameters

Name In Type Required Description
kundeid query string false none
kode query string false none
stregkode query integer false none
navn query string false none
mobil query integer false none
email query string false none
format query string false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Update parcel-weight and dimensions

Code samples

# You can also use wget
curl -X GET https://{{baseurlapi}}/OpdaterVaegt.php \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://{{baseurlapi}}/OpdaterVaegt.php',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://{{baseurlapi}}/OpdaterVaegt.php', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://{{baseurlapi}}/OpdaterVaegt.php', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{{baseurlapi}}/OpdaterVaegt.php", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "https://{{baseurlapi}}/OpdaterVaegt.php";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

URL obj = new URL("https://{{baseurlapi}}/OpdaterVaegt.php");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /OpdaterVaegt.php

Called if the weight of the parcel is only known after packaging. Parcel weight can only be changed prior to parcel being scanned at the first terminal.

Fields in the request:

Parameter Description
kundeid Customer ID at dao
kode Issued password for dao’s parcel-api
stregkode Barcode of the parcel to have its weight/dimensions changed
l,h,b Parcel length, height and width respectively. Dimensions expressed in centimeters.
test value=1 prevents a new barcode and order lines from being created. Default blank
format JSON, XML or CSV. Default JSON

Response:

{
      "status": ”OK”,             // ”OK” or ”FEJL”
      ”fejlkode”: ””,                 // N3 – Error-code if ”FEJL”
      ”fejltekst”: ””,                 // A80 – Error-description if ”FEJL”
}

Parameters

Name In Type Required Description
kundeid query string false none
kode query string false none
stregkode query integer false none
vaegt query integer false none
l query integer false none
h query integer false none
b query integer false none
format query string false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

dao parcels errorcodes

Code samples

# You can also use wget
curl -X GET https://{{baseurlapi}}/FejlKoder.php \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://{{baseurlapi}}/FejlKoder.php',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://{{baseurlapi}}/FejlKoder.php', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://{{baseurlapi}}/FejlKoder.php', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{{baseurlapi}}/FejlKoder.php", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "https://{{baseurlapi}}/FejlKoder.php";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

URL obj = new URL("https://{{baseurlapi}}/FejlKoder.php");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /FejlKoder.php

Called when a complete list of error-codes are wanted.

Fields in the request:

Parameter Description
kundeid Customer ID at dao
kode Issued password for dao’s parcel-api
format JSON, XML or CSV. Default JSON

Response:

{
      "status": ”OK”,                                     // ”OK” or ”FEJL”
      ”fejlkode”: ””,                                         // N3 – Error-code if ”FEJL”
      ”fejltekst”: ””,                                        // A80 – Error-description if ”FEJL”
      "resultat":
      [
            {
                  ”fejlkode” : ”1”                                             // N3 – The Error-Code
                  ”fejltekst” : ”Vej ikke fundet”       // A80 – Description of the error
            },…
      ]
}

Parameters

Name In Type Required Description
kundeid query string false none
kode query string false none
format query string false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

daoGLOBAL

Version 107

Effectuated as of 18-09-2018

Changelog:

Version Description
106 DAODirekte/UdlandLeveringsOrdre: International barcode is now in response
105 DAODirekte/UdlandLeveringsOrdre: Recipient email now mandatory
104 DAODirekte/UdlandLeveringsOrdre: Zip and nation codes separated into two fields.
103 DAODirekte/UdlandLeveringsOrdre: new Call. Called when placing an order for a home-delivery outside Denmark.

daoGLOBAL

Code samples

# You can also use wget
curl -X GET https://{{baseurlapi}}/DAODirekte/UdlandLeveringsOrdre.php \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://{{baseurlapi}}/DAODirekte/UdlandLeveringsOrdre.php',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://{{baseurlapi}}/DAODirekte/UdlandLeveringsOrdre.php', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://{{baseurlapi}}/DAODirekte/UdlandLeveringsOrdre.php', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{{baseurlapi}}/DAODirekte/UdlandLeveringsOrdre.php", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "https://{{baseurlapi}}/DAODirekte/UdlandLeveringsOrdre.php";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

URL obj = new URL("https://{{baseurlapi}}/DAODirekte/UdlandLeveringsOrdre.php");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /DAODirekte/UdlandLeveringsOrdre.php

Called when placing a delivery-order addressed to a recipient outside Denmark.

Fields in the request:

Parameter Description
kundeid Customer id at DAO
kode Issued password for DAO’s Parcel API
land Recipient nation code (ISO 3166-1 Alfa 2)
postnr Zip code for recipient’s address, excluding nation code (ISO 3166-1 Alfa 2)
by Parcel recipient’s City name
adresse Parcel recipient’s Address
navn Parcel recipient’s name
mobil (Optional)
Parcel recipient’s mobile number for SMS-notifications
email Parcel recipient’s e-mail address for mail-Notifications
dato Date of Delivery – default
If date is less than default, the default is used. ETA will be moved to the next scheduled Delivery day.
vaegt Parcel Weight in grams
l,h,b Respectively Length, Height and width, of the parcel in centimeters
reference Customer Reference
afsenderid (Optional)
Choice of sender profile, in case a customer has more than one sender profile.
test (Optional)
if 1, no order will be created but a realistic response is still given.
format JSON, XML. Default JSON

Response:

{
      "status" : "OK",                       // "OK" or "FEJL"(Error)
      "fejlkode" : "",                          // N3 - Error code if "FEJL"
      "fejltekst" : "",                         // A80 – Error Description if "FEJL"
      "resultat" : {
            "stregkode" : "00057126960000003016"             // A20 – Customer’s Barcode
      }
}

Parameters

Name In Type Required Description
kundeid query string false none
kode query string false none
postnr query string false none
adresse query string false none
navn query string false none
afsender query string false none
afs_mobil query integer false none
afs_email query string false none
dist query integer false none
vaegt query integer false none
l query integer false none
h query integer false none
b query integer false none
referance query integer false none
format query string false none
test query integer false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

DAO TRANSIT-ORDRE

Code samples

# You can also use wget
curl -X GET https://{{baseurlapi}}/DAOTransit/TransitOrdre.php \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://{{baseurlapi}}/DAOTransit/TransitOrdre.php',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://{{baseurlapi}}/DAOTransit/TransitOrdre.php', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://{{baseurlapi}}/DAOTransit/TransitOrdre.php', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{{baseurlapi}}/DAOTransit/TransitOrdre.php", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "https://{{baseurlapi}}/DAOTransit/TransitOrdre.php";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

URL obj = new URL("https://{{baseurlapi}}/DAOTransit/TransitOrdre.php");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /DAOTransit/TransitOrdre.php

Called when placing order for transit transport, addressed to outside Denmark.

Fields in the request:

Parameter Description
kundeid Customer ID at DAO
kode Issued password for DAO’s parcel-API
stregkode SSCC Barcode from the customer
navn Parcel-recipient’s name
mobil Parcel-recipient’s Mobile number for SMS-notification. Mobil or email must be set
email Parcel-recipient’s e-mail address for email-notification. Mobil or email must be set
dato (optional) Date of delivery – default tomorrow. Format is YYYY-MM-DD
vaegt Parcel weight in gram.
l,h,b Respectively, Length, Width, and Height of the parcel in centimeter
leveringsnavn (Optional)
Company name of the recipient
leveringsadresse (Optional)
Delivery Address
leveringspostnr (Optional)
Zip code for the Delivery Address.
leveringsland Nation code for Delivery Address (ISO 3166-1 Alfa 2)
test (Optional)
If 1, no order is placed but a realistic response given. Default blank
format JSON, XML. Default JSON

Response:

{
      "status" : "OK",                       // "OK" or "FEJL"(Error)
      "fejlkode" : "",                          // N3 - Error code if "FEJL"
      "fejltekst" : "",                         // A80 – Error Description if "FEJL"
      "resultat" : {
            "stregkode" : "00057126960000003016"             // A20 – Customer’s Barcode
      }
}

Parameters

Name In Type Required Description
kundeid query string false none
kode query string false none
stregkode query integer false none
navn query string false none
mobil query integer false none
email query string false none
dato query string false none
vaegt query integer false none
l query integer false none
h query integer false none
b query integer false none
leveringsnavn query string false none
leveringsadresse query string false none
leveringspostnr query integer false none
leveringsland query string false none
faktura query integer false none
format query string false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Pickup

API Documentation for Pickup

Version 103

Effective since 19-10-2023

Pickup Coverage Verifier

Code samples

# You can also use wget
curl -X POST https://{{baseurlapi}}/api/AddressVerifierAndScheduler/VerifyAddress \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://{{baseurlapi}}/api/AddressVerifierAndScheduler/VerifyAddress',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.post('https://{{baseurlapi}}/api/AddressVerifierAndScheduler/VerifyAddress', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://{{baseurlapi}}/api/AddressVerifierAndScheduler/VerifyAddress', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://{{baseurlapi}}/api/AddressVerifierAndScheduler/VerifyAddress", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }


    /// Make a dummy request
    public async Task MakePostRequest()
    {
      string url = "https://{{baseurlapi}}/api/AddressVerifierAndScheduler/VerifyAddress";


      await PostAsync(null, url);

    }

    /// Performs a POST Request
    public async Task PostAsync(undefined content, string url)
    {
        //Serialize Object
        StringContent jsonContent = SerializeObject(content);

        //Execute POST request
        HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
    }



    /// Serialize an object to Json
    private StringContent SerializeObject(undefined content)
    {
        //Serialize Object
        string jsonObject = JsonConvert.SerializeObject(content);

        //Create Json UTF8 String Content
        return new StringContent(jsonObject, Encoding.UTF8, "application/json");
    }

    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

URL obj = new URL("https://{{baseurlapi}}/api/AddressVerifierAndScheduler/VerifyAddress");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST /api/AddressVerifierAndScheduler/VerifyAddress

Called when verifying that there is coverage for pickup at specific address.**

Fields in the request:

Parameter Description
tekst Complete address text
adresse It’s an object containing all the address-related information.
vejkode Address road code.
vejnavn Address street name.
husnr Address house number
postnr Address postal number.
kommunekode Address municipal code.
id [Optional] Address id – 128 bit globally unique identifier
status [Optional] Address status - 1
darstatus [Optional] Address dar status - 3
adresseringsvejnavn [Optional] Addressing street name.
etage [Optional] Address floor.
dør [Optional] Address door
supplerendebynavn [Optional] Address additional city name.
postnrnavn [Optional] Address postal name.
stormodtagerpostnr [Optional] Address main recipient record number.
Stormodtagerpostnrnavn [Optional] Address major recipient record number.
adgangsadresseid [Optional] Address access address.
x [Optional] Address longitude
y [Optional] Address latitude
href [Optional] Address api url
adresselinje [Optional] Address line
adresselinjemedsupplerendebynavn [Optional] Address line with supplementary city name.

Body:

{
"tekst": "Rampen 1, 8240 Risskov",
"adresse":
            {
            "id": "2374c2e5-9d2e-3ff2-e044-0003ba298018",
            "status": 1,
            "darstatus": 3,
            "vejkode": "6565",
            "vejnavn": "Rampen",
            "adresseringsvejnavn": "Rampen",
            "husnr": "1",
            "etage": null,
            "dør": null,
            "supplerendebynavn": null,
            "postnr": "8240",
            "postnrnavn": "Risskov",
            "stormodtagerpostnr": null,
            "stormodtagerpostnrnavn": null,
            "kommunekode": "0751",
            "adgangsadresseid": "22729a66-94d5-44d0-e044-0003ba298018",
            "x": 10.234822,
            "y": 56.182964,
            "href": "https://dawa.aws.dk/adresser/2374c2e5-9d2e-3ff2-e044-0003ba298018",
            "adresselinje": "Rampen 1",
            "adresselinjemedsupplerendebynavn": "Rampen 1"
            }
}

Response if coverage available for the address:

{
      "distibutorId": ”1”,                                                                                // distributor id.
      "days": “MON,TUE,WED,THU,FRI,SAT,SUN”,             // Days available for this address.
}

OR

Response if coverage is not available for the address:

{
      "distibutorId": null,             // null value.
      "days": null                               // null value.
}

Body parameter

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

HOME2HOME order

Code samples

# You can also use wget
curl -X GET https://{{baseurlapi}}/DAODirekte/hometohomeorder.php \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://{{baseurlapi}}/DAODirekte/hometohomeorder.php',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://{{baseurlapi}}/DAODirekte/hometohomeorder.php', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://{{baseurlapi}}/DAODirekte/hometohomeorder.php', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{{baseurlapi}}/DAODirekte/hometohomeorder.php", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "https://{{baseurlapi}}/DAODirekte/hometohomeorder.php";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

URL obj = new URL("https://{{baseurlapi}}/DAODirekte/hometohomeorder.php");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /DAODirekte/hometohomeorder.php

Called when placing an order to send a parcel from a home address to a shop.

Fields in the request:

Parameter Description
customerid 4-digit customer id
code Provided password
reciver_postalcode Receiver postal code, 4 digits
reciver_address Receiver address
reciver_name Receiver name
reciver_mobile Receiver phone number, 8 digits, with country code (45) in front
pickup_postalcode Pickup postal code
pickup_address Pickup address
pickup_name Pickup name
pickup_mobile Pickup phone number, 8 digits, with country code (45) in front
pickup_email Pickup email
pickup_form Form of pickup. 1 = Pickup from door handle, 2 = Pickup at mailbox, 3 = Pickup from mailbox
weight Weight in grams
pickup_date Requested pickup date. Format yyyy-mm-dd
dimension_1 Dimension in cm
dimension_2 Dimension in cm
dimension_3 Dimension in cm
reference Reference field. Max length 45 characters
test For testing purposes. 1 = no parcel will be created, dummy response is returned, 0 = real parcel created.

Response:

{
      "status": ”OK”,                   // ”OK” or ”FEJL”
      "errorcode": ””,                  // N3 - Error-code if ”FEJL”
      ”errortext”: ””,                      // A80 – Error-description if ”FEJL”
      "result": {
      ”barcode” : ” 00057126960000003016”             // A20 – barcode for label (GS1-128)
            ”labelText1” : ”76201”                                                      // A20 – Text for label (Route/Shop)
            ”labelText2” : ”5432345”                                             // A20 – Text for label (Route Designation)
            ”labelText3” : ”424578”                                                // A7 – Text for label (Control code)
            ”sorting” : ”E”                                                                         // A3 – Code for sorting
            ”ETA” : ”2022-08-01 07:40”                                     // A16 - ETA of delivery at parcel-shop

”jobdaddressno” : ”181”
      }
}

Parameters

Name In Type Required Description
customerid query string false none
code query string false none
reciver_postalcode query integer false none
reciver_address query string false none
reciver_name query string false none
reciver_mobile query integer false none
pickup_postalcode query integer false none
pickup_address query string false none
pickup_name query string false none
pickup_mobile query integer false none
pickup_email query string false none
pickup_form query integer false none
weight query integer false none
pickup_date query string false none
dimension_1 query integer false none
dimension_2 query integer false none
dimension_3 query integer false none
reference query integer false none
test query integer false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

HOME2SHOP order

Code samples

# You can also use wget
curl -X GET https://{{baseurlapi}}/DAOPakkeshop/hometoshoporder.php \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://{{baseurlapi}}/DAOPakkeshop/hometoshoporder.php',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://{{baseurlapi}}/DAOPakkeshop/hometoshoporder.php', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://{{baseurlapi}}/DAOPakkeshop/hometoshoporder.php', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{{baseurlapi}}/DAOPakkeshop/hometoshoporder.php", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "https://{{baseurlapi}}/DAOPakkeshop/hometoshoporder.php";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

URL obj = new URL("https://{{baseurlapi}}/DAOPakkeshop/hometoshoporder.php");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /DAOPakkeshop/hometoshoporder.php

Called when placing an order to send a parcel from a home address to a shop.

Fields in the request:

Parameter Description
customerid 4-digit customer id
code Provided password
reciver_postalcode Receiver postal code, 4 digits
reciver_address Receiver address
reciver_name Receiver name
reciver_mobile Receiver phone number, 8 digits, with country code (45) in front
reciver_shopid Numeric shop id of destination shop. If set to 0 will find nearest shop based on receiver address.
pickup_postalcode Pickup postal code
pickup_address Pickup address
pickup_name Pickup name
pickup_mobile Pickup phone number, 8 digits, with country code (45) in front
pickup_email Pickup email
pickup_form Form of pickup. 1 = Pickup from door handle, 2 = Pickup at mailbox, 3 = Pickup from mailbox
weight Weight in grams
pickup_date Requested pickup date. Format yyyy-mm-dd
dimension_1 Dimension in cm
dimension_2 Dimension in cm
dimension_3 Dimension in cm
reference Reference field. Max length 45 characters
test For testing purposes. 1 = no parcel will be created, dummy response is returned, 0 = real parcel created.

Response:

{
      "status": ”OK”,                                      // ”OK” or ”FEJL”
      "errorcode": ””,                                  // N3 - Error-code if ”FEJL”
      ”errortext”: ””,                                      // A80 – Error-description if ”FEJL”
      "result": {
            ”barcode” : ” 00057126960000003016”             // A20 – barcode for label (GS1-128)
            ”labelText1” : ”76201”                                                             // A20 – Text for label (Route/Shop)
            ”labelText2” : ”5432345”                                                    // A20 – Text for label (Route Designation)x
            ”labelText3” : ”424578”                                                         // A7 – Text for label (Control code)
            ”sorting” : ”E”                                                                                  // A3 – Code for sorting
            ”ETA” : ”2022-08-01 07:40”                                              // A16 - ETA of delivery at parcel-shop
      }
}

Parameters

Name In Type Required Description
customerid query string false none
code query string false none
reciver_postalcode query integer false none
reciver_shopid query integer false none
reciver_address query string false none
reciver_name query string false none
reciver_email query string false none
pickup_postalcode query integer false none
pickup_address query string false none
pickup_name query string false none
pickup_mobile query integer false none
pickup_email query string false none
pickup_form query integer false none
weight query integer false none
pickup_date query string false none
dimension_1 query integer false none
dimension_2 query integer false none
dimension_3 query integer false none
reference query integer false none
test query integer false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Pickup Return order

Code samples

# You can also use wget
curl -X GET https://{{baseurlapi}}/DAOHomeReturn/CreateHomeReturn.php \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://{{baseurlapi}}/DAOHomeReturn/CreateHomeReturn.php',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://{{baseurlapi}}/DAOHomeReturn/CreateHomeReturn.php', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://{{baseurlapi}}/DAOHomeReturn/CreateHomeReturn.php', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{{baseurlapi}}/DAOHomeReturn/CreateHomeReturn.php", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "https://{{baseurlapi}}/DAOHomeReturn/CreateHomeReturn.php";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

URL obj = new URL("https://{{baseurlapi}}/DAOHomeReturn/CreateHomeReturn.php");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /DAOHomeReturn/CreateHomeReturn.php

Called when placing an order to pick up return parcel.

Fields in the request:

Parameter Description
kundeid Customer ID at dao
kode Issued password for dao’s parcel-api.
postnr DK Zip-code of the recipient address.
adresse Recipient address
navn Recipient name.
afsender Parcel sender’s name/pick-up name.
pickup_afsender_adresse Parcel sender’s address
pickup_afsender_postnr Parcel sender’s zipcode
afs_mobil Parcel sender’s mobile
afs_email Parcel sender’s email
type labelless
faktura Invoice number

Response:
{
      "status": ”OK”,             // ”OK” or ”FEJL”
      "fejlkode": ””,                 // 378 - fejlkode if ”FEJL”
      ”fejltekst”: ””,                 // 101 – fejlkode if ”FEJL”
      "resultat": {
            ”stregkode” : ” 00057126960000003016”
            ”labellesskode” : ”76201”
            ”labelTekst1” : ”368”
      }
}

Parameters

Name In Type Required Description
kundeid query string false none
kode query string false none
postnr query integer false none
adresse query string false none
navn query string false none
afsender query string false none
pickup_afsender_adresse query string false none
pickup_afsender_postnr query integer false none
afs_mobil query integer false none
afs_email query string false none
type query string false none
faktura query integer false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Pickup Return – Set Pickup Date

Code samples

# You can also use wget
curl -X GET https://{{baseurlapi}}/DAOHomeReturn/UpdateHomeReturn.php \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://{{baseurlapi}}/DAOHomeReturn/UpdateHomeReturn.php',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://{{baseurlapi}}/DAOHomeReturn/UpdateHomeReturn.php', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://{{baseurlapi}}/DAOHomeReturn/UpdateHomeReturn.php', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{{baseurlapi}}/DAOHomeReturn/UpdateHomeReturn.php", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "https://{{baseurlapi}}/DAOHomeReturn/UpdateHomeReturn.php";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

URL obj = new URL("https://{{baseurlapi}}/DAOHomeReturn/UpdateHomeReturn.php");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /DAOHomeReturn/UpdateHomeReturn.php

Called when setting pickup date for home return parcel.

Fields in the request:

Parameter Description
kundeid Customer ID at dao
kode Issued password for dao’s parcel-api.
pickup_afsender_adresse (Optional)
Pickup address
pickup_afsender_postnr (Optional if address is also not sent)
DK Zip-code of the pickup address.
pickup_date Pickup date

Response:

{
      "status": ”true”,                   // ”true” or ”false”
      "message": ””                       // true – represents successful response

                                                                // false – if there any error in response
                                                               // message – error or success message
}

Parameters

Name In Type Required Description
kundeid query string false none
kode query string false none
pickup_date query string false none
barcode query integer false none
pickup_afsender_adresse query string false none
pickup_afsender_postnr query integer false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Track & Trace

TrackNTrace request

Code samples

# You can also use wget
curl -X GET https://{{baseurlapi}}/TrackNTrace.php \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://{{baseurlapi}}/TrackNTrace.php',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://{{baseurlapi}}/TrackNTrace.php', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://{{baseurlapi}}/TrackNTrace.php', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{{baseurlapi}}/TrackNTrace.php", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "https://{{baseurlapi}}/TrackNTrace.php";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

URL obj = new URL("https://{{baseurlapi}}/TrackNTrace.php");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /TrackNTrace.php

Called when an overview of registration is wanted.

Fields in the request:

Parameter Description
kundeid Customer ID at dao
kode Issued password for dao’s parcel-api
stregkode Parcel’s barcode (see delivery order)
format JSON, XML

Response :

{
      "status": ”OK”,                     // ”OK” or ”FEJL”
      "fejlkode": ””,                        // N3 – Error-code if ”FEJL”
      ”fejltekst”: ””,                        // A80 – Error-description if ”FEJL”
      "resultat": [
                                 {
                                          "tidspunkt": "2014-06-17 21:14:12",
                                          "haendelse": ”10”,
                                          "beskrivelse": "Pakke modtaget på fordelingscenter",
                                          "sted": "DAO Erritsø"
                                    }
                                    ,...
                        ]
}

Parameters

Name In Type Required Description
kundeid query string false none
kode query string false none
stregkode query integer false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

TrackNTrace codes

Code samples

# You can also use wget
curl -X GET https://{{baseurlapi}}/TrackNTraceKoder.php \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://{{baseurlapi}}/TrackNTraceKoder.php',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://{{baseurlapi}}/TrackNTraceKoder.php', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://{{baseurlapi}}/TrackNTraceKoder.php', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{{baseurlapi}}/TrackNTraceKoder.php", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "https://{{baseurlapi}}/TrackNTraceKoder.php";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

URL obj = new URL("https://{{baseurlapi}}/TrackNTraceKoder.php");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /TrackNTraceKoder.php

Called when a complete list of TracnkNTracce codes are wanted.

Fields in the request:

Parameter Description
kundeid Customer ID at dao
kode Issued password for dao’s parcel-api
format JSON, XML or CSV. Default JSON

Response:

{
      "status": ”OK”,                               // ”OK” or ”FEJL”
      ”fejlkode”: ””,                                   // N3 - Error-code if ”FEJL”
      ”fejltekst”: ””,                                   // A80 – Error-description if ”FEJL”
      "resultat": [”direkte”:{
                              {
                                    ”haendelse” : ”10”                                                 // N3 – Event-code
                                    ”beskrivelse” : ” Pakke ankommet”       // A80 – Event-description
                              },…
                              },
                              ”pakkeshop”:{
                                    {
                                          ”haendelse” : ”11”                                                                                          // N3 – Event-code
                                          ”beskrivelse” : ” Pakken har forladt DAO terminal”        // A80 – Event-description
                                    },…
                              }
                        ]
}

Parameters

Name In Type Required Description
kundeid query integer false none
kode query string false none
format query string false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Track & Trace v2

TrackNTrace request v2

Code samples

# You can also use wget
curl -X GET https://{{baseurlapi}}/TrackNTrace_v2.php \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://{{baseurlapi}}/TrackNTrace_v2.php',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://{{baseurlapi}}/TrackNTrace_v2.php', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://{{baseurlapi}}/TrackNTrace_v2.php', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{{baseurlapi}}/TrackNTrace_v2.php", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "https://{{baseurlapi}}/TrackNTrace_v2.php";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

URL obj = new URL("https://{{baseurlapi}}/TrackNTrace_v2.php");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /TrackNTrace_v2.php

Called when an overview of registrations for one or all parcels is wanted.

Fields in the request:

Parameter Description
kundeid Customer ID at dao
kode Issued password for dao’s parcel-api
stregkode Parcel’s barcode (see delivery order)
token Latest token.

If set all registrations on parcels, made after the token was generated, will be returned.

Either barcode or token must be set.
sprog Language in which the response is given – default Danish (Not required)

(DA or EN)
format JSON, XML

The Token System

The token system allows you to receive all events on all your deliveries
since the last token call. All you have to do is call with the next token
number that you get with each token call.

You start this chain of tokens by calling with token=0 instead of a barcode, and it will
give you the next token with which you call the next time you wish to pull data from
all your deliveries. This ensures that you do not flood our API with
unnecessary calls, while also getting all the relevant data for local storage.

For example: You got token 12345 last time you called our API. You now call our Tracking API with this token, so now you'll receive all events on all of your parcels since the creation of that token. In the same call, you now receive a new token: 56789. The next time you call our API, you'll use 56789.

Response using barcode :

{
      "status": ”OK”,                                                // ”OK” or ”FEJL”
      "fejlkode": ””,                                                   // N3 – Error-code if ”FEJL”
      ”fejltekst”: ””,                                                   // A80 – Error-description if ”FEJL”
      "resultat": {
            ”stregkode”: ”00057126960000003016”
            ”pakketype”: ”10”
            ”eta”: ”2014-06-18”
            ”afsender”: ””
            ”modtager”:{
                        "navn": "Jens Hansen"
                        "adresse": "Niels Finsensvej 11"
                        "post": "7100 Vejle"                        // A45 – Nation-code added if abroad.
                        "land": "Danmark"
            }
            ”ekstern_tracking”: ”https://www.dhl.de/............”,
            ”haendelser”:[
                        {
                              "tidspunkt": "2014-06-17 21:14:12",
                              "haendelse": ”10”,
                              "beskrivelse": ”Pakke modtaget på fordelingscenter”,
                              "pakketype": ”Home”
                              "sted": ”DAO Erritsø"
                        }
            ,...]
      }
}

Response using token:

{
      "status": ”OK”,                                                // ”OK” or ”FEJL”
      "fejlkode": ””,                                                 // N3 - Error-code if ”FEJL”
      ”fejltekst”: ””,                                                  // A80 – Error-Description if ”FEJL”
      ”token”: ”5271”,                                            // N10 – Next token
      "resultat": [
                              {
                                          ”stregkode”: 00057126960000003016,
                                          ”haendelser”: [
                                          {
                                                "tidspunkt": "2014-06-17 21:14:12",
                                                "haendelse": ”10”,
                                                "beskrivelse": "Pakke modtaget på fordelingscenter",
                                                "sted": "DAO Erritsø",
                                                "shopid": ”1234"
                                          }
                                          ,...
                                    ]
                              }
                              ,...
                        ]
}

Note: For HOME parcels the delivered text will be displayed in the field "sted". For other parcels it is in "beskrivelse".

Parameters

Name In Type Required Description
kundeid query integer false none
kode query string false none
stregkode query integer false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Track & Trace V2 POST

Code samples

# You can also use wget
curl -X POST https://{{baseurlapi}}/TrackNTrace_v2.php \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://{{baseurlapi}}/TrackNTrace_v2.php',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.post('https://{{baseurlapi}}/TrackNTrace_v2.php', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://{{baseurlapi}}/TrackNTrace_v2.php', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://{{baseurlapi}}/TrackNTrace_v2.php", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }


    /// Make a dummy request
    public async Task MakePostRequest()
    {
      string url = "https://{{baseurlapi}}/TrackNTrace_v2.php";


      await PostAsync(null, url);

    }

    /// Performs a POST Request
    public async Task PostAsync(undefined content, string url)
    {
        //Serialize Object
        StringContent jsonContent = SerializeObject(content);

        //Execute POST request
        HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
    }



    /// Serialize an object to Json
    private StringContent SerializeObject(undefined content)
    {
        //Serialize Object
        string jsonObject = JsonConvert.SerializeObject(content);

        //Create Json UTF8 String Content
        return new StringContent(jsonObject, Encoding.UTF8, "application/json");
    }

    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

URL obj = new URL("https://{{baseurlapi}}/TrackNTrace_v2.php");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST /TrackNTrace_v2.php

Works the same way as TrackNTrace request v2 but as a POST with a body instead of GET.
The response is the same.

Body Parameter

stregkode: "00057151271397359539"

Query Params

Parameter Description
kundeid Customer ID at dao
kode Issued password for dao’s parcel-api

Body parameter

Parameters

Name In Type Required Description
kundeid query integer false none
kode query string false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema