BetterWorldBooks

PreScreen API

Getting Started

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:

  • Account Name
  • User Name
  • Password

Credentials provided from Better World Books should never be shared.


Endpoints

Making a Request

The API is a simple REST service which you can access via the HTTP POST method.

URL
https://ps.betterworldbooks.com/screen/
Parameters
  • isbn - Can be 10 or 13 characters in length.
  • accountName - See above.
  • user - See above.
  • password - See above.
  • country - Specify country your request is from. (optional)
  • province - Specify state/province your request is from. (optional)

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.

Countries

Provinces

US
CA

Provinces are not applicable to the UK.


The Response

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": ""
}

Making a Request

The API is a simple REST service which you can access via the HTTP POST method.

URL
https://ps.betterworldbooks.com/send/
Parameters
  • isbn - Can be 10 or 13 characters in length.
  • acceptedItemId - Returned as part of the Screen endpoint response.
  • quantity - How many copies you plan to send (can be 0 or greater).
  • accountName - See above.
  • user - See above.
  • password - See above.

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.


The Response

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."
}

Help & Support

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.


Made with in Indiana. Copyright 2017 - . Better World Books. All Rights Reserved.