...
URL | https://api.dds.boknett.no/order | ||
Method | POST | ||
Request headers | Authorization | Required | The token acquired from the Authentication Service. Formated "Boknett TGT-...." |
Date | Required | The timestamp the request was made. Must comply with RFC 1123 date formats. Example: Tue, 10 Jun 2014 16:23:42 GMT | |
JSON attributes | orderid | Required | Your store order ID. Used as transaction ID in DDS. Must be unique for a purchase. |
resid | Required | The product ID in DDS. Unique name for e-/audio books found in the inventory service. | |
spd | Required | Price in Norwegian "øre" (sold for) including VAT. Example NOK 189 = 18900 | |
id | Optional | DDS-ID for end-consumer | |
firstname | Optional* | First name of the person buying the book (Required for all books with SDRM) | |
lastname | Optional* | First name of the person buying the book (Required for all books with SDRM) | |
excerpt | Optional | Order is for excerpt instead of actual book (defaults to false) | |
Response headers
| Location | https://api.dds.boknett.no/content/{downloadid} | |
Response body | Empty on success | ||
Returns | 201 | Created | |
400 | Bad Request | ||
401 | Unauthorized | ||
403 | Forbidden | ||
406 | Not Acceptable | ||
500 | Internal Server Error |
Example (curl)
Successful creation of an order for a book that does not have social DRM
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 '{"orderid":"123456789","resid":"fab4599e-eb2e-445a-a7f9-4af12c052dec","spd":"18900","id":"gaf4599e-fg5e-445a-a7f9-6af14c052dec"}' https://api.dds.boknett.no/order HTTP/1.1 201 Created |
Successful creation of book with SDRM:
curl -i -H "Content-Type: application/json" -H "Authorization: Boknett TGT-27311-RWtOZJ4KUBSflp0YxvZ5Kgg3EFpdJ1GbgUeKq9Ht2BmdCrPJoa-login.boknett.no" -H "Date: Wed, 12 Aug 2015 11:30:00 GMT" -d '{"orderid":"my-stores-order-id4","resid":"18C8075F-C8B9-4029-9747-7C7F2CFB5CFA","spd":"18900","firstname":"Ola","lastname":"Nordmann"}' "https://api.dds.boknett.no/order"
HTTP/1.1 201 Created |
The returned location header points to the bought resource, for details on how to access the content see Get content.