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 2 Next »

Revision

VersionDateDescription
0.1

 

Initial document

Introduction  Afbeelding nog vervangen

This web service is intended to support the order process of customers of CB for the temporary availability (renting) of digital products.

It has the following operation:

  • placeOrder

Path: /rest/api/v1/DigitalProductRentalService


Specific messages (type/code/text) for this webservice:

Type

Code

Text

E

EBS-00001

Something went wrong in processing the order. Your order is not fulfilled.

E

EBS-10003

A product with this EAN is not available.

E

EBS-10004

This product is not available for delivery.

E

EBS-10005

This OrderReference has already been used, use another reference.

E

EBS-10006

This product can not be ordered yet.

E

EBS-10017

Your credit limit has been exceeded.

E

EBS-10034

This product is not available for the given reading method.

E

EBS-10043

The combination of ReadingMethods and Protection is not allowed

E

EBS-10045

No valid license model found for this order

E

EBS-10046

For licensing models Shoulder and Tail, the rental period has to be 3 weeks

E

EBS-10053

Referenced order not found

E

EBS-10054

Referenced order is not for the same UserId

E

EBS-10060

Product ordered but no price available yet, please try again tomorrow.

Test environment

For information about the test environment and the available test titles see:

Digitaal product testomgeving (https://wiki.cb.nl/display/WEB/Digitaal+product+testomgeving)




For testing the following data is available (other data will result in an error response):

Invalid Vitalsource account credentials (UserId/UserPassword)Tester@cb-logistics.nl / bookshelf
Valid Vitalsource account credentials (UserId/UserPassword)bookshelf@cb-logistics.nl / bookshelf
Accessible EAN9789084999912
Inaccessible EAN8711000287941

Operation: checkAccess

This operation gives as answer if the supplied Bookshelf/VitalSource user has access to the supplied product (purchased on Bookshelf/VitalSource).
It can be used for example on a publisher website for checking if the user should be granted access to specific digital content that is only available for users who purchased the related product.

Request 

  • EAN : The EAN of the product/title that has to be checked (required)
  • UserId : Identifier of the Bookshelf/VitalSource user (required)
  • UserPassword : Password of the Bookshelf/VitalSource user (required)

Response

  • Accessable : Indication (Y/N) if the user has access tot he specified product.

Examples

Situationvalid Bookshelf/VitalSource user and inaccessible product
Request
{
  "EAN": "9789084999912",
   "UserId": "bookshelf@cb-logistics.nl",
  "UserPassword": "bookshelf"
}
Response
{
    "Access": {
        "Accessable": "Y"
    }
}
Situationunknown Bookshelf/VitalSource user

Request
{
  "EAN": "8711000287941",
   "UserId": "bookshelf@cb-logistics.nl",
  "UserPassword": "bookshelf"
}
Response
{
    "Access": {
        "Accessable": "N"
    }
}
Situationunknown Bookshelf/VitalSource user
Request
{
  "EAN": "9789084999912",
  "UserId": "Tester@cb-logistics.nl",
  "UserPassword": "bookshelf"
}
Response
{
    "Message": {
        "MessageType": "I",
        "MessageCode": "EBS-10038",
        "MessageText": "Vitalsource user account unknown."
    },
    "Access": {
        "Accessable": "N"
    }
}


General webservice information

Content-Type

The content/body in the request and the response has to be / will be in json format.

Content-Typeapplication/json

Supported SSL/TLS protocols 

TLS Protocols

TLS1.0 
As of May 17, 2021, CB will no longer support TLS 1.0 and 1.1
TLS1.1
TLS1.2
TLS1.3 

Authentication

CB uses message level authentication based on header parameters “UserName” and “Password”. These will be provided when you sign up for this service at CB.

Response messages

If a webservice is technical able to process, it will respond with a HTTP status 200. The response can contain a message with additional information. It can be an error (MessageType “E”) in case it wasn’t possible to supply a functional answer or additional explanation/information about the answer (MessageType “I”).

A message contains of:

A message contains of:
MessageTypeE or I
MessageCodeformat XXX-99999
MessageTextTextual information/reason

The following generic error (E) messages are defined:

WMS-00002Invalid username/password combination
WMS-00004Not authorized to use this service
WMS-00005No username and/or password provided by the caller
EBS-11000Something went wrong in processing the request
EBS-11001Something went wrong in processing the request

Optional parameter

For any optional attribute one of the following options applies:

  • be filled with the correct value
  • be left out
  • be filled with “” (read empty)

An optional parameter may therefore never be filled with the value null.

  • No labels