Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

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

 

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
Example 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 Order

 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
Example response body
{
   "_links" : {
      "self" : {
         "href" : "https://api.order.boknett.no/orders/e8978f1f-4c60-4938-8aee-55179bf3d5de"
      },
      "editx" : {
         "href" : "https://api.order.boknett.no/orders/e8978f1f-4c60-4938-8aee-55179bf3d5de/editx"
      }
   },
   "status" : "SENT",
   "seller" : "900877",
   "_embedded" : {
      "lines" : [
         {
            "status" : "SENT",
            "id" : 1,
            "quantity" : 4
         }
      ]
   },
   "buyer" : "116",
   "created" : "2016-02-01Z14:31:14",
   "buyerOrderNumber" : "99999997",
   "orderId" : "e8978f1f-4c60-4938-8aee-55179bf3d5de"
}  

 

Possible values for line status

ValueDescription
SENTInitial status: Bokbasen's order system has processed the order with no errors and the item is available for the seller in the API
PROCESSINGBokbasen's order system has received the order and is processing it (only visible to the sender of an order)
FAILEDBokbasen'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).
FULFILLEDThe order line is delivered to the end customer.
FULFILLED_BLOCKEDThe order line is delivered to the end customer and the seller does not allow any changes to be made to this line.
RECEIVEDThe order line is received by the seller party
REJECTEDThe seller does not accept this order lines, it is highly recommended that you also provide a comment when using this status.

Get Order EDItX document

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-typetext/xml
Returns200OK
40xOn error
  • No labels