ViaAds API Documentation
Overview
A custom integration connects your webshop to ViaAds in two parts:
- Products are read from a product feed that you publish at a URL. ViaAds fetches it on a schedule — there is nothing to push.
- Orders are sent by your system to the ViaAds Orders API, described below. ViaAds uses them to attribute sales and to calculate commission, so every order must be sent, including later status changes such as cancellations and refunds.
Shops that cannot call an API can upload orders as a CSV file instead — ask ViaAds support to set this up.
Base URL and authentication
All requests go to:
https://integration.viaads.dk
Every request is authenticated with the API key issued to your webshop by ViaAds support, sent in the apikey header:
apikey: YOUR-API-KEY
Content-Type: application/json
The key identifies your webshop. Keep it secret: call the API from your server, never from code that runs in your customers' browsers. If you need a key, or think yours has leaked, contact ViaAds support.
Send orders
| Method | Path | Body |
|---|---|---|
POST | /orders | A JSON array of orders — use this for batches. |
POST | /order | A single order object. |
Send each order when it is placed, or send the day's orders in batches at least once a day. Keep batches to 100 orders per request; split larger volumes over several requests.
Orders are identified by orderNumber, so sending the same order again is safe — it updates the order rather than duplicating it. When an order is cancelled or refunded, send it again with the new status.
Example
POST https://integration.viaads.dk/orders
apikey: YOUR-API-KEY
Content-Type: application/json
[
{
"orderNumber": "100234",
"createdGmt": "2026-10-14T09:31:00Z",
"lastModifiedGmt": "2026-10-14T09:31:00Z",
"status": "completed",
"isCanceled": false,
"currencyIsoCode": "DKK",
"email": "customer@example.com",
"totalPriceWithTax": 499.00,
"totalPriceWithOutTax": 399.20,
"totalShippingPrice": 39.00,
"items": [
{
"sku": "PERF-0042",
"name": "Eau de Parfum 50 ml",
"quantity": 1,
"unitPrice": 460.00,
"totalPriceWithTax": 460.00,
"totalPriceWithOutTax": 368.00
}
],
"billing": {
"billingFirstName": "Jens",
"billingLastName": "Hansen",
"billingPhoneNumber": "+4512345678"
}
}
]
Order fields
All fields are required unless marked optional. Dates are ISO 8601 in UTC; amounts are decimals in the order's currency.
| Field | Type | Description |
|---|---|---|
orderNumber | string | Your unique order number. Used to match updates to the same order. |
createdGmt | datetime | When the order was placed. |
lastModifiedGmt | datetime | When the order was last changed. |
status | string | The order's status — see Order statuses. |
isCanceled | boolean | Whether the order is cancelled. Also set status to cancelled. |
currencyIsoCode | string | ISO 4217 currency code, e.g. DKK. |
email | string | The customer's email address. Must be a valid address. |
totalPriceWithTax | decimal | Order total including VAT. Must be greater than 0. |
totalPriceWithOutTax | decimal | Order total excluding VAT. Must be greater than 0. |
totalShippingPrice | decimal | Shipping cost; 0 if none. |
items | array | The order lines — see below. |
billing | object | Optional. billingFirstName, billingLastName, billingAddress, billingCity, billingState, billingZipCode, billingCountry, billingPhoneNumber, billingEmail — all strings. |
shipping | object | Optional. shippingFirstName, shippingLastName, shippingPhoneNumber, shippingEmail — all strings. |
Order line fields (items[])
| Field | Type | Description |
|---|---|---|
sku | string | The product's id — the same value as the product's id in your product feed. |
name | string | Product name. |
quantity | integer | Number of units. |
unitPrice | decimal | Price per unit. |
totalPriceWithTax | decimal | Line total including VAT. |
totalPriceWithOutTax | decimal | Line total excluding VAT. |
Order statuses
Use one of these values for status (case-insensitive). An order with any other status cannot be valued and earns nothing.
| Meaning | Accepted values |
|---|---|
| Not yet completed | pending, on-hold, awaiting |
| Completed | completed, paid, processing, fulfilled |
| Cancelled | cancelled, canceled, voided |
| Refunded | refunded, returned |
If your shop uses its own status names, tell ViaAds support which of your statuses mean what before you go live.
Responses
Every response has a JSON body of the form {"status": ..., "message": "..."}.
| HTTP status | Meaning |
|---|---|
200 | The orders were received. |
400 | The request was invalid — a required field is missing, an email address is invalid, or a total is 0. In a batch, one invalid order rejects the whole request: fix it and send the batch again. |
401 | The API key is missing or not recognised, or the webshop is not active. |
500 | An error on our side. Retry later; if it persists, contact support. |
Product feed
Publish your catalogue as a feed at a URL that ViaAds can fetch with a plain GET request (no login or headers; a token in the URL is fine). XML, CSV and JSON are supported, and a Google Merchant Center feed works as it is. Column or element names don't have to match ours — ViaAds maps them to the fields below when your feed is set up.
| Field | Required | Description |
|---|---|---|
| Id | yes | Unique product id — the same value you send as sku on order lines. |
| Title | yes | Product name. |
| Url | yes | Link to the product page. |
| Image URL | yes | Link to the main product image. |
| Price | yes | Regular price, including VAT. |
| Sale price | no | Discounted price, if the product is on sale. |
| Currency | no | ISO 4217 code, if not part of the price. |
| Availability | no | In stock: true, in stock, in_stock, 1 or yes. Anything else is out of stock. |
| Description, Brand, Category, EAN, Color | no | Used to present and match products. Categories as Parent > Child > Grandchild. |
Send the feed URL to ViaAds support to have it connected.
Going live
- Get your API key from ViaAds support and send them your product feed URL.
- Send a few test orders to
/orderand check that you get200. - Switch on sending for all orders, including status updates.
- Add ViaAds to your cookie consent overview, as described in the Custom Integration guide.
Questions about the integration: email msp@viabill.com.