Skip to main content

Get Credentials to Access DSV Road Freight Shipping API

Get Credentials to Access DSV Road Freight Shipping API

Written by Harneet Kaur

Plans: Pro, Enterprise | Platforms: All Platforms, AfterShip Shipping API

Estimated reading time: ≈ 5 minutes

Overview

DSV Road Freight is a door-to-door road freight service that you book through the AfterShip Shipping API using credentials that DSV issues. Learn how to collect those credentials and book a DSV shipment using AfterShip Shipping. This guide walks you through subscribing to the DSV Booking API, registering your myDSV account for access, and sending your first booking request. Once connected, you book DSV road freight shipments directly from your own systems alongside your other carriers.

Before you begin

Requirements

  • A registered DSV Developer Portal account

  • A registered myDSV account

  • An AfterShip Shipping account with API access

  • A credential pair (Access key and subscription key) that matches the environment you connect to, because DSV issues separate credentials for testing and production

Permissions

  • Approval from the DSV business team for each account that calls the API

  • Access to manage API credentials in AfterShip Shipping

Limitations

  • DSV Road Freight is API-only, so you can't create bookings in the AfterShip Shipping app

  • DSV confirms the booking but doesn't return a label file, so you print and apply your own labels

  • DSV Road Freight supports forward shipments only, not return shipments

  • Road Freight is the only supported transport mode. Contact AfterShip support for Air, Ocean, or Rail

Connection steps

DSV issues two keys from two different platforms, and you need both.

  • The subscription key goes in the HTTP header.

  • The access key goes in the request body. Mixing up the two keys is the most common cause of authorization errors.

Step 1: Subscribe to the DSV Booking API

Your subscription key authorizes every call you send to DSV.

  1. Sign up at the DSV Developer Portal, then sign in.

  2. Go to API CATALOGUE > API - ROAD (SOAP).

  3. Select the Connect Booking API version, accept the Terms of Use, then click SUBSCRIBE.

  4. Go to Profile > Subscriptions and copy either the Primary key or the Secondary key. Either one works as your subscription key.

Note: Shipment tracking uses a separate subscription. Subscribe to the Tracking API and use that key in AfterShip Tracking.

Step 2: Register for API access in DSV

Your access key identifies your DSV customer account. DSV issues it only after the business team approves your registration.

  1. Register for a myDSV account, then sign in.

  2. Go to USAGE REGISTRATION > Maintain User.

  3. Under Please select the Web Service(s) you would like to use, select Booking. Select Tracking as well if you need it.

  4. Wait for the DSV business team to approve your selection and assign your account to a customer group. Your selection stays in Awaiting Approval until then.

  5. Open the email with the subject myDSV's - Web Service Request and copy your access key.

Important: DSV grants approval per account, so register every account that calls the API. To retrieve a lost key, go to Forgot your Access Key? > Access Key on the same page.

Required DSV credentials

  • DSV Subscription key

  • Access key

Step 3: Send your booking request

AfterShip Shipping passes your credentials to DSV with each booking. The two keys go in two different places.

  1. Send your DSV subscription key in the HTTP header.

  2. Send your DSV access key in the request body.

  3. Set the service type for your route from the table below.

  4. To reverse a booking, send a cancellation request for that shipment through the API.

service_type

service_name

Mode

ship_from.country

ship_to.country

dsv_d2d

DSV Door to Door

Road Freight

SGP

SGP

Important: Swapping the two keys is the most common cause of authorization errors. The subscription key belongs in the header, and the access key belongs in the request body.

What your users will experience

After completing these steps:

  • You receive a DSV booking confirmation for each successful request

  • AfterShip Shipping returns a placeholder PDF instead of a carrier label, so you print your own labels

  • You cancel any active booking through the API

  • Your shoppers receive DSV tracking updates once you subscribe to the DSV Tracking API in AfterShip Tracking

Troubleshooting tips

Problem

Cause

Solution

Booking requests return an authorization error

The subscription key and access key are in the wrong positions

Move the subscription key to the header and the access key to the request body

Booking requests fail after a successful test

The request uses testing credentials against production

Use the credential pair that matches the environment you call

My registration stays in Awaiting Approval

The DSV business team hasn't assigned your account to a customer group

Contact your DSV representative to confirm the approval status

I can't find the Booking web service in myDSV

Your account isn't mapped to the correct customer group

Contact your DSV representative to arrange the access key

I lost my access key

DSV sends the key by email and doesn't display it in myDSV

Go to Forgot your Access Key? > Access Key in myDSV

Cancelling a booking returns an error

The booking is already cancelled

Check the booking status before you send a cancellation request

FAQ

1. Can I book DSV shipments in the AfterShip Shipping web app?

No. DSV Road Freight is API-only, so you create every booking through the AfterShip Shipping API.

2. Does DSV return a shipping label?

No. DSV confirms the booking without a label file, and AfterShip Shipping returns a placeholder PDF. You print and apply your own labels.

3. Which key goes where?

The subscription key from the DSV Developer Portal goes in the HTTP header. The access key from myDSV goes in the request body.

4. Do I need separate credentials for testing and production?

Yes. DSV issues one credential pair per environment, so collect both pairs if you test before you go live.

5. Can I create return shipments with DSV?

No. DSV Road Freight supports forward shipments only.

6. Do I need a separate subscription for tracking?

Yes. Subscribe to the DSV Tracking API in the DSV Developer Portal and use that key in AfterShip Tracking.

7. Can I use DSV Air, Ocean, or Rail?

No. AfterShip Shipping supports DSV Road Freight only. Contact AfterShip support to request another transport mode.

Key takeaways

  • DSV Road Freight is an API-only door-to-door road freight service in AfterShip Shipping

  • DSV issues two keys: a subscription key from the Developer Portal and an access key from myDSV

  • DSV emails the access key only after its business team approves your myDSV registration

  • DSV confirms bookings without a label, so you print and apply your own labels

  • Swapping the header key and the body key causes most authorization errors

Did this answer your question?