UDC Super SE

Unifaun DeliveryCheckout Klarna

Using Unifaun DeliveryCheckout Klarna you can present precise and relevant delivery options for every customer in your webshop.

Before you get started, make sure you have everything you need:

  • A Klarna Checkout (KCOv3) integration

  • Credentials to log in to the Klarna Merchant Portal

  • Credentials to log in to Unifaun Online.

To implement Unifaun DeliveryCheckout Klarna you need to:

There is a variety of possibilities for you to create flexible and personalized delivery options for your customers, for example:

  • Use different languages and currencies.

  • Set up conditions by using parameters, e.g. weight limitations, cart price and destination.

  • Add additional services not connected to a carrier, e.g. 'Express packaging'.

  • Add custom agents, e.g. your own physical shops.

  • Add extra data fields, e.g. door code and contact information.

  • Connect delivery checkouts to profile groups by using profile management. Mainly used if the delivery checkout set-up is hosted by a 3PL.

The delivery options are always validated using zip codes provided by the carrier. For some carriers you may have to upload zip code lists yourself. Please refer to Condition lists.

Tip

To get the most out of Unifaun DeliveryCheckout Klarna, it’s important to consider your requirements from the very beginning.

The starting point is always the practice that is or should be established within the company or organization.

You should take into account how many webshops you have, in which countries you operate and which languages and currencies to support.

Also consider which transport services to support in different markets, under which circumstances and for which deliveries they should be available.

Checkout flow

Set-up

Delivery checkout ID is always the highest level. You can build your entire structure from one ID. If you have more than one webshop, operate on different markets with different carriers, support several countries, languages and currencies, it's a good idea to consider more than one delivery checkout.

A delivery option is always connected with a service, e.g. "PostNord MyPack Collect" and "DHL Paket".

Addons, carrier specific or custom addons, can be added for services.

Tip

A general recommendation is not to display too many overlapping delivery options.

UDC__Flat_set-up.png

Create a delivery checkout

Notice

Before you begin, make sure you have at least one sender in your address book. Please refer to Add a new sender in the GUI or Import address book.

  1. Go to Maintenance > Delivery checkout.

  2. Click New delivery checkout.

    The delivery checkout is assigned a unique Delivery checkout ID.

  3. Select a Default sender to automatically get e.g. log in information and customer number.

  4. Check the Advanced route handling box if you need to add another default sender for bulk services from abroad.

  5. Template should be set to “Klarna standard”.

  6. Click Add.

  7. In the Languages section, select and add the languages that should be available in the delivery checkout, e.g. "en".

  8. In the Currencies section, select and add the currencies that should be available in the delivery checkout, e.g. "EUR".

  9. Add new parameters, extra data fields and custom addons if applicable.

  10. When you have added languages and currencies, the section Delivery options is shown.

  11. Click New option.

Notice

For most delivery options and services it is possible to enter appliance conditions.

Delivery options

  1. The name you give the delivery option, e.g. "Home", is for internal use only.

  2. Select a service, e.g. "DB SCHENKERparcel" in the Service section.

  3. Click Add service.

  4. Click New in the Prices section to enter prices for the service.

    1. In each currency section, enter the price to be displayed for each language, e.g. "€ 7" in en and the price as a numerical value, e.g. "7.0" in Price.

    2. In the Addons section, click to the left of an addon you want to activate or edit.

      1. Check Preselected, Mandatory or both if the addon should be preselected and/or mandatory in the webshop.

      2. Click New in the Prices section to enter prices for the addon.

        1. In each currency section, enter the price to be displayed for each language, e.g. "€ 1" in en and the price as a numerical value, e.g. "1.0" in Price.

      Important

      If you click OK when leaving the Edit addon page the addon is activated even if you have not entered any information.

  5. In the Delivery interval section, you can enter earliest delivery, latest delivery and cutoff time.

    Example:

    Earliest delivery (in number of days): 1

    Latest delivery (in number of days): 3

    Cutoff: 14:00

    If the customer places the order before 2 p.m., the parcel will be delivered within 1 to 3 days.

  6. Click New in the Fields for titles section.

    1. In the Language section, enter a title in the languages you defined earlier, e.g. ”DB Schenker parcel” in the en field.

      Notice

      Fields for titles is mandatory but will be overwritten by titles from your Klarna Checkout.

  7. Click New in the Sort order section to specify in what place the delivery option should appear.

  8. In the Delivery times section you can enter earliest delivery time, latest delivery time and time zone.

    Example:

    Earliest delivery time: 17:00

    Latest delivery time: 22:00

    The parcel will be delivered between 5 p.m. and 10 p.m..

  9. In the Integer field section you can enter a value that will add days starting from today's date.

    Example:

    Earliest delivery time: 17:00

    Latest delivery time: 22:00

    Integer field 1: 2

    If today's date is June 5 the parcel will be delivered between 5 p.m. and 10 p.m. on June 7.

To add more delivery options for the delivery checkout, click New option on the New delivery checkout page and follow the steps above.

For some items, such as delivery options and prices you can change the order in which the appear in the webshop. Use the UO_Up_icon.png or UO_Down_icon.png icon next to an item row or use Sort order as described above.

Notice

Custom agents are treated as services and are added in the same way.

Click Test to see how the delivery options and sublevels will be displayed in the webshop depending on which parameters you enter.

Important

"tocity" and "tozipcode" are always mandatory but for some carriers other parameters may be required as well.

To show, edit or delete a delivery checkout use the search functionality.

Conditions and parameters

You use parameters to state under which conditions the different delivery options, services and prices are shown in the webshop.

Parameters

Some parameters already exist in the system, but you can also add your own.

Parameters are configured in the UI. If there is no default value, the parameter must be sent in the API call. Parameters connected to the sender are sent automatically.

Notice

Parameters correspond to Klarna tags.

The following parameters comes with the system.

Parameter

Type

date

Date (YYYY-MM-DD)

time

Time (HH:MM)

fromcountry

Text

tocountry

Text

fromzipcode

Text

tozipcode

Text

tostreet

Text

fromstreet

Text

tocity

Text

fromcity

Text

fromstate

Text

tostate

Text

tosms

Text

toemail

Text

todoorcode

Text

weight

Decimal number (0.0)

cartprice

Decimal number (0.0)

uselatestlist

Boolean

Create and add your own parameters

You can add parameters to a new or existing delivery checkout.

  1. Go to Maintenance > Delivery checkout.

  2. When creating a new delivery checkout you create new parameters on the New delivery checkout page.

    To add new parameters on an existing delivery checkout, click to the left of the delivery checkout on the Delivery checkout page.

  3. In the Parameters section you can enter name, type and default value.

  4. Click New parameter.

You delete the parameter by clicking next to it.

Carrier specific parameters

For some carriers there are parameters that should only be used for their services.

Carrier

Parameter

Type

Description

helthjem/Svosj

helthjem_active_subscription

Boolean

Gets set to true if there is an active Svosj-subscription with the recipients email.

helthjem/Svosj

svosj_trial_eligible

Boolean

Gets set to true if the recipient is eligible for a 30 day free Svosj trial account.

Instabox

instaboxexp_recommendable

Boolean

Gets set to true if there is an Instabox locker closer than x meters from the zipcode of the receiver (where "x" is a number configured by the merchant and Instabox).

Operators

The following operators are used to state conditions.

Operator

Meaning

>

greater than

>=

greater than or equal to

<

less than

<=

less than or equal to

=

equal to

!=

not equal to

!

not

&

and

|

or

?

list <parameter> ? "<list name>"

Tip

  • When using only &-operators in an expression, all expressions must be true for the entire expression to be true.

    Example:

    tocountry = "SE" & fromcountry = "SE"

  • When using only |-operators in an expression at least one of the expressions must be true for the entire expression to be true.

    Example:

    tocountry = "SE" | tocountry = "DK" | tocountry = "FI"

  • Always use excluding conditions in e.g. a price list. Otherwise it's the order that decides.

    Example:

    cartprice >= 500.0

    cartprice < 500.0

  • Use parentheses to decide in which order expressions should be evaluated to render the expected result.

    Example:

    weight <=20.0 & tocountry = ”SE” | tocountry = ”DK”

    results in

    weight = 40.0 and tocountry=DK is true

    weight = 10.0 and tocountry=DK is true

    while

    weight <=20.0 & (tocountry = ”SE” | tocountry = ”DK”)

    results in

    weight = 40.0 and tocountry=DK is false

    weight = 10.0 and tocountry=DK is true

  • Instead of creating new parameters or having to write long and complicated expressions you can use ! and != to invert boolean expressions.

    Example:

    !newaccount is true if newaccount is false

    tocountry != "SE" is true if tocountry is not SE

  • Use condition lists to evaluate against a large amount of values, e.g. zip codes.

    Example:

    tozipcode ? "zipcodes_in_gbg_sthlm"

Examples of useful conditions

Example: Price

If the cart contains items for €50 or more the delivery is free of charge.

cartprice >= 500.0

cartprice < 500.0

Example: Weight

This delivery option should only be shown if the weight of the parcel is less than 20 kg.

weight < 20.0

weight >= 20.0

Example: Date range

Delivery is free from Christmas Eve to December 27th.

(Date >= ”2020-12-24" & Date <=”2020-12-27”)

Example: Own parameters

This delivery should use 'Express packaging'.

Express packaging = true

Example: Titles/headings

Orders made before 1 p.m. are delivered within the day.

time < 13:00

Condition lists

Condition lists make it easy to import large amounts of data.

Create a list in .txt format with, for example, zip code ranges and/or single zip code items. The ranges and items must be entered on separate rows. Use a semicolon (;) between items to indicate a range.

Example

11130;11140

11145

11160;11170

11175

11180;11190

41130;41140

41145

41160;41170

41175

41180;41190

You need to upload and activate the condition list.

  1. Go to Maintenance > Delivery checkout.

  2. Click Condition lists.

  3. Click Import and select the condition list file.

  4. Search for the list to activate it. The list has status "OK".

  5. Click to the left of the list and then Activate. An active list has status "OK (Active)".

You can change the name of the list or delete it, but you can't deactivate it.

Custom addons

The custom addon 'Express packaging' can be used for all services.

Extra data fields

You can add extra data fields to a new or existing delivery checkout. The extra data fields are not related to certain services.

  • Door code

  • Delivery instruction

  • Contact

  • Phone

  • Email

  1. Go to Maintenance > Delivery checkout.

  2. When creating a new delivery checkout you enable extra data fields on the New delivery checkout page.

    To create extra data fields on an existing delivery checkout, click to the left of the delivery checkout on the Delivery checkout page.

  3. Click the left of a data field row in the Extra data fields section.

    Important

    If you click OK when leaving an Extra data field page the data field is activated even if you have not entered any information.

You disable an extra data field by clicking to the left of the data field row.

Versions

When you create or edit a delivery checkout you can work with different versions.

  • If you edit an active version, primarily when creating a delivery checkout, you can save the changes by clicking Finish. Then you only have one version of the delivery checkout.

  • If you edit an active version but want to activate the changes at a later occasion, click Save as new version. Then you have two delivery checkouts with the same delivery checkout ID, but the new version is not active.

  • You can copy an existing delivery checkout to create a new delivery checkout ID. It can be used when a new version of the webshop is released in order to synchronize the new code with the new version of the delivery checkout.

    1. Click to the left of the delivery checkout.

    2. Click Copy and give the delivery checkout a new name.

    The delivery checkout gets a new delivery checkout ID and the version is set to active.

  • Activate another version of an existing delivery checkout by clicking to the left of the version that is not active, and then Activate.

Integrate

Please refer to Klarna's documentation on how to integrate KSS with Unifaun DeliveryCheckout.

Before you start you need to create an API key for authentication towards the Unifaun REST API framework.

Tip

We recommend you provide Klarna with a fallback solution for every checkout session in case Klarna does not get a response from our API, e.g. due to maintenance.

This way you ensure that your customers are always presented with shipping options.

Checkout flow

POST /prepared-shipments/{prepareId}/stored-shipments

This endpoint creates a stored shipment from a prepared shipment.

For a stored shipment to be created as 'ready' the values provided must fulfill the specific requirements of the shipment's service.

Endpoint

https://api.unifaun.com/rs-extapi/v1/prepared-shipments/

Authorization

Basic authentication using an API key or custom bearer token based on API key.

URI parameters

prepareId

Identification of the prepared shipment.

Query parameters

keepPreparedShipment

Should be set to "true" if the prepare ID should be used again.

Notice

"keepPreparedShipment" can be used, for example, if an order contains shipments that should be sent from different locations or if an item in the order is backordered.

Body example

{
  "sender": {
    "quickId": "1",
    "name": "Unifaun AB",
    "address1": "Skeppsbron 5-6",
    "zipcode": "41121",
    "city": "GÖTEBORG",
    "country": "SE",
    "phone": "+46 31 725 35 00",
    "email": "email1@example.com"
  },
  "receiver": {
    "name": "Unifaun AB",
    "address1": "Tegnérgatan 34",
    "zipcode": "11359",
    "city": "STOCKHOLM",
    "country": "SE",
    "phone": "+46 8 34 35 15",
    "email": "email2@example.com"
  },
  "parcels": [{
    "copies": "1",
    "weight": "37.5",
    "contents": "important things",
    "valuePerParcel": true
  }],
  "orderNo": "order number 123",
  "senderReference": "sender ref 234",
  "receiverReference": "receiver ref 345",
  "options": [{
    "message": "This is order number 123",
    "to": "email2@example.com",
    "id": "ENOT",
    "languageCode": "SE",
    "from": "email1@example.com"
  }]
} 

Response example

{
  "href": "https://api.unifaun.com/ufoweb-prod-202002111305/rs-extapi/v1/stored-shipments/4127538",
  "id": "4127538",
  "sndName": "Unifaun AB",
  "sndZipcode": "41121",
  "sndCity": "GÖTEBORG",
  "sndCountry": "SE",
  "rcvName": "Unifaun AB",
  "rcvZipcode": "11359",
  "rcvCity": "STOCKHOLM",
  "rcvCountry": "SE",
  "serviceId": "P15",
  "orderNo": "order number 123",
  "reference": "sender ref 234",
  "parcelCount": 1,
  "normalShipment": true,
  "returnShipment": false,
  "status": "READY",
  "shipDate": "2015-06-02T14:05:56.342+0000",
  "created": "2015-06-02T14:05:56.569+0000",
  "changed": "2015-06-02T14:05:56.569+0000",
  "statuses": [{
    "message": "maximum value (35) exceeded",
    "messageCode": "MaximumFlt",
    "field": "ParcelGroup_Weight",
    "location": "ParcelGroupWeight",
    "type": "ignorable"
  }]
}

For testing the method, please refer to https://api.unifaun.com/rs-docs/ and navigate to /prepare-shipments/stored-shipments POST.

POST /prepared-shipments/{prepareId}/shipments

This endpoint creates one or more shipments from a prepared shipment. Multiple shipments can be created if the stored shipment represent a combined normal and return shipment.

PDF or ZPL documents will be created according to the provided print configuration. By default the documents are returned as a URL. As an option the documents can be inline in the print objects in the result. By default the documents have to be requested from the URL contained in the href value of prints objects in the result. As an option the documents can be inline in the objects in the result.

Important

The generated documents will only be available for one hour.

Endpoint

https://api.unifaun.com/rs-extapi/v1/prepared-shipments/

Authorization

Basic authentication using an API key or custom bearer token based on API key.

URI parameters

prepareID

Identification of the prepared shipment.

Query parameters

returnFile

Should be set to 'true' if the PDF/ZPL file should be returned inline.

keepPreparedShipment

Should be set to 'true' if the prepare ID should be used again.

Notice

"keepPreparedShipment" is used, for example, if an order contains shipments that should be sent from different locations, if an item in the order is backordered or for a return service.

Body example

{
  "printConfig": {
    "target1Media": "thermo-250",
    "target1Type": "zpl",
    "target1XOffset": 0,
    "target1YOffset": 0,
    "target1Options": [{
      "key": "mode",
      "value": "DT"
    }],
    "target2Media": "laser-a4",
    "target2Type": "pdf",
    "target2XOffset": 0,
    "target2YOffset": 0,
    "target3Media": null,
    "target3Type": null,
    "target3XOffset": 0,
    "target3YOffset": 0,
    "target4Media": null,
    "target4Type": null,
    "target4XOffset": 0,
    "target4YOffset": 0
  },
  "shipment": {
    "parcels": [{
      "copies": "1",
      "weight": "2.75",
      "contents": "important things",
      "valuePerParcel": true
    }],
    "orderNo": "order number 123",
    "senderReference": "sender ref 234",
    "receiverReference": "receiver ref 345",
    "options": [{
      "message": "This is order number 123",
      "to": "email2@example.com",
      "id": "ENOT",
      "languageCode": "SE",
      "from": "email1@example.com"
    }]
  }
}

Response example

{
  "href": "https://api.unifaun.com/ufoweb-prod-202002111305/rs-extapi/v1/stored-shipments/4127538",
  "id": "4127538",
  "sndName": "Unifaun AB",
  "sndZipcode": "41121",
  "sndCity": "GÖTEBORG",
  "sndCountry": "SE",
  "rcvName": "Unifaun AB",
  "rcvZipcode": "11359",
  "rcvCity": "STOCKHOLM",
  "rcvCountry": "SE",
  "serviceId": "P15",
  "orderNo": "order number 123",
  "reference": "sender ref 234",
  "parcelCount": 1,
  "normalShipment": true,
  "returnShipment": false,
  "status": "READY",
  "shipDate": "2015-06-02T14:05:56.342+0000",
  "created": "2015-06-02T14:05:56.569+0000",
  "changed": "2015-06-02T14:05:56.569+0000",
  "statuses": [{
    "message": "maximum value (35) exceeded",
    "messageCode": "MaximumFlt",
    "field": "ParcelGroup_Weight",
    "location": "ParcelGroupWeight",
    "type": "ignorable"
  }]
}

For testing the method, please refer to https://api.unifaun.com/rs-docs/ and navigate to /prepare-shipments/stored-shipments POST.

GET /prepared-shipments/{prepareId}

This endpoint returns a prepared shipment that was previously created.

Endpoint

https://api.unifaun.com/rs-extapi/v1/delivery-checkouts/

Authorization

Basic authentication using an API key or custom bearer token based on API key.

URI parameters

prepareID

Identification of the prepared shipment.

Response example

{
  "sender": {
    "quickId": "1",
    "name": "Unifaun AB",
    "address1": "Skeppsbron 5-6",
    "zipcode": "41121",
    "city": "GÖTEBORG",
    "country": "SE",
    "phone": "+46 31 725 35 00",
    "email": "email1@example.com"
    },
    "senderPartners": [{
      "id": "PLAB",
      "custNo": "XX"
   }],
   "receiver": {
     "name": "Unifaun AB",
     "address1": "Tegnérgatan 34",
     "zipcode": "11359",
     "city": "STOCKHOLM",
     "country": "SE",
     "phone": "+46 8 34 35 15",
     "email": "email2@example.com"
   },
   "service": {
     "id": "P15"
   },
  "parcels": [{
    "copies": "1",
    "weight": "37.5",
    "contents": "important things",
    "valuePerParcel": true
  }],
  "orderNo": "order number 123",
  "senderReference": "sender ref 234",
  "receiverReference": "receiver ref 345",
  "options": [{
    "message": "This is order number 123",
    "to": "email2@example.com",
    "id": "ENOT",
    "languageCode": "SE",
    "from": "email1@example.com"
  }]
} 

For testing the method, please refer to https://api.unifaun.com/rs-docs/ and navigate to /prepared-shipments GET.

DELETE /prepared-shipments/{prepareId}

This endpoint deletes the prepared shipment from the system. No further operation will be possible on the ID of the prepared shipment.

Endpoint

https://api.unifaun.com/rs-extapi/v1/prepared-shipments/

Authorization

Basic authentication using an API key or custom bearer token based on API key.

URI parameters

prepareID

Identification of the prepared shipment.

No response body is returned when a prepared shipment is successfully deleted.

For testing the method, please refer to https://api.unifaun.com/rs-docs/ and navigate to /prepare-shipments/ DELETE.

POST /agents

This endpoint uploads custom agents.

Endpoint

https://api.unifaun.com/rs-extapi/v1/agents/

Authorization

Basic authentication using an API key or custom bearer token based on API key.

URI parameters - geolocation

key

Required.

activate

Required. Set to "true" if you want to activate the list at once.

countryCode

Required.

type

Set to "normal".

"mapLongitude"

Required.

"mapLatitude"

Required.

Body example

{
  "key": "test_geo",
  "activate": "true",
  "type": "normal",
  "countryCode": "SE",
  "agents": [{
    "id": "1",
    "name": "Agent name 1",
    "address1": "Test gatan 1",
    "address2": "",
    "zipcode": "41118",
    "city": "Göteborg",
    "state": "",
    "countryCode": "SE",
    "mapLongitude": "22.2",
    "mapLatitude": "11.1",
    "phone": "07443332211",
    "email": "test@test.com",
    "additionalInfo": "Additional information",
    "flags": ["express", "hem"],
    "openingHourWeekdays": [{
      "weekday": "monday",
        "hours": [{
          "start": "08:00",
          "stop": "22:00"
        }]
      },
      {
        "weekday": "tuesday",
        "hours": [{
          "start": "08:00",
          "stop": "22:00"
        }]
      },
      {
        "weekday": "wednesday",
        "hours": [{
          "start": "08:00",
          "stop": "22:00"
        }]
      },
      {
        "weekday": "thursday",
        "hours": [{
          "start": "08:00",
          "stop": "22:00"
        }]
      },
      {
        "weekday": "friday",
          "hours": [{
            "start": "08:00",
            "stop": "22:00"
          }]
      },
      {
        "weekday": "saturday",
        "hours": [{
          "start": "08:00",
          "stop": "22:00"
        }]
      },
      {
        "weekday": "sunday",
        "hours": [ {
          "start": "08:00",
          "stop": "22:00"
        }]
      }
      ],
      "openingHourSpecialDays": [{
        "date": "2018-04-27",
        "hours": [ {
          "start": "10:00",
          "stop": "16:00"
        }]
      },
      {
        "date": "2018-04-28",
        "hours": [ {
          "start": "10:00",
          "stop": "16:00"
        }]
      },
      {
        "date": "2018-10-10",
        "hours": [ {
          "start": "10:00",
          "stop": "16:00"
        }]
      }
      ]
    },
    {
    "id": "2",
    "name": "Agent name 2",
    "address1": "Testvägen 10",
    "address2": "",
    "zipcode": "11359",
    "city": "Stockholm",
    "state": "",
    "countryCode": "SE",
    "mapLongitude": "33.3",
    "mapLatitude": "17.4",
    "phone": "0700331122",
    "email": "test2@test2.com",
    "additionalInfo": "Additional information",
    "flags": ["hem"],
    "openingHourWeekdays": [{
      "weekday": "monday",
        "hours": [{
          "start": "10:00",
          "stop": "23:00"
        }]
      },
      {
        "weekday": "tuesday",
        "hours": [{
          "start": "10:00",
          "stop": "23:00"
        }]
      },
      {
        "weekday": "wednesday",
        "hours": [{
          "start": "10:00",
          "stop": "23:00"
        }]
      },
      {
        "weekday": "thursday",
        "hours": [{
          "start": "10:00",
          "stop": "23:00"
        }]
      },
      {
        "weekday": "friday",
          "hours": [{
          "start": "10:00",
          "stop": "23:00"
          }]
      },
      {
        "weekday": "saturday",
        "hours": [{
          "start": "10:00",
          "stop": "23:00"
        }]
      },
      {
        "weekday": "sunday",
        "hours": [ {
          "start": "10:00",
          "stop": "23:00"
        }]
      }
      ],
      "openingHourSpecialDays": [{
        "date": "2020-12-24",
        "hours": [ {
          "start": "10:00",
          "stop": "16:00"
        }]
      },
      {
        "date": "2020-12-25",
        "hours": [ {
          "start": "10:00",
          "stop": "16:00"
        }]
      },
      {
        "date": "2020-12-26",
        "hours": [ {
          "start": "10:00",
          "stop": "16:00"
        }]
      }
      ]
    }
  ]
}  

URI parameters - zip code

key

Required.

activate

Required. Set to "true" if you want to activate the list at once.

countryCode

Required.

type

Set to "zipcode".

agentZipcodes

Required for each agent.

Body example

{
  "key": "test_zipcode",
  "activate": "true",
  "type": "zipcode",
  "countryCode": "SE",
  "agents": [{
    "id": "1",
    "name": "Agent name 1",
    "address1": "Test gatan 1",
    "address2": "",
    "zipcode": "41118",
    "city": "Göteborg",
    "state": "",
    "countryCode": "SE",
    "mapLongitude": "22.2",
    "mapLatitude": "11.1",
    "phone": "07443332211",
    "email": "test@test.com",
    "additionalInfo": "Additional information",
    "flags": ["express", "hem"],
    "agentZipcodes": [ {
      "from": "40000",
      "to": "45000"  
    },
    {
      "from": "46000",
      "to": ""
    }
    ],
    "openingHourWeekdays": [{
      "weekday": "monday",
        "hours": [{
          "start": "08:00",
          "stop": "22:00"
        }]
      },
      {
        "weekday": "tuesday",
        "hours": [{
          "start": "08:00",
          "stop": "22:00"
        }]
      },
      {
        "weekday": "wednesday",
        "hours": [{
          "start": "08:00",
          "stop": "22:00"
        }]
      },
      {
        "weekday": "thursday",
        "hours": [{
          "start": "08:00",
          "stop": "22:00"
        }]
      },
      {
        "weekday": "friday",
          "hours": [{
            "start": "08:00",
            "stop": "22:00"
          }]
      },
      {
        "weekday": "saturday",
        "hours": [{
          "start": "08:00",
          "stop": "22:00"
        }]
      },
      {
        "weekday": "sunday",
        "hours": [ {
          "start": "08:00",
          "stop": "22:00"
        }]
      }
      ],
      "openingHourSpecialDays": [{
        "date": "2018-04-27",
        "hours": [ {
          "start": "10:00",
          "stop": "16:00"
        }]
      },
      {
        "date": "2018-04-28",
        "hours": [ {
          "start": "10:00",
          "stop": "16:00"
        }]
      },
      {
        "date": "2018-10-10",
        "hours": [ {
          "start": "10:00",
          "stop": "16:00"
        }]
      }
      ]
    }
  ]
}  

URI parameters - all

key

Required.

activate

Required. Set to "true" if you want to activate the list at once.

countryCode

Required.

type

Set to "normal".

Body example

{
  "key": "test_all",
  "activate": "true",
  "type": "normal",
  "countryCode": "SE",
  "agents": [{
    "id": "1",
    "name": "Agent name 1",
    "address1": "Test gatan 1",
    "address2": "",
    "zipcode": "41118",
    "city": "Göteborg",
    "state": "",
    "countryCode": "SE",
    "phone": "07443332211",
    "email": "test@test.com",
    "additionalInfo": "Additional information",
    "flags": ["express", "hem"],
    "openingHourWeekdays": [{
      "weekday": "monday",
        "hours": [{
          "start": "08:00",
          "stop": "22:00"
        }]
      },
      {
        "weekday": "tuesday",
        "hours": [{
          "start": "08:00",
          "stop": "22:00"
        }]
      },
      {
        "weekday": "wednesday",
        "hours": [{
          "start": "08:00",
          "stop": "22:00"
        }]
      },
      {
        "weekday": "thursday",
        "hours": [{
          "start": "08:00",
          "stop": "22:00"
        }]
      },
      {
        "weekday": "friday",
          "hours": [{
            "start": "08:00",
            "stop": "22:00"
          }]
      },
      {
        "weekday": "saturday",
        "hours": [{
          "start": "08:00",
          "stop": "22:00"
        }]
      },
      {
        "weekday": "sunday",
        "hours": [ {
          "start": "08:00",
          "stop": "22:00"
        }]
      }
      ],
      "openingHourSpecialDays": [{
        "date": "2018-04-27",
        "hours": [ {
          "start": "10:00",
          "stop": "16:00"
        }]
      },
      {
        "date": "2018-04-28",
        "hours": [ {
          "start": "10:00",
          "stop": "16:00"
        }]
      },
      {
        "date": "2018-10-10",
        "hours": [ {
          "start": "10:00",
          "stop": "16:00"
        }]
      }
      ]
    }
  ]
}  

Response example

For testing the method, please refer to https://api.unifaun.com/rs-docs/ and navigate to /agents POST.

Custom agents

You can add your own agents, e.g. physical stores by uploading custom agent lists.

There are three different ways of showing custom agents in your webshop.

  • Geolocation - Show custom agents within a certain area. When the list is posted the distance to the nearest custom agents is calculated for every zip code. For example, "20" means that agents within a radius of 20 km from a defined GPS coordinate are shown.

    Geolocation can only be used in Denmark (DK), Finland (FI), Norway (NO), Sweden (SE) and Åland (AX).

  • Zip code range - Show custom agents within one or several zip code ranges.

    Notice

    Update the lists on a regular basis to ensure that new zip codes are activated.

  • All - Show all custom agents available in a country.

Regardless of how you want to show the custom agents the following applies:

  • You activate the list on uploading or later in the delivery checkout configuration.

  • You have to create one list per country.

Upload custom agent lists.

Set up custom agents

When you have uploaded the lists you can activate or delete them in the UI. Go to Maintenance > Delivery checkout and click Agent lists.

Custom agents are added as a service connected to a delivery option or sublevel.

  1. Go to Maintenance > Delivery checkout.

  2. Click to the left of a delivery checkout or create a new delivery checkout.

  3. Depending on your set-up:

    • Click New option, if you want to add custom agents as a delivery option, and select "Delivery checkout - Custom agents" from the Service dropdown list.

    • Click to the left of a delivery option and New sublevel, if you want to add custom agents on sublevel, and select "Delivery checkout - Custom agents" from the Service dropdown list.

  4. Select an agent list from the Name (Key for the list) drop-down list.

  5. Enter a value in the Maximum radius (km) field if you want to show custom agents based on geolocation, otherwise it should be set to "0".

  6. With Maximum number of agents you can limit the number of agents that is shown based on geolocation. Max. 15 custom agents.

  7. Click New in the Prices section to add prices for the service.

    • In each currency section add the price to be displayed for each language, e.g. "€ 5", in en and the price as a numerical value, e.g. "5.0", in Price.

Neutral services

You can add neutral services, i.e. services from carriers without specific requirements.

If you have added a neutral carrier in Unifaun Online and assigned it a subId (service code) you can refer to that ID from your checkout.

Set up neutral services

Neutral services are added as a service connected to a delivery option or sublevel.

  1. Go to Maintenance > Delivery checkout.

  2. Click to the left of a delivery checkout or create a new delivery checkout.

  3. Depending on your set-up:

    • Click New option, if you want to add a neutral service as a delivery option, and select "Delivery checkout - Neutral" from the Service dropdown list.

    • Click to the left of a delivery option and New sublevel, if you want to add a neutral service on sublevel, and select "Delivery checkout - Neutral" from the Service dropdown list.

  4. Enter the carrier's subId (service code) for the service to be stored when creating the prepared shipment.

    Important

    If you do not enter the carrier's subId you have to post the service in a later call, before printing or storing the prepared shipment.

  5. Click New in the Prices section to add prices for the service.

    • In each currency section, add the price to be displayed for each language, e.g. "€ 5", in en ,and the price as a numerical value, e.g. "5.0", in Price.

  6. In the Addons section, click to the left of an addon you want to activate or edit.

    1. Check Preselected, Mandatory or both if the addon should be preselected and/or mandatory in the webshop.

    2. Click New in the Prices section to add prices for the addon.

      • In each currency section add the price to be displayed for each language, e.g. "€ 1", in en and the price as a numerical value, e.g. 1.0, in Price.