API Documentation

SMACC provides access to it’s pre-trained invoice extractor via API so you can use it straight in your own applications. For pricing and signup please contact our sales department at sales@smacc.io or +49 30 209970-902

Authorization

You must authenticate to use the API. After you have received your account credentials you have to call our login endpoint in order to receive an access token. With this token you can then use the extraction endpoint.

Call to retrieve a token:

curl -X POST \
'https://api.smacc.io/iam/login' \
-H 'Content-Type: application/json' \
-d '{
"name": "user@domain.com",
"password" : "your-api-password",
"grant_type": "password"
}'

Returns the following result on success:

{
    "access_token": "...your token ..."
}

Calling the extract endpoint

The extractor only takes PDF documents. For sending it in a json request body you have to first base64 encode our pdf file. Then call the extract endpoint with your token from above:

curl -X POST \
  'https://api.smacc.io/v1/invoice-extract' \
  -H 'Authorization: Bearer your-token-here' \
  -H 'Content-Type: application/json' \
  -d '{
	"document-type": "application/pdf",
	"document": "your-pdf-base64-here"
}'