Sample API documentation: the OpenBook REST API

OpenBook is a fictitious global payments company that facilitates the payment of author royalties globally. The goal of this sample documentation is to illustrate how I would help the clients’ developers use the fictitious OpenBook REST API to pay their authors.

Overview

The OpenBook REST API lets you leverage our features directly from your system:

  • Manage authors
  • Pay them
  • Reverse payments made in error
  • View the payments you’ve made and their status

Concepts and Terminology

Author

Authors are the recipients of your royalty payments. You need to add authors to the system and give us their addresses and banking information before you can start paying them.

Payment

Use payments to send money to authors.

The payment amount is what the recipient will receive after conversion and fees. It is specified as:

You cannot update the payments you’ve posted to our system. To correct an error, reverse the payment.

ReversePayment

Mistakes happen. Use reverse payments to cancel payments. You can only reverse the total payment amount. If you need to correct a payment amount, reverse the payment you already made and create a new payment.

Authentication

You need to include an authentication token {authToken} in all your API calls.

💡Contact your OpenBook account manager if you haven’t received instructions on how to obtain an authentication token.

Pass the authentication token in the header of each call as a standard HTTP authorization header with the value Token token={authToken}.

For instance, if the value of your authentication token is aa123456789bbb, every call to the OpenBook API must include the header:

--header 'Authorization: Token token=aa123456789bbb'

Your first API call

Coming soon…