Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

 

This page describes API endpoint for customers with partner models e.g. subscription model with revenue share or other models where you have access to download books from DDS without executing transactions first. All of these APIs require special commercial agreements with Bokbasen and special access rights. If you are building a standard sale-by-item book store you can safely ignore this page.

 

Get raw content

This endpoint gives access to raw files and is used if you have a model where your business yourself i storing, securing and distributing the files. The process for downloading is the same as for Content download, so only this initial step is different. You need to use the {resid} found in the Inventory service to start the download.

 

This will deliver either:

  • Single MP3 file in the best available quality watermarked with your business' id
  • Raw EPUB files with no watermark
  • Raw EPB file with no watermark

 

URLhttps://api.dds.boknett.no/content/raw/{resid} 
MethodGET
Request
headers

Authorization

Required

The token acquired from the Authentication Service.

Formated "Boknett TGT-...."

DateRequiredThe timestamp the request was made. Must comply with RFC 1123 date formats. Example: Tue, 10 Jun 2014 16:23:42 GMT
AcceptRequiredapplication/json (We recommend all new implementations to use this header, XML support will be phased out in the future)
Response
headers

 

Location

https://api.dds.boknett.no/download/{downloadid}/status

Response
body
None
Returns302Found (on success, you will receive this code and a redirection to the resource download status page)
300Multiple Choices

 

 

Revenue share reporting

This service is only for customers with subscription model using the revenue share financial model. When passing the agreed threshold for reading (i.e. 10%) the subscription provider should send a call this usage API reporting which book the threshold was met for. This can either be done in real time or on a batch basis, but reporting should at a minimum be done daily.

 

URLhttps://api.dds.boknett.no/usage/subscription/rvu
MethodPOST
Request
headers

Authorization

Required

The token acquired from the Authentication Service.

Formated "Boknett TGT-...."

DateRequiredThe timestamp the request was made. Must comply with RFC 1123 date formats. Example: Tue, 10 Jun 2014 16:23:42 GMT
Content-typeRequiredapplication/json
JSON attributesresidRequiredThe product ID in DDS. Unique name for e-/audio books found in the inventory service.
dateTimeRequiredThe date the product passed the agreed threshold, given in ISO-8601 format. YYYY-MM-DD
Response
body
Empty on success
Returns204Success
40xOn errors

 

Example (curl)

 

Successful reporting on a book that has reached the reading threshold

 

curl -i-H "Content-Type: application/json" -H "Authorization: Boknett TGT-20025-OIgkKTofLlCJQasKhiuigfGQ7p0PueBCBvp0IFkN7TeQ0lrdFS-login.boknett.no" -H "Date: Fri, 07 Aug 2015 12:54:00 GMT" -d '{"resid":"fab4599e-eb2e-445a-a7f9-4af12c052dec","dateTime":"2015-10-21"}' https://api.dds.boknett.no/usage/subscription/rvu
HTTP/1.1 204 No Content
Date: Fri, 07 Aug 2015 13:04:47 GMT
  • No labels