Documentation for Staple's REST APIs

View as Markdown

By vvluc@staple.io / josh@staple.io / hello@staple.io

See our demo at https://www.staple.io/demo if you would wish to sample the scanning using a simple drag and drop interface before using the API directly.

What is this API for?

Everything relating to the Staple platform and scanning invoice, receipts and other documents! Just send up an invoice or receipt, and the API will return a JSON containing all data the could be extracted, along with details of where that information was on the page, and a new tagged image of the original document. This API is optimized for computer generated PDFs, which will have the best performance. However, pdf scans, png, jpeg, tiff, jfif, and docx are also supported.

Please expect the API to change and improve over the coming weeks and months as the models are being constantly improved at Staple. The values and dictionaries key of returned JSON will not be removed, however new ones may be added.

Authentication

Authenticate requests with your x-api-key header plus an Authorization: Bearer <token> header, where the token is the JWT returned by the login endpoint. Contact hello@staple.io for API access.

Rates

The API is load balanced, and should be able to handle a significant number of requests in parallel, but we appreciate your patience with any issues that may occur regarding dropped responses. We recommend testing with no more that 10 parallel requests at a time.

Staple AI reserves the right to make changes to the API, including registration process, access and response values at any time. That means that the returned values you see now are not fixed, and may be subject to change.