Versions Compared

Key

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

...

The Onix Import Service allows clients to post a single Object for registration in the Bokbasen system. 

Note

Payload is limited to 6MB, contact us if that is a problem for you

URL

https://api.bokbasen.io/metadata/import/object/v1/{id}/{type}

Expand
titleLegacy

https://api.boknett.no/metadata/import/object/{id}/{type}/

The token acquired from the login service. Formated "Boknett TGT-...."

Required header: Date. The timestamp the request was made. Must comply with RFC 1123 date formats.

Method

POST

Request headers 

Authorization

Required

The token acquired from the login service.

Audience: https://api.bokbasen.io/metadata/

Content-Type

Required

Based on on content, see table below for valid content types per "type" parameter.

Request body

Binary file content

Response body

XML on validation error, none on 201.

Returns

201

Created

400

Bad Request

500

Internal Server Error

...

{type}

{id}

Allowed "Content-type"

Comment

productimage

EAN

image/jpeg

Cover image for books or image of products, used in mentor and export service

audiosample

EAN

audio/mpeg

Audio sample used mostly for audio books (only MP3 files allowed)

appcover

EAN

image/jpeg

Cover image for ebooks (overrides productimage)

tableofcontents

EAN

application/pdf

Table of contents delivered in pdf.

Sample usage 

Code Block
languagebash
curl -i \
     -H "Content-Type: image/jpeg" \
     -H "Authorization: Bearer <token>" \
     --data-binary @9788203218323_cover.jpg \
     "https://api.bokbasen.io/metadata/import/object/v1/9788200000334/productimage/"
 
HTTP/1.1 100 Continue
Via: 1.1 api.boknett.dev.webbe.no
  
HTTP/1.1 201 Created
Date: Fri, 31 Oct 2014 13:04:44 GMT
Server: Apache-Coyote/1.1
Content-Length: 0
Via: 1.1 api.boknett.no

...