Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

URL

https://api.dds.boknett.no/usage/streaming

Method

POST

Request headers

Authorization

Required

Date

Required

JSON attributes

isbn

Required

ISBN of the book you are reporting numbers for, mandatory

periodFrom

Required

Start of the reporting period on the format yyyy-MM

periodTo

Required

End of the reporting period on the format yyyy-MM

productOwnerId

Required

Numeric ID of the publisher who owned the rights to the book during the reporting period

productOwnerName

Optional

Name of the publisher who owned the rights to the book during the reporting period

cost.totalCost

Required

The total cost that will be billed for this ISBN

cost.paidCost

Optional

Can be sent in addition to cost.totalCost if you separate between trial and subscription

cost.trialCost

consumption.total

Required

The total amount of books read

consumption.paid

Optional

Can be sent in addition to consumption.total if you separate between trial and subscription

consumption.trial

price.ppu

Required

The price per book read (price per unit)

price.paidPpu

Optional

Can be sent in addition to price.ppu if you separate between trial and subscription

price.trialPpu

currency

Optional

The currency of the cost/ppu-fields

market

Optional

The market you are reporting for

Response headers

Response body

Empty on success

Returns

204

No success

40x

On errors

Example (curl)

Code Block
breakoutModewide
curl -v -X POST \
    -H "Authorization: Boknett TGT-232156-LFKUYpgAsxobxOMCAXnBXd7YxdmCRhWx91BYrgTHbcrfuflWRV-login.boknett.no" \
    -H  "Date: Thu, 12 Aug 2021 09:09:00 GMT" \
    --header "Content-Type: application/json" \
    --data-binary "@sales_data.json" \
    https://api.dds.boknett.no/usage/streaming

Example content of sales_data.json

Code Block
breakoutModewide
languagejson
{
  items: [
    {
      "isbn": "9782123456789",
      "period": "2021-05",
      "productOwnerId": "9999",
      "productOwnerName": "Example name",
      "cost": {
        "totalCost": "600",
        "paidCost": "450",
        "trialCost": "150"
      },
      "consumption": {
        "total": "30",
        "paid": "15",
        "trial": "15"
      },
      "price": {
        "ppu": "20",
        "paidPpu": "30",
        "trialPpu": "10"
      },
      "currency": "NOK",
      "market": "NO"
    }
  ], ...
}