Operator runbook / Verified August 10, 2026

Connector setup

Credentials belong in Cloudflare Worker secrets. Official sources without keys still need an approved parser and evidence workflow before scheduled ingestion. This page separates those two problems.

Secrets required
GSA · HMRC · Japan NTA
No-key APIs
EU TEDB · Japan e-Gov · Finland Finlex
Publication sources
Nordics · India · Philippines · Mexico
Acquisition policy
No automated web scraping

01

Confirm Cloudflare access and storage

Run these commands from /home/arty/aaoe-ai. They inspect configuration; they do not print secret values.

cd /home/arty/aaoe-ai
npx wrangler whoami
npx wrangler secret list
npx wrangler d1 migrations list aaoe-rates --remote
npm run check

Do not put credentials in wrangler.jsonc, Git, query strings, screenshots, chat, or support email. wrangler secret put prompts for the value without writing it to the repository.

02

U.S. GSA CONUS per diem

  1. Request an API key at api.data.gov.
  2. Store it and redeploy:
cd /home/arty/aaoe-ai
npx wrangler secret put GSA_API_KEY
npm run deploy

Then check one postal-code and fiscal-year request:

curl --fail-with-body --get 'https://rates.aaoellis.com/v1/rates' \
  --data-urlencode 'type=per_diem' \
  --data-urlencode 'country=US' \
  --data-urlencode 'postal_code=20171' \
  --data-urlencode 'fiscal_year=2026' \
  --data-urlencode 'as_of=2026-08-10'

03

UK HMRC Trade Tariff

Register for managed API access at the Trade Tariff developer hub. Obtain the client ID and client secret, then store each independently:

cd /home/arty/aaoe-ai
npx wrangler secret put HMRC_CLIENT_ID
npx wrangler secret put HMRC_CLIENT_SECRET
npm run deploy

This connector is commodity-specific. It requires an exact 10-digit commodity code and must not be treated as a general UK hotel or meal VAT feed.

04

Japan NTA qualified-invoice issuer API

This is the most important Japan ERP connector currently built. It checks whether a public supplier registration number was a qualified-invoice issuer on the expense date. It does not decide whether the 10% or 8% consumption-tax rate applies.

  1. Open the NTA application instructions.
  2. Complete the Web-API application-ID registration form.
  3. Download and complete the NTA Excel application and system overview.
  4. Email the file to the address specified on the NTA application page.
  5. Complete any requested corrections. The NTA states that review normally takes about one to one-and-a-half months.
  6. When the 13-digit application ID arrives, store it:
cd /home/arty/aaoe-ai
npx wrangler secret put NTA_INVOICE_APP_ID
npm run deploy

Verify with the NTA documentation's public sample registration number:

curl --fail-with-body --get \
  'https://rates.aaoellis.com/v1/japan/invoice-issuers/T8040001999011' \
  --data-urlencode 'as_of=2026-08-10'

The connector archives the response to private evidence storage and deliberately never persists the upstream URL containing the NTA application ID.

05

No-key government APIs

These do not require Cloudflare secrets:

  • EU TEDB VAT: already active through the official SOAP service.
  • Japan e-Gov Law API v2: law retrieval works without a key, but public-officer travel tables still need a versioned Japanese-law parser and explicit scope metadata.
  • Finland Finlex: official legislation is available without a key; automated annual-rate ingestion still needs Akoma Ntoso parsing and reconciliation tests.
curl --fail-with-body \
  'https://laws.e-gov.go.jp/api/2/law_data/325AC0000000114?asof=2026-08-10&response_format=json&json_format=light'

curl --fail-with-body \
  -H 'Accept: application/xml' \
  -H 'User-Agent: AAOE-Governed-Rate-Feed/0.2 (+https://rates.aaoellis.com)' \
  'https://opendata.finlex.fi/finlex/avoindata/v1/akn/fi/act/statute/2025/970/fin@'

Sweden advertises a no-key API and CSV for foreign-travel normal amounts, but the exact production contract is not guessed from its JavaScript portal. It remains a missing item until the authority's endpoint can be pinned and tested.

06

Official-publication sources

JurisdictionCurrent resultStill needed for scheduled ingestion
Japan10% standard and 8% reduced consumption-tax observationsArchive the NTA rate guide and add deterministic publication reconciliation
Finland, Denmark, Norway, Sweden, Iceland2026 mileage, per diem, and/or VAT observations where officially publishedArchive official artifacts, approve annual rollover and layout-drift tests
IndiaSources registered; no rate publishedHSN/SAC classification, CGST/SGST/IGST consolidation, notification amendment engine
Philippines12% VAT baseline; EO 77 research onlyException model; regional-cluster and government-personnel scope parser
Mexico16% federal IVA plus separately qualified border-stimulus observationCFDI catalogs, border eligibility engine, 32-state lodging-tax source contracts

“Available” publication observations are source-linked and honest about the absence of archived raw bytes. They become archived evidence only after the artifact pipeline has actually captured and hashed the source.

07

Mexico must be modeled as layers

Mexico is intentionally fail-closed. The 8% border result is a conditional fiscal credit against the 16% IVA, not a blanket geographic tax rate. A postal code alone cannot establish eligibility.

curl --fail-with-body --get 'https://rates.aaoellis.com/v1/rates' \
  --data-urlencode 'type=tax' \
  --data-urlencode 'country=MX' \
  --data-urlencode 'category=federal_iva_standard' \
  --data-urlencode 'as_of=2026-08-10'

curl --fail-with-body --get 'https://rates.aaoellis.com/v1/rates' \
  --data-urlencode 'type=tax' \
  --data-urlencode 'country=MX' \
  --data-urlencode 'category=border_stimulus_conditional' \
  --data-urlencode 'as_of=2026-08-10'

An enterprise connector should eventually evaluate four independent layers: federal IVA, border-stimulus eligibility, state lodging taxes, and CFDI invoice validation. Statutory travel-expense deductibility limits belong in a separate future rate family; they are not per diem.

08

Production verification

cd /home/arty/aaoe-ai
npm run check
npx wrangler secret list
curl --fail-with-body 'https://rates.aaoellis.com/health'
curl --fail-with-body 'https://rates.aaoellis.com/v1/sources'
curl --fail-with-body 'https://rates.aaoellis.com/coverage.json'
curl --fail-with-body 'https://rates.aaoellis.com/openapi.json'

/health should report configured for each secret-backed connector you activated. A credential can be rotated at any time by running the same wrangler secret put command and redeploying.