NAV Navbar
json
  • Introduction
  • Authentication
  • Shipments
  • Servicepoints
  • Products
  • Reports
  • Errors
  • Introduction

    Our API is based on REST principles. All responses are returned as application/json in UTF-8 unless otherwise specified in the documentation.

    Authentication

    HTTP Basic Auth

    To authorize, use HTTP Basic Authentication:

    curl -X GET \
      'https://api.coolrunner.dk/v3/<endpoint>' \
      -H 'Authorization: Basic xxxxx' \
      -H 'X-Developer-Id: xxxxx'
    

    Make sure to replace xxxxx with your information.

    The API uses a standard HTTP Basic authentication scheme.

    Create your token using your username and integration token. You can create an integration token here: Integration - You'll need a business account to enable Webservice to get a token.

    Combine your username and token in the following format: username:integration_token - Base64 encode the resulting string and use it in the HTTP Authentication header:

    Authorization: Basic dGhpcy5pcy5tZUBteS1hd2Vzb21lLWNvbXBhbnkuY29tOmFzZG4xMjM4OTBrS1NBRDg5MTIzbGtBRDg=

    Developer ID

    Add the following header to identify your intergration - This can be your company name, or the name of the integration you're using.

    X-Developer-Id: MyAwesomeCompanyName v1.0

    Shipments

    Create

    POST https://api.coolrunner.dk/v3/shipments

    curl -X POST \
      'https://api.coolrunner.dk/v3/shipments' \
      -H 'Authorization: Basic xxxxx' \
      -H 'X-Developer-Id: xxxxx'
      -d 
    {
      "sender": {
        "name": "TestNavn",
        "attention": "TestFirma",
        "street1": "TestGade 123",
        "zip_code": "9000",
        "city": "Aalborg",
        "country": "DK",
        "phone": "00000000",
        "email": "email@testfirma.dk"
      },
      "receiver": {
        "name": "TestNavn",
        "attention": "TestFirma",
        "street1": "TestGade 123",
        "street2": "",
        "zip_code": "9000",
        "city": "Aalborg",
        "country": "DK",
        "phone": "00000000",
        "email": "email@testfirma.dk",
        "notify_sms": "00000000",
        "notify_email": "email@testfirma.dk"
      },
      "length": "20",
      "width": "20",
      "height": "6",
      "weight": "20",
      "carrier": "dao",
      "carrier_product": "private",
      "carrier_service": "servicepoint",
      "reference": "Order no: 2220192",
      "description": "",
      "comment": "",
      "label_format": "LabelPrint",
      "servicepoint_id": 0
    }
    

    The request above returns JSON structured like this:

    HTTP/1.1 200 OK
    
    {
      "package_number": "00057126960209358931",
      "sender": {
        "name": "TestNavn",
        "attention": "TestFirma",
        "street1": "TestGade 123",
        "zip_code": "9000",
        "city": "Aalborg",
        "country": "DK",
        "phone": "00000000",
        "email": "email@testfirma.dk"
      },
      "receiver": {
        "name": "TestNavn",
        "attention": "TestFirma",
        "street1": "TestGade",
        "street2": "",
        "zip_code": "9000",
        "city": "Aalborg",
        "country": "DK",
        "phone": "22989022",
        "email": "email@testfirma.dk",
        "notify_sms": "00000000",
        "notify_email": "email@testfirma.dk"
      },
      "length": "20",
      "width": "20",
      "height": "6",
      "weight": "20",
      "carrier": "dao",
      "carrier_product": "private",
      "carrier_service": "servicepoint",
      "reference": "Order no: 2220192",
      "description": "",
      "comment": "",
      "label_format": "LabelPrint",
      "servicepoint_id": 1002,
      "price": {
         "incl_tax": 33,
         "excl_tax": 26.4
      },
      "_links": {
         "self": "https://api.coolrunner.dk/v3/shipments/00057126960209358931",
         "label": "https://api.coolrunner.dk/v3/shipments/00057126960209358931/label",
         "tracking": "https://api.coolrunner.dk/v3/shipments/00057126960209358931/tracking"
      }
    }
    

    HTTP Request

    POST https://api.coolrunner.dk/v3/shipments

    JSON Request Body

    Parameter Type Description
    receiver Object Receiver object with following parameters (all fields are String):
    • name (eg: TestNavn)
    • attention (eg: TestFirma)
    • street1 (eg: TestGade 123)
    • street2 - optional
    • zip_code (eg: 9000)
    • city (eg: Aalborg)
    • country (eg: DK)
    • phone (eg: 00000000)
    • email (eg: email@testfirma.dk)
    sender Object Sender object with following parameters (all fields are String):
    • name (eg: TestNavn)
    • attention (eg: TestFirma)
    • street1 (eg: TestGade 123)
    • street2 - optional
    • zip_code (eg: 9000)
    • city (eg: Aalborg)
    • country (eg: DK)
    • phone (eg: 00000000)
    • email (eg: email@testfirma.dk)
    • notify_sms - phone number to send notifications to (eg: 00000000)
    • notify_email - email address to send notifications to (eg: email@testfirma.dk)
    length String Length of the shipment in centimeters (eg: 20)
    width String Width of the shipment in centimeters (eg: 20)
    height String Height of the shipment in centimeters (eg: 6)
    weight String Height of the shipment in grams (eg: 20)
    carrier String Carrier of the shipment (eg: dao)
    carrier_product String Carrier's Product (eg: private)
    carrier_service String Carrier's service (eg: servicepoint)
    reference String Reference (eg: Order no: 2220192)
    description String Description of the shipment (eg: "")
    comment String Comment for the shipment (eg: "")
    label_format String Label format for the shipment (eg: LabelPrint)
    servicepoint_id Integer ID for the servicepoint (eg: 0)

    JSON Response Body

    Parameter Type Description
    package_number String Package number of the shipment (eg: 00057126960205109100)
    receiver Object Receiver object with following parameters (all fields are String):
    • name (eg: TestNavn)
    • attention (eg: TestFirma)
    • street1 (eg: TestGade 123)
    • street2 - optional
    • zip_code (eg: 9000)
    • city (eg: Aalborg)
    • country (eg: DK)
    • phone (eg: 00000000)
    • email (eg: email@testfirma.dk)
    sender Object Sender object with following parameters (all fields are String):
    • name (eg: TestNavn)
    • attention (eg: TestFirma)
    • street1 (eg: TestGade 123)
    • street2 - optional
    • zip_code (eg: 9000)
    • city (eg: Aalborg)
    • country (eg: DK)
    • phone (eg: 00000000)
    • email (eg: email@testfirma.dk)
    • notify_sms - phone number to send notifications to (eg: 00000000)
    • notify_email - email address to send notifications to (eg: email@testfirma.dk)
    servicepoint_id Integer ID for the servicepoint (eg: 0)
    length String Length of the shipment in centimeters (eg: 20)
    width String Width of the shipment in centimeters (eg: 20)
    height String Height of the shipment in centimeters (eg: 6)
    weight String Height of the shipment in grams (eg: 20)
    price Object Price of the shipment
    • incl_tax - Price of the shipment including tax - Float (eg: 68.15)
    • excl_tax - Price of the shipment including tax - Float (eg: 54.52)
    _links Object Object with URLs
    • self - String - URL for the label (eg: https://api.coolrunner.dk/v3/shipments/00757135950000001089/label)
    • shipment - String - URL for shipment (eg: https://api.coolrunner.dk/v3/shipments/00757135950000001089)
    • tracking - String - URL for tracking the shipment (eg: https://api.coolrunner.dk/v3/shipments/00757135950000001089/tracking)

    Get

    GET https://api.coolrunner.dk/v3/shipments/:package_number

    curl -X GET \
      'https://api.coolrunner.dk/v3/shipments/00057126960209358931' \
      -H 'Authorization: Basic xxxxx' \
      -H 'X-Developer-Id: xxxxx'
    

    The request above returns JSON structured like this:

    HTTP/1.1 201 Created
    
    {
      "sender": {
        "name": "TestNavn",
        "attention": "TestFirma",
        "street1": "TestGade 123",
        "zip_code": "9000",
        "city": "Aalborg",
        "country": "DK",
        "phone": "00000000",
        "email": "email@testfirma.dk"
      },
      "receiver": {
        "name": "TestNavn",
        "attention": "TestFirma",
        "street1": "TestGade",
        "street2": "",
        "zip_code": "9000",
        "city": "Aalborg",
        "country": "DK",
        "phone": "22989022",
        "email": "email@testfirma.dk",
        "notify_sms": "00000000",
        "notify_email": "email@testfirma.dk"
      },
      "length": "20",
      "width": "20",
      "height": "6",
      "weight": "20",
      "carrier": "dao",
      "carrier_product": "private",
      "carrier_service": "servicepoint",
      "reference": "Order no: 2220192",
      "description": "",
      "comment": "",
      "label_format": "LabelPrint",
      "servicepoint_id": 1002,
      "price": {
          "incl_tax": 33,
          "excl_tax": 26.4
       },
       "_links": {
          "self": "https://api.coolrunner.dk/v3/shipments/00057126960209358931",
          "label": "https://api.coolrunner.dk/v3/shipments/00057126960209358931/label",
          "tracking": "https://api.coolrunner.dk/v3/shipments/00057126960209358931/tracking"
       }
    }
    

    Get shipment by package_number

    HTTP Request

    GET https://api.coolrunner.dk/v3/shipments/:package_number

    URL Parameters

    Parameter Description
    package_number The package number of the shipment

    JSON Response Body

    Parameter Type Description
    package_number String Package number of the shipment (eg: 00057126960205109100)
    receiver Object Receiver object with following parameters (all fields are String):
    • name (eg: TestNavn)
    • attention (eg: TestFirma)
    • street1 (eg: TestGade 123)
    • street2 - optional
    • zip_code (eg: 9000)
    • city (eg: Aalborg)
    • country (eg: DK)
    • phone (eg: 00000000)
    • email (eg: email@testfirma.dk)
    • notify_sms - phone number to send notifications to (eg: 00000000)
    • notify_email - email address to send notifications to (eg: email@testfirma.dk)
    sender Object Sender object with following parameters (all fields are String):
    • name (eg: TestNavn)
    • attention (eg: TestFirma)
    • street1 (eg: TestGade 123)
    • street2 - optional
    • zip_code (eg: 9000)
    • city (eg: Aalborg)
    • country (eg: DK)
    • phone (eg: 00000000)
    • email (eg: email@testfirma.dk)
    servicepoint_id Integer ID for the servicepoint (eg: 0
    length String Length of the shipment in centimeters (eg: 20)
    width String Width of the shipment in centimeters (eg: 20)
    height String Height of the shipment in centimeters (eg: 6)
    weight String Height of the shipment in grams (eg: 20)
    price Object Price of the shipment
    • incl_tax - Price of the shipment including tax - Float (eg: 68.15)
    • excl_tax - Price of the shipment including tax - Float (eg: 54.52)
    _links Object Object with URLs
    • self - String - URL for the label (eg: https://api.coolrunner.dk/v3/shipments/00757135950000001089/label)
    • shipment - String - URL for shipment (eg: https://api.coolrunner.dk/v3/shipments/00757135950000001089)
    • tracking - String - URL for tracking the shipment (eg: https://api.coolrunner.dk/v3/shipments/00757135950000001089/tracking)

    Get label

    GET https://api.coolrunner.dk/v3/shipments/:package_number/label

    curl -X GET \
      'https://api.coolrunner.dk/v3/shipments/00057126960205109100/label' \
      -H 'Authorization: Basic xxxxx' \
      -H 'X-Developer-Id: xxxxx'
    
    

    The request above returns a PDF

    HTTP/1.1 200 OK
    
    // PDF returned as body
    

    Get label in PDF by package number

    HTTP Request

    GET https://api.coolrunner.dk/v3/shipments/:package_number/label

    URL Parameters

    Parameter Description
    package_number The package number of the shipment

    JSON Response Body

    a PDF is returned with the shipping label.

    Get tracking

    GET https://api.coolrunner.dk/v3/shipments/:package_number/tracking

    curl -X GET \
      'https://api.coolrunner.dk/v3/shipments/00057126960205109100/tracking' \
      -H 'Authorization: Basic xxxxx' \
      -H 'X-Developer-Id: xxxxx'
    

    The request above returns JSON structured like this:

    HTTP/1.1 200 OK
    
    {
      "package_number": "00058126960004762308",
      "carrier": "dao",
      "events":
      [
        {
          "timestamp": "2018-01-12 12:00",
          "title": "Electronic data received",
          "event": "received",
          "location": ""
        },
        {
          "timestamp": "2018-01-13 16:00",
          "title": "Parcel has been delvierd to carrier",
          "event": "delivered_carrier",
          "location": "9370 Hals"
        },
        {
          "timestamp": "2018-01-15 03:00",
          "title": "Arrived to parcel sorting center Aalborg",
          "event": "arrived",      
          "location": "9000 Aalborg"
        },
        {
          "timestamp": "2018-01-15 10:00",
          "title": "Parcel delivered to customer",
          "event": "delivered",            
          "location": "Bøgildsmindevej 3, 9400 Nørresundby"
        },
        ...
      ]
    }
    

    Get tracking by package_number

    HTTP Request

    GET https://api.coolrunner.dk/v3/shipments/:package_number/tracking

    URL Parameters

    Parameter Description
    package_number The package number of the shipment

    JSON Response Body

    Parameter Type Description
    package_number String The package number of the shipment
    carrier String Carrier of the shipment
    events Array Events for the shipment.
    • timestamp (eg: 2018-01-13 16:00)
    • title (eg: Parcel has been delvierd to carrier)
    • event (eg: delivered_carrier)
    • location (eg: 9370 Hals)

    Address Validation

    POST https://api.coolrunner.dk/v3/shipments/address/validate

    curl -X POST \
      'https://api.coolrunner.dk/v3/shipments/address/validate' \
      -H 'Authorization: Basic xxxxx' \
      -H 'X-Developer-Id: xxxxx'
      -d 
    {
      "sender": {
        "name": "TestNavn",
        "attention": "TestFirma",
        "street1": "TestGade 123",
        "zip_code": "9000",
        "city": "Aalborg",
        "country": "DK",
        "phone": "00000000",
        "email": "email@testfirma.dk"
      },
      "receiver": {
        "name": "TestNavn",
        "attention": "TestFirma",
        "street1": "TestGade 123",
        "street2": "",
        "zip_code": "9000",
        "city": "Aalborg",
        "country": "DK",
        "phone": "00000000",
        "email": "email@testfirma.dk",
        "notify_sms": "00000000",
        "notify_email": "email@testfirma.dk"
      },
      "length": "20",
      "width": "20",
      "height": "6",
      "weight": "20",
      "carrier": "dao",
      "carrier_product": "private",
      "carrier_service": "servicepoint",
      "reference": "Order no: 2220192",
      "description": "",
      "comment": "",
      "label_format": "LabelPrint",
      "servicepoint_id": 0
    }
    

    The request above returns JSON structured like this:

    HTTP/1.1 200 OK
    
    {
        "status" : true, 
        "description" : "",
        "messages": {
    
        }
    }
    

    Validate the shipment addresses.

    HTTP Request

    POST https://api.coolrunner.dk/v3/shipments/address/validate

    JSON Request Body

    Parameter Type Description
    receiver Object Receiver object with following parameters (all fields are String):
    • name (eg: TestNavn)
    • attention (eg: TestFirma)
    • street1 (eg: TestGade 123)
    • street2 - optional
    • zip_code (eg: 9000)
    • city (eg: Aalborg)
    • country (eg: DK)
    • phone (eg: 00000000)
    • email (eg: email@testfirma.dk)
    sender Object Sender object with following parameters (all fields are String):
    • name (eg: TestNavn)
    • attention (eg: TestFirma)
    • street1 (eg: TestGade 123)
    • street2 - optional
    • zip_code (eg: 9000)
    • city (eg: Aalborg)
    • country (eg: DK)
    • phone (eg: 00000000)
    • email (eg: email@testfirma.dk)
    • notify_sms - phone number to send notifications to (eg: 00000000)
    • notify_email - email address to send notifications to (eg: email@testfirma.dk)
    length String Length of the shipment in centimeters (eg: 20)
    width String Width of the shipment in centimeters (eg: 20)
    height String Height of the shipment in centimeters (eg: 6)
    weight String Height of the shipment in grams (eg: 20)
    carrier String Carrier of the shipment (eg: dao)
    carrier_product String Carrier's Product (eg: private)
    carrier_service String Carrier's service (eg: servicepoint)
    reference String Reference (eg: Order no: 2220192)
    description String Description of the shipment (eg: "")
    comment String Comment for the shipment (eg: "")
    label_format String Label format for the shipment (eg: LabelPrint)
    servicepoint_id Integer ID for the servicepoint (eg: 0)

    JSON Response Body

    Parameter Type Description
    status Boolean The status of the validation
    description String Validation description. Is empty if the status is true.
    messages Object If validation fails, errors will be mapped, to the corresponding request key

    Validation

    POST https://api.coolrunner.dk/v3/shipments/validate

    curl -X POST \
      'https://api.coolrunner.dk/v3/shipments/validate' \
      -H 'Authorization: Basic xxxxx' \
      -H 'X-Developer-Id: xxxxx'
      -d 
    {
      "sender": {
        "name": "TestNavn",
        "attention": "TestFirma",
        "street1": "TestGade 123",
        "zip_code": "9000",
        "city": "Aalborg",
        "country": "DK",
        "phone": "00000000",
        "email": "email@testfirma.dk"
      },
      "receiver": {
        "name": "TestNavn",
        "attention": "TestFirma",
        "street1": "TestGade 123",
        "street2": "",
        "zip_code": "9000",
        "city": "Aalborg",
        "country": "DK",
        "phone": "00000000",
        "email": "email@testfirma.dk",
        "notify_sms": "00000000",
        "notify_email": "email@testfirma.dk"
      },
      "length": "20",
      "width": "20",
      "height": "6",
      "weight": "20",
      "carrier": "dao",
      "carrier_product": "private",
      "carrier_service": "servicepoint",
      "reference": "Order no: 2220192",
      "description": "",
      "comment": "",
      "label_format": "LabelPrint",
      "servicepoint_id": 0
    }
    

    The request above returns JSON structured like this:

    HTTP/1.1 200 OK
    
    {
        "status" : true, 
        "description" : "",
        "price": {
            "price_incl_tax": 33,
            "price_excl_tax": 26.4
        },
        "_links": {
            "self": "https://api.coolrunner.dk/v3/shipments/00057126960209358931",
            "label": "https://api.coolrunner.dk/v3/shipments/00057126960209358931/label",
            "tracking": "https://api.coolrunner.dk/v3/shipments/00057126960209358931/tracking"
        }
    }
    

    Validate the shipment and return the price.

    HTTP Request

    POST https://api.coolrunner.dk/v3/shipments/validate

    JSON Request Body

    Parameter Type Description
    receiver Object Receiver object with following parameters (all fields are String):
    • name (eg: TestNavn)
    • attention (eg: TestFirma)
    • street1 (eg: TestGade 123)
    • street2 - optional
    • zip_code (eg: 9000)
    • city (eg: Aalborg)
    • country (eg: DK)
    • phone (eg: 00000000)
    • email (eg: email@testfirma.dk)
    sender Object Sender object with following parameters (all fields are String):
    • name (eg: TestNavn)
    • attention (eg: TestFirma)
    • street1 (eg: TestGade 123)
    • street2 - optional
    • zip_code (eg: 9000)
    • city (eg: Aalborg)
    • country (eg: DK)
    • phone (eg: 00000000)
    • email (eg: email@testfirma.dk)
    • notify_sms - phone number to send notifications to (eg: 00000000)
    • notify_email - email address to send notifications to (eg: email@testfirma.dk)
    length String Length of the shipment in centimeters (eg: 20)
    width String Width of the shipment in centimeters (eg: 20)
    height String Height of the shipment in centimeters (eg: 6)
    weight String Height of the shipment in grams (eg: 20)
    carrier String Carrier of the shipment (eg: dao)
    carrier_product String Carrier's Product (eg: private)
    carrier_service String Carrier's service (eg: servicepoint)
    reference String Reference (eg: Order no: 2220192)
    description String Description of the shipment (eg: "")
    comment String Comment for the shipment (eg: "")
    label_format String Label format for the shipment (eg: LabelPrint)
    servicepoint_id Integer ID for the servicepoint (eg: 0)

    JSON Response Body

    Parameter Type Description
    status Boolean The status of the validation
    message String Validation message. Is empty if the status is true.
    price Object Price of the shipment
    • incl_tax - Price of the shipment including tax - Float (eg: 68.15)
    • excl_tax - Price of the shipment including tax - Float (eg: 54.52)
    _links Object Object with URLs
    • self - String - URL for the label (eg: https://api.coolrunner.dk/v3/shipments/00757135950000001089/label)
    • shipment - String - URL for shipment (eg: https://api.coolrunner.dk/v3/shipments/00757135950000001089)
    • tracking - String - URL for tracking the shipment (eg: https://api.coolrunner.dk/v3/shipments/00757135950000001089/tracking)

    Servicepoints

    Find

    GET https://api.coolrunner.dk/v3/servicepoints/:carrier

    curl -X GET \
      'https://api.coolrunner.dk/v3/servicepoints/postnord?country_code=DK&street=Stigsborgvej+60&zip_code=9400&&city=Nørresundby'
      -H 'Authorization: Basic xxxxx' \
      -H 'X-Developer-Id: xxxxx'
    

    The request above returns JSON structured like this:

    HTTP/1.1 200 OK
    
    {
        "servicepoints": [
            {
                "id": "9004",
                "name": "Posthus Føtex",
                "distance": 437,
                "address": {
                    "street": "Slotsgade 8",
                    "zip_code": "9000",
                    "city": "Aalborg",
                    "country_code": "DK"
                },
                "coordinates": {
                    "latitude": 57.04756,
                    "longitude": 9.92554
                },
                "opening_hours": {
                    "monday": {
                        "from": "08:00",
                        "to": "21:00"
                    },
                    "tuesday": {
                        "from": "08:00",
                        "to": "21:00"
                    },
                    "wednesday": {
                        "from": "08:00",
                        "to": "21:00"
                    },
                    "thursday": {
                        "from": "08:00",
                        "to": "21:00"
                    },
                    "friday": {
                        "from": "08:00",
                        "to": "21:00"
                    },
                    "saturday": {
                        "from": "08:00",
                        "to": "21:00"
                    },
                    "sunday": {
                        "from": "08:00",
                        "to": "21:00"
                    }
                }
            }
        ],
        ...
    }
    

    Find closest servicepoints for a specific address.

    HTTP Request

    GET https://api.coolrunner.dk/v3/servicepoints/:carrier

    URL Parameters

    Carrier Value Countries
    PostNord pdk DK, NO, SE, FI
    DAO dao DK
    GLS gls
    Bring bring DK
    DHL dhl SE
    Posti posti FI
    PostNL postnl NL
    HeltHjem helthjem NO

    Query Parameters

    Parameter Required Description
    country_code true Country code in ISO 3166-1 alpha-2 format. (eg: DK)
    street true Street Address (eg: C.W. Obels Plads 2,1.th.)
    zip_code true Zip code. (eg: 9000)
    city true City (eg: Aalborg)

    JSON Response Body

    Parameter Type Description
    id String ID of the service point (eg: 9004)
    name String Name of the service point (eg: Posthus Føtex)
    distance Integer Distance to the service point measured in meters. (eg: 437)
    address Object Address object of the service point.
    • street - String (eg: Slotsgade 8)
    • zip_code - String (eg: 9000)
    • city - String (eg: Aalborg)
    • country_code - String(eg: DK)
    coordinate Object Coordinate object of service point
    • latitude - Float (eg: 57.0475629)
    • longitude - Float (eg: 9.9255396999999)
    opening_hours Object Array of objects for each day the service point has opening hours
    • Day - String (eg: monday)
      • from - String (eg: 08:00)
      • to - String (eg: 21:00)

    Get

    GET https://api.coolrunner.dk/v3/servicepoints/dao/:id

    curl -X GET \
      'https://api.coolrunner.dk/v3/servicepoints/dao/5041' \
      -H 'Authorization: Basic xxxxx' \
      -H 'X-Developer-Id: xxxxx'
    
    

    The request above returns JSON structured like this:

    HTTP/1.1 200 OK
    
    {
        "servicepoints": [
            {
                "id": "9004",
                "name": "Posthus Føtex",
                "distance": 437,
                "address": {
                    "street": "Slotsgade 8",
                    "zip_code": "9000",
                    "city": "Aalborg",
                    "country_code": "DK"
                },
                "coordinates": {
                    "latitude": 57.0475629,
                    "longitude": 9.9255396999999
                },
                "opening_hours": {
                    "monday": {
                        "from": "08:00",
                        "to": "21:00"
                    },
                    "tuesday": {
                        "from": "08:00",
                        "to": "21:00"
                    },
                    "wednesday": {
                        "from": "08:00",
                        "to": "21:00"
                    },
                    "thursday": {
                        "from": "08:00",
                        "to": "21:00"
                    },
                    "friday": {
                        "from": "08:00",
                        "to": "21:00"
                    },
                    "saturday": {
                        "from": "08:00",
                        "to": "21:00"
                    },
                    "sunday": {
                        "from": "08:00",
                        "to": "21:00"
                    }
                }
            },
        ...
      ]
    }
    

    Get servicepoint by ID

    HTTP Request

    GET https://api.coolrunner.dk/v3/servicepoints/:carrier/:id

    URL Parameters

    See Servicepoints URL Parameters

    JSON Response Body

    Parameter Type Description
    id String ID of the service point (eg: 9004)
    name String Name of the service point (eg: Posthus Føtex)
    distance Integer Distance to the service point measured in meters. (eg: 437)
    address Object Address object of the service point.
    • street - String (eg: Slotsgade 8)
    • zip_code - String (eg: 9000)
    • city - String (eg: Aalborg)
    • country_code - String(eg: DK)
    coordinates Object Coordinate object of service point
    • latitude - Float (eg: 57.0475629)
    • longitude - Float (eg: 9.9255396999999)
    opening_hours Array Array of objects for each day the service point has opening hours
    • Day - String (eg: monday)
      • from - String (eg: 08:00)
      • to - String (eg: 21:00)

    Products

    Get

    GET https://api.coolrunner.dk/v3/products/:country_code

    curl -X GET \
      'https://api.coolrunner.dk/v3/products/DK' \
      -H 'Authorization: Basic xxxxx' \
      -H 'X-Developer-Id: xxxxx'
    

    The request above returns JSON structured like this:

    HTTP/1.1 200 OK
    
    {
        "DK": {
            "dao": {
                "private": [
                    {
                        "title": "DAO Pakkeshop (0-1 kg)",
                        "max_size": {
                            "length": 50,
                            "height": 30,
                            "width": 30,
                            "weight": 1000
                        },
                        "weight": {
                            "from": 0,
                            "to": 1000
                        },
                        "prices": {
                            "incl_tax": 32,
                            "excl_Tax": 25.6
                        },
                        "services": [
                            {
                                "code": "servicepoint",
                                "description": "",
                                "required": true
                            }
                        ]
                    },
    
                ...
                ],
            ...
            },
        } 
    }
    

    country_code in ISO 3166-1 alpha-2 format. (eg: DK)

    HTTP Request

    GET https://api.coolrunner.dk/v3/products

    JSON Response Body

    Parameter Type Description
    country_code Array Country code in ISO 3166-1 alpha-2 format. (eg: DK)
    carrier Object Carrier (eg: dao)
    type Object Type of product (eg: private)
    title String Title for product (eg: DAO Pakkeshop (0-1 kg)
    max_size Object Max size for the product the carrier supports
    • length - Float - Length in centimeters (eg: 50).
    • height - Float - Height in centimeters (eg: 30).
    • width - Float - Width in centimeters (eg: 30).
    • weight - Float - Max weight in kilograms (eg: 1000).
    weight Object Interval for weight measured in grams
    • from - Float - From-interval for weight in grams (eg: 0).
    • to - Float - To-interval for weight in grams (eg: 1000).
    prices Object Prices for the product in danish kroners (DKK)
    • incl_tax - Float - Price including tax in kroners (eg: 32)
    • excl_tax - Float - Price excluding tax in kroners (eg: 25.6)
    services Object The service the product is
    • code - String - code for service (eg: servicepoint)
    • description - String - Description for the service (eg: "")
    • required - Boolean - Required for the service (eg: true)

    Reports

    Generate report

    POST https://api.coolrunner.dk/v3/reports

    curl -X POST \
      'https://api.coolrunner.dk/v3/reports' \
      -H 'Authorization: Basic xxxxx' \
      -H 'X-Developer-Id: xxxxx'
       -d 
    {
      "from_date": "2020-05-01 00:00",
      "to_date": "2020-05-31 00:00",
      "carriers": [
        "dao",
        "bring",
      ]
    }
    

    The request above returns JSON structured like this:

    HTTP/1.1 200 OK
    
    {
      "report_id": "1",
      "download_links":
      {
          "excel": "https://api.coolrunner.dk/v3/reports/1/excel",
          "json": "https://api.coolrunner.dk/v3/reports/1/json",
      }
    }
    
    

    Generates report, for a maximum of 10.000 labels.

    HTTP Request

    POST https://api.coolrunner.dk/v3/reports

    JSON Request Body

    Parameter Type Description
    from_date String Defines which date to generate report from (eg: 2020-05-01 00:00)
    to_date String Defines which date to generate report to (eg: 2020-05-31 00:00)
    carriers Array Defines which carriers labels to generate report from (eg: ['dao','bring'])

    JSON Response Body

    Parameter Type Description
    report_id Integer The ID of the report
    download_links Object Object containing links to the report in excel and json format
    • exel - String - Download link for XLSX file
    • json - String - Download link for XLSX file

    Get status

    GET https://api.coolrunner.dk/v3/reports/:report_id/status

    curl -X GET \
      'https://api.coolrunner.dk/v3/reports/:report_id/status' \
      -H 'Authorization: Basic xxxxx' \
      -H 'X-Developer-Id: xxxxx'
    
    

    The request above returns JSON structured like this:

    HTTP/1.1 200 OK
    
    {
      "report_id": 1,
      "progress": "100%",
      "status": "complete%"
    }
    
    

    Get status of report

    HTTP Request

    GET https://api.coolrunner.dk/v3/reports/:report_id/status

    URL Parameters

    Parameter Description
    report_id ID of the report you want to get status of

    JSON Response Body

    Parameter Type Description
    report_id String ID of the report
    progress String Percent done
    status String Indicates the status of the report (eg. complete)

    Get JSON

    GET https://api.coolrunner.dk/v3/reports/:report_id/json

    curl -X GET \
      'https://api.coolrunner.dk/v3/reports/:report_id/json' \
      -H 'Authorization: Basic xxxxx' \
      -H 'X-Developer-Id: xxxxx'
    
    

    The request above returns JSON structured like this:

    HTTP/1.1 200 OK
    
    {
        "overview": {
            "from": "2018-01-12 12:00:00",
            "to": "2018-01-12 12:01:00",
            "countries": [],
            "carriers": []
        },
        "count": {
            "count": 1,
            "countries": {
                "DK": 1
            },
            "carriers": {
                "dao_private_delivery": 1
            }
        },
        "shipments": [
            {
                "package_number": "00058126960004762308",
                "order_number": null,
                "reference": null,
                "carrier": "dao",
                "carrier_product": "private",
                "carrier_service": "delivery",
                "created_at": "2018-01-12 12:00",
                "zip_code": "9370",
                "country_code": "DK",
                "events": [
                    {
                        "timestamp": "2018-01-12 12:00",
                        "title": "Electronic data received",
                        "event": "received",
                        "location": ""
                    },
                    {
                        "timestamp": "2018-01-13 16:00",
                        "title": "Parcel has been delvierd to carrier",
                        "event": "delivered_carrier",
                        "location": "9370 Hals"
                    },
                    {
                        "timestamp": "2018-01-15 03:00",
                        "title": "Arrived to parcel sorting center Aalborg",
                        "event": "arrived",
                        "location": "9000 Aalborg"
                    },
                    {
                        "timestamp": "2018-01-15 10:00",
                        "title": "Parcel delivered to customer",
                        "event": "delivered",
                        "location": "Bøgildsmindevej 3, 9400 Nørresundby"
                    },
                    "..."
                ]
            }
        ]
    }
    

    Get status of report

    HTTP Request

    GET https://api.coolrunner.dk/v3/reports/:report_id/json

    URL Parameters

    Parameter Description
    report_id ID of the report you want to get status of

    JSON Response Body

    Parameter Type Description
    overview Object Object containing the paramenters used to create report
    count Object Object containing count of different key attributes:
    • count - Number of shipments
    • countries - Number of shipments per country
    • carriers - Number of shipments per carrier product
    shipments Array List of shipments

    Get EXCEL

    GET https://api.coolrunner.dk/v3/reports/:report_id/excel

    curl -X GET \
      'https://api.coolrunner.dk/v3/reports/:report_id/excel' \
      -H 'Authorization: Basic xxxxx' \
      -H 'X-Developer-Id: xxxxx'
    

    The request above returns an XLSX file:

    HTTP/1.1 200 OK
    
    // XLSX returned as body
    

    Get report as XLSX file

    HTTP Request

    GET https://api.coolrunner.dk/v3/reports/:report_id/excel

    URL Parameters

    Parameter Description
    report_id ID of the report you want to get status of

    JSON Response Body

    an XLSX is returned with the shipping label.

    Errors

    The CoolRunner API uses the following error codes:

    HTTP

    Example of validation error (HTTP/422 Unprocessable Entity)

    HTTP/1.1 422 Unprocessable Entity
    
    {
        "type": "ShipmentBooking",
        "message": "Shipment Invalid: errors: No product found for shipment",
        "more_info": "https://docs.coolrunner.dk/v3/#create",
        "error_id": "Ny0xNTk1NTc5MDc4LTgzMDc"
    }
    
    Code Meaning Description
    400 Bad Request Something is wrong.
    401 Unauthorized Your credentials are incorrect.
    403 Forbidden You do not have access to the requested resource.
    404 Not Found The specified endpoint could not be found.
    406 Not Acceptable You requested a format that isn't json.
    410 Gone The entity requested has been removed from our servers.
    422 Unprocessable Entity Validation failed - Check the error message for details.
    500 Internal Server Error We had a problem with our server. Try again later.
    503 Service Unavailable We're temporarily offline for maintenance. Please try again later.