Contents

Overview

Base URL and authentication

Send orders

Order fields

Order statuses

Responses

Product feed

Going live

ViaAds API Documentation

Overview

A custom integration connects your webshop to ViaAds in two parts:

  1. Products are read from a product feed that you publish at a URL. ViaAds fetches it on a schedule — there is nothing to push.
  2. 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

MethodPathBody
POST/ordersA JSON array of orders — use this for batches.
POST/orderA 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.

FieldTypeDescription
orderNumberstringYour unique order number. Used to match updates to the same order.
createdGmtdatetimeWhen the order was placed.
lastModifiedGmtdatetimeWhen the order was last changed.
statusstringThe order's status — see Order statuses.
isCanceledbooleanWhether the order is cancelled. Also set status to cancelled.
currencyIsoCodestringISO 4217 currency code, e.g. DKK.
emailstringThe customer's email address. Must be a valid address.
totalPriceWithTaxdecimalOrder total including VAT. Must be greater than 0.
totalPriceWithOutTaxdecimalOrder total excluding VAT. Must be greater than 0.
totalShippingPricedecimalShipping cost; 0 if none.
itemsarrayThe order lines — see below.
billingobjectOptional. billingFirstName, billingLastName, billingAddress, billingCity, billingState, billingZipCode, billingCountry, billingPhoneNumber, billingEmail — all strings.
shippingobjectOptional. shippingFirstName, shippingLastName, shippingPhoneNumber, shippingEmail — all strings.

Order line fields (items[])

FieldTypeDescription
skustringThe product's id — the same value as the product's id in your product feed.
namestringProduct name.
quantityintegerNumber of units.
unitPricedecimalPrice per unit.
totalPriceWithTaxdecimalLine total including VAT.
totalPriceWithOutTaxdecimalLine 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.

MeaningAccepted values
Not yet completedpending, on-hold, awaiting
Completedcompleted, paid, processing, fulfilled
Cancelledcancelled, canceled, voided
Refundedrefunded, 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 statusMeaning
200The orders were received.
400The 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.
401The API key is missing or not recognised, or the webshop is not active.
500An 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.

FieldRequiredDescription
IdyesUnique product id — the same value you send as sku on order lines.
TitleyesProduct name.
UrlyesLink to the product page.
Image URLyesLink to the main product image.
PriceyesRegular price, including VAT.
Sale pricenoDiscounted price, if the product is on sale.
CurrencynoISO 4217 code, if not part of the price.
AvailabilitynoIn stock: true, in stock, in_stock, 1 or yes. Anything else is out of stock.
Description, Brand, Category, EAN, ColornoUsed to present and match products. Categories as Parent > Child > Grandchild.

Send the feed URL to ViaAds support to have it connected.

Going live

  1. Get your API key from ViaAds support and send them your product feed URL.
  2. Send a few test orders to /order and check that you get 200.
  3. Switch on sending for all orders, including status updates.
  4. Add ViaAds to your cookie consent overview, as described in the Custom Integration guide.

Questions about the integration: email msp@viabill.com.