Versions Compared

Key

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

...

Get a list of orders based on our access rights, you need to use the query parameter mode to select if you wanter orders that you have sent to check their status (SENT_BY_ME) or orders you are receiving (SENT_TO_ME).

 


URLhttps://api.order.boknett.no/orders
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
Request query parametersfromDateRequired

From date you you want to get the list of orders based on (based on last update date of the order)

YYYYMMDDHHMMSS

modeRequiredSENT_TO_ME | SENT_BY_ME
Response
body
Response HAL JSON document (see example below)
Response headersContent-typeapplication/hal+json
Returns200OK
40xOn error

 


Curl example

Code Block
$curl -i -H "Authorization: Boknett TGT-6150-TxNGbSboEPY24GB9OsO3JyLcyFCbfeSIBHp0TBoVM6Dfgb4mL9-login.webbe.no" -H "Date: Thu, 28 Apr 2016 08:01:22 GMT" 'https://api.order.boknett.no/orders/?mode=SENT_BY_ME&fromDate=20150101120000'
 
HTTP/1.1 200 OK
Date: Thu, 28 Apr 2016 08:02:44 GMT
Content-Type: application/hal+json

(see below for response body example)

 


Response body example

Code Block
titleExample response body
{
      "buyerOrderNumber" : "56a8abfb79829",
      "buyer" : "7045",
      "orderId" : "4db955a8-dcec-415b-b128-90a42125866c",
      "links" : [
         {
            "href" : "https://api.order.boknett.no/orders/4db955a8-dcec-415b-b128-90a42125866c",
            "rel" : "self"
         }
      ],
      "status" : "FAILED",
      "created" : "2016-02-01Z11:26:00",
      "seller" : "900877"
   },
   {
      "orderId" : "46b678a6-49cc-4b2b-9361-0ca73ccd1e16",
      "buyer" : "7045",
      "links" : [
         {
            "href" : "https://api.order.boknett.no/orders/46b678a6-49cc-4b2b-9361-0ca73ccd1e16",
            "rel" : "self"
         }
      ],
      "buyerOrderNumber" : "56ab35d26fdba",
      "status" : "FAILED",
      "created" : "2016-02-01Z11:26:01",
      "seller" : "900877"
   },
   {
      "status" : "SENT",
      "created" : "2016-02-01Z13:44:30",
      "seller" : "900877",
      "orderId" : "73015709-08f3-476f-a152-d9cdc4c7a5f8",
      "buyer" : "116",
      "links" : [
         {
            "rel" : "self",
            "href" : "https://api.order.boknett.no/orders/73015709-08f3-476f-a152-d9cdc4c7a5f8"
         }
      ],
      "buyerOrderNumber" : "99999998"
   } 

...

 Get single order based on Bokbasen's order-id. This view gives all available details on the order and order lines. 


URLhttps://api.order.boknett.no/orders/{ID}
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
Response
body
Response HAL JSON document 
Response headersContent-typeapplication/hal+json
Returns200OK
40xOn error

...


Curl example

Code Block
$curl -i -H "Authorization: Boknett TGT-6150-TxNGbSboEPY24GB9OsO3JyLcyFCbfeSIBHp0TBoVM6Dfgb4mL9-login.boknett.no" -H "Date: Thu, 28 Apr 2016 08:01:22 GMT" 'https://api.order.boknett.no/orders/5df2f39a-7c12-400c-a675-d12e331eb151'
 
HTTP/1.1 200 OK
Date: Thu, 28 Apr 2016 08:02:44 GMT
Content-Type: application/hal+json
 
(see below for response body example)

 


Response body example

Code Block
titleExample response body
{
  "_embedded" : {
    "lines" : [ {
      "lineNumber" : 1,
      "status" : "SENT",
      "ean" : "9788202337926",
      "quantity" : 1
    }, {
      "lineNumber" : 2,
      "status" : "SENT",
      "ean" : "9788202339296",
      "quantity" : 1
    } ]
  },
  "shipToParty" : {
    "id" : "948061937",
    "name" : "Norsk Videregående skole",
    "contactPerson" : "Kari Nordmann",
    "address" : {
      "zip" : "0180",
      "street" : "St. Hanshaugen",
      "city" : "OSLO"
    },
    "communication" : [ {
      "type" : "Email",
      "value" : "kari.nordmann@skole.no"
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "https://api.order.boknett.no/orders/c2b972ee-b2ec-11e5-9c35-0050569f5799"
    },
    "editx" : {
      "href" : "https://api.order.boknett.no/orders/c2b972ee-b2ec-11e5-9c35-0050569f5799/editx"
    }
  },
  "orderId" : "c2b972ee-b2ec-11e5-9c35-0050569f5799",
  "buyerOrderNumber" : "6252911_0",
  "buyer" : "104",
  "created" : "2015-10-13Z07:32:26",
  "status" : "SENT"
} 

 


Possible values for line status

...

Get the EDItX XML representation of a given order based on Bokbasen's order-ID.

 


URLhttps://api.order.boknett.no/orders/{ID}/editx
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
Response
body
EDItX XML document
Response headersContent-typeapplication/xml;charset=UTF-8
Returns200OK
40xOn error

...


Curl example

Code Block
$curl -i -H "Authorization: Boknett TGT-6150-TxNGbSboEPY24GB9OsO3JyLcyFCbfeSIBHp0TBoVM6Dfgb4mL9-login.boknett.no" -H "Date: Thu, 28 Apr 2016 08:01:22 GMT" 'https://api.order.boknett.no/orders/5df2f39a-7c12-400c-a675-d12e331eb151/editx'
 
HTTP/1.1 200 OK
Date: Thu, 28 Apr 2016 08:02:44 GMT
Content-Type: application/xml;charset=UTF-8

...