...
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 |
| |||||||
Method |
| |||||||
Request headers |
| Required | The token acquired from the login service. Audience: | |||||
| 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 | ||
---|---|---|
| ||
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 |
...