> ## Documentation Index
> Fetch the complete documentation index at: https://docs.duvo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# DSV

> Pull DSV invoices with their charge line items and the shipments they bill, for air, sea and rail freight.

> [!NOTE]
>
> **Beta** — This connection is in beta and may change.

DSV is a global freight forwarder. Connecting DSV to Duvo lets your agents pull invoices **with their individual charge lines** and the shipments each invoice bills, so an invoice can be matched to its shipment and re-rated without a second lookup or a manual portal export.

> [!NOTE]
>
> Coverage is **air, sea and rail only**. DSV road freight is billed over EDI and is not visible through this API. See [What this connection cannot do](#what-this-connection-cannot-do).

## Setup

Setup needs two DSV subscriptions, both approved by DSV, plus your myDSV login. Start the subscriptions before you need the connection — DSV reviews each one and does not publish a turnaround time.

**1. Confirm prerequisites**

> [!TIP]
>
> A myDSV account. Its username and password *are* the API credentials — DSV's OAuth takes them directly, so there is no separate application or consumer key to create.

> [!TIP]
>
> An account on the [DSV Developer Portal](https://developer.dsv.com/). Registration is self-service.

> [!TIP]
>
> Your DSV customer code, called the **MDM code**. DSV assigns it when your account is set up and it appears on your DSV invoices.

> [!TIP]
>
> Use a dedicated DSV service login rather than a person's. Because the password *is* the credential, the connection stops working the day that person rotates their password or leaves.

**2. Subscribe to both API products**

On the Developer Portal, under **Products**, subscribe to both:

* **Fetch DSV Access token** — issues the OAuth token. Subscribing to the invoice product alone does not grant token issuance.
* **Invoice — Air, Sea, Rail** — the invoice data itself.

Each subscription is reviewed by DSV. Subscribing to one does not grant the other.

> [!WARNING]
>
> DSV scopes a subscription key to a **single API product**, so the two products issue **two different keys**. They are not interchangeable — sending the invoice key to the token endpoint fails at the gateway, and vice versa.

**3. Collect both subscription keys**

Once DSV approves a subscription, its keys appear on your **Profile** page on the portal. Each product gives you a primary and a secondary key.

Use each product's **primary** key in its own field: the keys are product-specific, and DSV rejects a token key sent to the invoice product. Keep each secondary key so you can rotate without downtime.

**4. Add the connection in Duvo**

On the [Connections page](https://app.duvo.ai/integrations), open DSV and fill in these fields:

**myDSV Username** `string` *required*

The email address you sign in to myDSV with. DSV's OAuth uses it as the `client_id`.

**myDSV Password** `string` *required*

The password for that login, used as the `client_secret`. Prefer a service login over a person's — see the tip above.

**Access Token Subscription Key** `string` *required*

Primary key for the **Fetch DSV Access token** product.

**Invoice Subscription Key** `string` *required*

Primary key for the **Invoice** product. This is a different value from the one above.

**Customer Code** `string` *required*

Your DSV customer identifier (MDM code) — for example `10123456`. Used as the default for invoice queries; individual requests can override it.

**Environment** `string`

Leave empty for production. Enter `demo` to target DSV's demo product instead. The demo and production products are subscribed to separately.

> [accordion] Production access is not self-service
>
> The Developer Portal lists **demo products only**. Production access is an "apply to go live" request to DSV rather than a subscription you can add yourself.
>
> Plan for that step: a working demo connection does not automatically become a production one.

> [accordion] Why two subscription keys
>
> DSV's gateway requires a `DSV-Subscription-Key` header on **every** call, including the token exchange, and scopes each key to one API product.
>
> So the token call carries the Access Token product's key and the invoice call carries the Invoice product's key. Duvo sends the right one on each request; you only need to paste them into the matching fields. If you swap them, DSV rejects the calls at the gateway before your username and password are ever read.

> [accordion] Date filters and the default window
>
> With no invoice date filters, DSV returns the **last 30 days**. If you supply only a start date it uses today as the end; only an end date and it goes back 30 days from there.
>
> Invoice dates cannot be in the future. Payment **due** dates can, and are how you find invoices that are not yet payable.

> [accordion] Third-party documentation
>
> * [DSV Developer Portal](https://developer.dsv.com/) — registration, product subscriptions, and your subscription keys.
> * [DSV API overview](https://www.dsv.com/en/why-dsv/connectivity/dsv-api) — the API programme and available products.
> * [myDSV](https://my.dsv.com/) — the customer portal, where invoice PDFs and road-freight billing live.

## Capabilities

* **List invoices with charge lines** — retrieve invoices for a customer code, each carrying its individual charge line items rather than just a header total, so an invoice total can be broken down and re-rated.
* **Match an invoice to its shipment without a second call** — every invoice embeds the shipments it bills, with house bill, master bill, carrier and SCAC, order numbers and customer references.
* **Compare across three currencies** — each charge line carries the invoice amount, the amount as charged, and the booking country's local amount, plus the exchange rate and per-currency tax that reconcile them. Comparing the wrong pair turns a currency conversion into a phantom overcharge, so all three are kept.
* **Filter by date, due date and transport mode** — narrow by invoice date range, payment due date range, or a single mode (air, sea or rail).
* **Page through large result sets** — results are cursor-paged, and an agent is told when more pages are available. A page too large for one result is refused whole, with the page size to start again with, rather than trimmed behind the cursor. A single invoice that alone exceeds the limit comes back header-only, with its counts and PDF link, so the walk continues.
* **Reach the source document** — each invoice carries a link to its PDF for dispute evidence.

## What this connection cannot do

Being explicit here saves a wasted agent run:

* **No road freight.** Coverage is air, sea and rail. DSV bills European road freight over EDI, and none of it appears through this API. If a meaningful share of your DSV spend is road, this connection will not see it — check the split before relying on it for a total.
* **No production self-service.** The portal only offers demo products; going live is a request to DSV.
* **No PDF retrieval.** Every invoice carries a link to its PDF, and that link is all the connection returns — Duvo does not download the document. DSV publishes an endpoint for it, so the gap is on our side, not the API's.
* **One operation: the filtered invoice list.** DSV also exposes invoice-by-id, invoice-by-shipment-id and invoice-by-customer-reference endpoints; none of them is wired up. To find a single invoice, filter the list by date range and match on the invoice id or shipment reference in the result.
* **Credit-note identification is unconfirmed.** Invoices carry a document type, but DSV publishes no list of its values, so the field is passed through when it is a string (anything else becomes null) and telling a credit note from an invoice has not been verified against live data.

## Key Benefits

* **Re-rating on real charge detail** — charge line items mean an overcharge can be found in the line that caused it, not inferred from a total.
* **No shipment-to-invoice join to build** — the shipment references arrive inside the invoice, so matching does not need a second system.
* **Currency-aware by default** — the three amount columns and the exchange rate are all carried, so a conversion is not mistaken for a discrepancy.
* **Clear failure messages** — a rejected login, a key sent to the wrong product, and an unapproved subscription each report differently, so setup problems are quick to place.

## Works Well With

> [card] [Google Sheets](https://docs.duvo.ai/user-guide/connections/available-connections/google-sheets.md)
>
> Build freight spend summaries or charge-variance trackers from invoice line data.

> [card] [Microsoft Excel](https://docs.duvo.ai/user-guide/connections/available-connections/microsoft-excel.md)
>
> Reconcile DSV charge lines against contracted rates or internal accruals.

> [card] [Maersk](https://docs.duvo.ai/user-guide/connections/available-connections/maersk.md)
>
> Cover ocean carrier invoices alongside forwarder invoices for a fuller spend picture.

> [card] [EDI](https://docs.duvo.ai/user-guide/connections/available-connections/edi.md)
>
> Reach the road-freight billing this API does not cover.

> [card] [Slack](https://docs.duvo.ai/user-guide/connections/available-connections/slack.md)
>
> Alert the team when a charge line falls outside its expected range.

> [card] [Enterprise Browser](https://docs.duvo.ai/user-guide/connections/available-connections/browser.md)
>
> Retrieve invoice PDFs from myDSV when the API link is not enough.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.