If you haven't already, you will need to create an account through your Better World Books representative.
You will have been provided the following API credentials to use with each request:
Credentials provided from Better World Books should never be shared.
The API is a simple REST service which you can access via the HTTP POST
method.
Note: For security reasons, all requests must be made using HTTPS
.
As an example in JavaScript, you may choose to use jQuery and make an AJAX call as seen below.
$.ajax({ url: 'https://ps.betterworldbooks.com/screen/', type: 'POST', data: { isbn: '9780679805274', accountName: 'YOUR_ACCOUNT_NAME', user: 'YOUR_USER_NAME', password: 'YOUR_PASSWORD', country: 'US', // optional province: 'IN', // optional }, cache: false }).done(function (r) { // ... handle the response }).error(function (e) { // ... handle any error codes });
If you'd like to see additional samples in another language, please contact your Better World Books representative.
Optionally specifying the Country
and Province
of your request will allow the API to determine which Warehouse is chosen to ship to. The table below shows which Country/Province combinations are valid.
Provinces are not applicable to the UK.
Responses are returned in JSON
format.
This sample shows a response with an ISBN that was accepted:
{ "isbn": "9780679805274", "isAccepted": true, "AcceptedItemId": 55555555, "message": "", "warehouseId": "75", "warehouseName": "Reno", "warehouseAddress": "14525 Industry Cir, Reno, NV 89506" }
This sample shows a response in which the ISBN was rejected:
{ "isbn": "9780679805274", "isAccepted": false, "message": "", "warehouseId": "", "warehouseName": "", "warehouseAddress": "" }
The API is a simple REST service which you can access via the HTTP POST
method.
Note: For security reasons, all requests must be made using HTTPS
.
As an example in JavaScript, you may choose to use jQuery and make an AJAX call as seen below.
$.ajax({ url: 'https://ps.betterworldbooks.com/send/', type: 'POST', data: { isbn: '9780679805274', acceptedItemId: 5555555, quantity: 1, accountName: 'YOUR_ACCOUNT_NAME', user: 'YOUR_USER_NAME', password: 'YOUR_PASSWORD' }, cache: false }).done(function (r) { // ... handle the response }).error(function (e) { // ... handle any error codes });
If you'd like to see additional samples in another language, please contact your Better World Books representative.
Responses are returned in JSON
format.
This sample shows a response in which the request was accepted:
{ "success": true, "message": "Thank you!" }
This sample shows a response in which the request was rejected:
{ "success": false, "message": "Accepted record not found for 9780316129085." }
We're happy to help if you're having trouble. And we're always looking for great feedback on how we can do better.
Please contact your Better World Books representative with any questions or suggestions.