Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
Info

New Authentication & URLs introduced Q2 2024

Get Orders

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).

 

...

...

URL

https://api.bokbasen.io/orders/v1

Expand
titleLegacy

https://api.order.boknett.no/orders


Method

GETRequest
headers

Authorization

Required

The token acquired from the Authentication Service.

Formated "Boknett TGT-...."

Required header: Date

Required

The timestamp the request was made. Must comply with RFC 1123 date formats. Example: Tue, 10 Jun 2014 16:23:42 GMT

Method

GET

Request
headers

Authorization

Required

See Authentication Service

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

Request query parameters

fromDate

Required

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

YYYYMMDDHHMMSS

mode

Required

SENT_TO_ME | SENT_BY_ME

Response
body

Response HAL JSON

document 

document (see example below)

Response headers

Content-type

application/hal+json

Returns

200

OK

40x

On error

...

Curl example

Code Block
curl -i \
  -H "Authorization: Bearer <token>" \
  'https://api.bokbasen.io/orders/v1?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

Example response body
Code Block
  {
      "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 Order

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

 

...

...

URL

https://api.bokbasen.io/orders/v1/{id}

Expand
titleLegacy

https://api.order.boknett.no/orders/{

ID}
MethodGETRequest
headers

Authorization

Required

id}

The token acquired from the Authentication Service.

Formated "Boknett TGT-...."

Required header: Date

Required

The timestamp the request was made. Must comply with RFC 1123 date formats. Example: Tue, 10 Jun 2014 16:23:42 GMT

Method

GET

Request
headers

Authorization

Required

See Authentication Service

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

Response
body

Response HAL JSON

document 

document 

Response headers

Content-type

application/hal+json

Returns

200

OK

40x

On error

...

Curl example

Code Block
$curl -i \
      -H "Authorization: Bearer <token>" \
      'https://api.bokbasen.io/orders/v1/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

Example response body
Code Block
{
  "_embedded" : {
"_links    "lines" : [ {
      "selflineNumber" : {
   1,
      "status" : "SENT",
      "hrefean" : "9788202337926",
"https://api.order.boknett.no/orders/e8978f1f-4c60-4938-8aee-55179bf3d5de"
       "quantity" : 1
    }, {
      "editxlineNumber" : {
   2,
      "status" : "SENT",
      "hrefean" : "9788202339296",
   "https://api.order.boknett.no/orders/e8978f1f-4c60-4938-8aee-55179bf3d5de/editx"
    "quantity" : 1
    } ]
  },
  "shipToParty" "status: {
    "id" : "SENT948061937",
    "sellername" : "900877Norsk Videregående skole",
    "_embeddedcontactPerson" : {"Kari Nordmann",
     "linesaddress" : [{
      "zip" : "0180",
  {    "street" : "St. Hanshaugen",
      "statuscity" : "SENT",OSLO"
    },
    "communication" : [ {
      "idtype" : 1"Email",
      "value" : "kari.nordmann@skole.no"
    "quantity} ]
  },
  "_links" : 4{
    "self" : {
  }    "href" :  ]"https://api.bokbasen.io/orders/v1/c2b972ee-b2ec-11e5-9c35-0050569f5799"
    },
    "editx" : {
      "buyerhref" : "116",
https://api.bokbasen.io/orders/v1/c2b972ee-b2ec-11e5-9c35-0050569f5799/editx"
    }
  },
  "createdorderId" : "2016-02-01Z14:31:14",
c2b972ee-b2ec-11e5-9c35-0050569f5799",
  "buyerOrderNumber" : "999999976252911_0",
  "buyer" : "104",
  "orderIdcreated" : "e8978f1f2015-4c60-4938-8aee-55179bf3d5de10-13Z07:32:26",
  "status" : "SENT"
}  

 

Possible values for line status

Value

Description

SENT

Initial status: Bokbasen's order system has processed the order with no errors and the item is available for the seller in the API

UNPROCESSED

Bokbasen's order system has received the order and is processing it (only visible to the sender of an order)

FAILED

Bokbasen's order system was not able to process the order and it failed, contact Bokbasen for details (only visible to the sender of an order).

FULFILLED

The order line is delivered to the end customer.

FULFILLED_BLOCKED

The order line is delivered to the end customer and the seller does not allow any changes to be made to this line.

RECEIVED

The order line is received by the seller party

REJECTED

The seller does not accept this order lines, it is highly recommended that you also provide a comment when using this status.

REQUESTED

This line is added after the initial order was sent, this will always be a negative adjustment of the order.

Get Order EDItX document

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

 

URL

URL

https://api.bokbasen.io/orders/v1/{id}/editx

Expand
titleLegacy

https://api.order.boknett.no/orders/{

ID

id}/

EDItX
MethodGETRequest
headers

Authorization

Required

editx

The token acquired from the Authentication Service.

Formated "Boknett TGT-...."

Required header: Date

Required

The timestamp the request was made. Must comply with RFC 1123 date formats. Example: Tue, 10 Jun 2014 16:23:42 GMT

Method

GET

Request
headers

Authorization

Required

See Authentication Service

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

Response
body

EDItX XML document

Response headers

Content-type

text

application/xml;charset=UTF-8

Returns

200

OK

40x

On error

Curl example

Code Block
curl -i \
  -H "Authorization: Bearer <token>" \
  'https://api.bokbasen.io/orders/v1/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