Skip to main content
Skip table of contents

Selling a publication for lending

Declaring the sale of a publication for lending purposes is very similar to the procedure for selling products to the general public, described in Integrating ebook selling to a website. You can therefore refer to this documentation, taking into account the following few parameters, which differ in their use.

Name

Mandatory

Description

isbn

Yes

Identifier of the library offer received in the ONIX stream (not the ISBN/EAN of the consumer product).

protection

No

Unlike the mainstream market Sales API, the protection setting is not required to sell a library product. The Adobe time-limited protection will be automatically applied to each loan.

loan

No

This parameter is obsolete; it is no longer required for the sale of library products.

output

Yes

Indicates in which format the loan link information will be returned. Possible values: xml, json.

Dans le cas de la vente d'un produit bibliothèque, un lien, qui permet de déclarer un prêt sur cet exemplaire, vous est retourné, soit en XML ou en JSON (voir le paramètre output ci-dessus). Ce lien doit être conservé dans votre système (libraire), et doit être transmis au système de prêt qu'utilise la bibliothèque qui a fait l'achat du livre (référez-vous aux spécifications du système de prêt pour cette étape). Il s'agit d'un lien pérenne.

La réponse prend la forme suivante:

Format

Réponse

XML

<?xml version="1.0" encoding="UTF-8"?>
  <sale>

  <loan-url>[loan_url]</loan-url>

  <status>created</status>

  </sale>

</xml>

json

{"loan_url":"[loan_url]","status":"created"}

The link [loan_url] takes the following form:

https://domaine/api/loans/UGV60GNogpXRcS3UtHAkZcHPOlDTIlnaJ3Z1uFYuf0DQfmgAEnzSUdY3rQY1vRxI/activate

The same HTTP return codes as for the mainstream market Sales API apply, plus the following:

Code

Content

Description

400

cannot_loan

The publication is not available for loan.


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.