DIGIBIZ Reporting API ยท Sandbox

Quickstart

This guide takes you to your first sandbox call in about ten minutes. You get a token and use it to call /v1/whoami and a first data page.

What you need

The sandbox uses these addresses:

Purpose Value
Token endpoint https://login.microsoftonline.com/e0a4a9bd-bad6-4168-be92-5082a168c035/oauth2/v2.0/token
Scope api://9e80ba51-31dd-4c19-8b53-c098bf37477e/.default
API https://inso-reporting-sandbox.app.spdigi.biz/v1

1. Set the credentials

Read the secret without echoing it. That keeps it out of the shell history.

export CLIENT_ID="<your client ID>"
read -rsp 'Client secret: ' CLIENT_SECRET && echo && export CLIENT_SECRET

2. Get a token

The sandbox uses the client credentials flow of Microsoft Entra ID.

RESPONSE=$(curl -s -X POST "https://login.microsoftonline.com/e0a4a9bd-bad6-4168-be92-5082a168c035/oauth2/v2.0/token" \
  -d grant_type=client_credentials \
  -d client_id="$CLIENT_ID" \
  --data-urlencode client_secret="$CLIENT_SECRET" \
  --data-urlencode scope="api://9e80ba51-31dd-4c19-8b53-c098bf37477e/.default")
TOKEN=$(printf '%s' "$RESPONSE" | jq -r '.access_token // empty')
[ -n "$TOKEN" ] || printf '%s\n' "$RESPONSE" | jq .

Without a token, the last command shows the answer of Entra ID. The fields error and error_description name the cause, for example a wrong client ID or an expired secret.

A token is valid for about 60 to 90 minutes. Get a new one after that.

3. Check your identity

curl -s -H "Authorization: Bearer $TOKEN" "https://inso-reporting-sandbox.app.spdigi.biz/v1/whoami" | jq

The answer names your client ID, the granted proceedings and the column groups. Every proceeding has a fixed key of the form p_.... You use this key later to filter single proceedings.

4. Get a first data page

curl -s -H "Authorization: Bearer $TOKEN" "https://inso-reporting-sandbox.app.spdigi.biz/v1/cases?page_size=100" | jq '.meta, (.data | length), .next_link'

Every answer holds data and meta. Every page except the last also holds next_link. Call next_link as given until the field is absent. Do not build the cursor yourself.

Pick a proceeding with proceeding_id:

curl -s -H "Authorization: Bearer $TOKEN" "https://inso-reporting-sandbox.app.spdigi.biz/v1/invoices?proceeding_id=p_...&page_size=500"

5. When something goes wrong

Errors come as application/problem+json. The field code names the cause. The error catalogue explains every code. The most common cases:

Sandbox limits

Next