REST API

Build on the ledger

Search, verify, and register works programmatically. Public read endpoints never expose creator contact details.

Endpoints

  • GET/api/works?q=&type=&country=Search issued works. Returns privacy-safe public records.
  • GET/api/works/{aml}Fetch the public record for one AML number.
  • GET/api/verify/{aml}Recompute the canonical hash and compare it against the on-chain anchor.
  • POST/api/registrationsCreate a draft registration. No number is allocated yet.
  • POST/api/registrations/{id}/checkoutCreate a $20 payment intent (idempotent per registration).
  • GET/api/registrations/{id}Registration status, issued numbers, and anchor state.
  • POST/api/webhooks/airwallexHMAC-signed payment webhook. Issues numbers and triggers anchoring.

Verify a work

curl https://aml.africa/api/verify/NG-M-64830573MO-2026

{
  "amlNumber": "NG-M-64830573MO-2026",
  "metadataHash": "0x9f2c…e41a",
  "anchor": { "status": "confirmed", "chain": "Ethereum", "txHash": "0x7a3f…" },
  "match": true
}