Common API requests

One request per common task, with a link to the guide that explains it. The base URL follows the environment selected above.

Get an access token

curl --request POST 'token URL' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'grant_type=client_credentials' \
  --data-urlencode 'client_id=YOUR_CLIENT_ID' \
  --data-urlencode 'client_secret=YOUR_CLIENT_SECRET' \
  --data-urlencode 'scope=channel-partner-api/server'

Tokens are short-lived and work in one environment only. Cache the token rather than fetching a new one per request. See Authentication and first request.

Your partner account

curl 'API URL/v1/channel-partners/me' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN'

Confirms which partner your credentials resolve to.

Verification

# create the request
curl --request POST 'API URL/v1/verifications' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'X-Partner-Id: YOUR_PARTNER_ID' \
  --header 'Content-Type: application/json'

# mint a link for every individual on it
curl --request POST 'API URL/v1/verifications/{id}/links' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'X-Partner-Id: YOUR_PARTNER_ID'

# read the result
curl 'API URL/v1/verifications/{id}' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'X-Partner-Id: YOUR_PARTNER_ID'

# entity report for the whole customer
curl --request POST 'API URL/v1/verifications/{id}/report' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'X-Partner-Id: YOUR_PARTNER_ID'

# individual report for one person
curl --request POST 'API URL/v1/verifications/{id}/individuals/{individualId}/report' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'X-Partner-Id: YOUR_PARTNER_ID'

The minted URLs come back in that one response and nowhere else. Report URLs expire in 15 minutes. See Verification.

Business lookups

curl --request POST 'API URL/v1/business-lookups' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'X-Partner-Id: YOUR_PARTNER_ID' \
  --header 'Content-Type: application/json'

Resolves company ownership from the public registers. For a trust the registers hold nothing useful, see Trust deed analysis.

Customer billing

# create the contact
curl --request POST 'API URL/v1/contacts' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'X-Partner-Id: YOUR_PARTNER_ID'

# mint the single-use card link
curl --request POST 'API URL/v1/contacts/{id}/card-link' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'X-Partner-Id: YOUR_PARTNER_ID'

# reconcile the charges
curl 'API URL/v1/charges?contactId={id}' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'X-Partner-Id: YOUR_PARTNER_ID'

The card link is returned once and never re-issued. See Customer billing.

ATO payments

# create
curl --request POST 'API URL/v1/payments' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'X-Partner-Id: YOUR_PARTNER_ID' \
  --header 'Content-Type: application/json'

# list, 1-100 per page
curl 'API URL/v1/payments?limit=20&from=0' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'X-Partner-Id: YOUR_PARTNER_ID'

See ATO payments.

Webhooks

# delivery history
curl 'API URL/v1/webhook-notifications' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'X-Partner-Id: YOUR_PARTNER_ID'

# retry one
curl --request POST 'API URL/v1/webhook-notifications/{id}/retry' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'X-Partner-Id: YOUR_PARTNER_ID'

A manual retry queues the notification for every destination currently subscribed to that event category, and creates new rows with their own attempt limit. See Webhooks.