Overview

Webpage graphic

The Glassboxx Sales API is a REST API used to send customer and purchase data from a (Vendor) ecommerce website to Glassboxx for audiobook and eBook purchases. You should add calls to the Glassboxx Sales API from the checkout of your website once you have confirmed the order and payment from the customer has been successfully completed.

We have plugins available for common ecommerce platforms that add the necessary calls to Glassboxx to your website, but for other ecommerce platforms, by embedding the Sales API calls yourself, you can pass the customer and purchase details from the checkout of your site.

Request Logic

For each new user session, an authentication token request should be made to generate and receive an authentication token.

Firsty, you should use the check content request (/glassboxxcontent/checkContent) to confirm the book can be fulfilled by Glassboxx.

Then the following sequence of requests should be made at the point in your 3rd party platform after a customer has made a purchase, or you want to send a book(s) to a reviewer:-

  1. The authentication request (/integration/admin/token) should be made to return the authentication token.
  2. The create account request (/glassboxxorder/createAccount) should be made to create a Glassboxx account for the end user. If this request is repeated for the same end customer, Glassboxx will take no action.
  3. The create order request (/glassboxxorder/createOrder) should be made to send the purchase details to Glassboxx.

The Vendor website is responsible for letting the customer know how they can access their purchases. For orders sent using the Sales API, Glassboxx does not send any emails to the end customer.