Send Order
New Authentication & URLs introduced Q2 2024
API endpoint
URL |
The token acquired from the Authentication Service. Formated "Boknett TGT-...." Required header: Date The timestamp the request was made. Must comply with RFC 1123 date formats. Example: Tue, 10 Jun 2014 16:23:42 GMT | ||
Method |
| ||
Request |
| Required | Audience: |
| Required |
| |
Request body | Valid EDItX trade order 1.3 | ||
Response | empty on success | ||
Response headers | Location | URL to get information/status about the order (Get Order data) | |
Returns | 202 | Accepted | |
40x | On error |
Processing of orders is asynchronous
Even if order is accepted for processing (202) the actual processing might fail and that will be reported when using get order to see status.
Example EditX payload
Example EditX
<?xml version="1.0" encoding="UTF-8"?>
<Order version="1.3">
<Header>
<!-- Senders number, must be unique for your company.-->
<OrderNumber>test-bokbasen-65900591</OrderNumber>
<IssueDateTime>20160930</IssueDateTime>
<!-- New field February 2019: We now support up to two reference fields at order level. Example below is how it looks when an order comes from digitalelev.no with a customer defined ref-->
<ReferenceCoded>
<ReferenceTypeCode>OrderSourceLocationReference</ReferenceTypeCode>
<ReferenceNumber>digitalelev</ReferenceNumber>
</ReferenceCoded>
<ReferenceCoded>
<ReferenceTypeCode>ContractReference</ReferenceTypeCode>
<ReferenceNumber>88887777</ReferenceNumber>
</ReferenceCoded>
<PurposeCode>Original</PurposeCode>
<BuyerParty>
<PartyID>
<PartyIDType>NBSN</PartyIDType>
<Identifier>1098</Identifier>
</PartyID>
</BuyerParty>
<!-- ShipToParty is not required, only use this is you have agreed with the receiver of order that these fields are necessary. Typically used for ordering digital learning resources. -->
<ShipToParty>
<PartyID>
<PartyIDType>SellersAccountNumber</PartyIDType>
<Identifier>990820023</Identifier>
</PartyID>
<PartyName>
<NameLine>Bokbasen AS</NameLine>
</PartyName>
<PostalAddress>
<AddressLine>Grensen 12</AddressLine>
<PostalTownCity>Oslo</PostalTownCity>
<PostalCode>0159</PostalCode>
</PostalAddress>
<!-- You can send up to 3 CommunicationDetails, allowed types are Email, Phone, FixedPhone, MobilePhone and URL -->
<CommunicationDetails>
<CommunicationTypeCode>Email</CommunicationTypeCode>
<CommunicationLocator>post@bokbasen.no</CommunicationLocator>
</CommunicationDetails>
<CommunicationDetails>
<CommunicationTypeCode>Phone</CommunicationTypeCode>
<CommunicationLocator>23358950</CommunicationLocator>
</CommunicationDetails>
<ContactPerson>
<PersonName>Ketil Stadskleiv</PersonName>
</ContactPerson>
</ShipToParty>
</Header>
<ItemDetail>
<!-- LineNumber must be sequential and unique -->
<LineNumber>1</LineNumber>
<ProductID>
<ProductIDType>EAN13</ProductIDType>
<Identifier>9788202446567</Identifier>
</ProductID>
<OrderQuantity>1</OrderQuantity>
<!-- For digital learning resources: If the sender is the one setting the final price for the product, send this as part of EDItX in order to ensure correct reporting to buyer (price is not sent to publisher) -->
<PricingDetail>
<Price>
<MonetaryAmount>520</MonetaryAmount>
<CurrencyCode>NOK</CurrencyCode>
<PriceQualifierCode>SoldPriceIncludingTax</PriceQualifierCode>
<Tax>
<TaxTypeCode>VAT</TaxTypeCode>
<Percent>25</Percent>
</Tax>
</Price>
</PricingDetail>
</ItemDetail>
<ItemDetail>
<LineNumber>2</LineNumber>
<ProductID>
<ProductIDType>EAN13</ProductIDType>
<Identifier>9788202446574</Identifier>
</ProductID>
<OrderQuantity>8</OrderQuantity>
</ItemDetail>
<ItemDetail>
<LineNumber>3</LineNumber>
<ProductID>
<ProductIDType>EAN13</ProductIDType>
<Identifier>9788203345999</Identifier>
</ProductID>
<OrderQuantity>10</OrderQuantity>
</ItemDetail>
<ItemDetail>
<LineNumber>4</LineNumber>
<ProductID>
<ProductIDType>EAN13</ProductIDType>
<Identifier>9788203346491</Identifier>
</ProductID>
<OrderQuantity>3</OrderQuantity>
</ItemDetail>
<ItemDetail>
<LineNumber>5</LineNumber>
<ProductID>
<ProductIDType>EAN13</ProductIDType>
<Identifier>9788215012988</Identifier>
</ProductID>
<!-- ItemRelatedParty is the product owner of the product, this is only required in cases where ISBN does not uniquely identify a product. -->
<ItemRelatedParty>
<PartyID>
<PartyIDType>NBSN</PartyIDType>
<Identifier>900008</Identifier>
</PartyID>
</ItemRelatedParty>
<OrderQuantity>8</OrderQuantity>
</ItemDetail>
<Summary>
<NumberOfLines>5</NumberOfLines>
</Summary>
</Order>
Curl code example
Curl code example
curl -i \
-H "Content-Type: application/xml" \
-H "Authorization: Bearer <token>" \
-d @path_to_editx_file.xml \
"https://api.bokbasen.io/orders/v1"
HTTP/1.1 202 Accepted
Date: Fri, 30 Sep 2016 06:42:50 GMT
Location: https://api.bokbasen.io/orders/v1/61b7a21c-a48a-4420-a280-14ecc892ae25
Via: 1.1 api.order.boknett.webbe.no
Content-Length: 0