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.

NameMandatoryDescription
isbnYes

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

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

outputYes

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

FormatResponse
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:

CodeContentDescription
400cannot_loanThe publication is not available for loan.