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
- Request an API key at api.data.gov.
- 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.
- Open the NTA application instructions.
- Complete the Web-API application-ID registration form.
- Download and complete the NTA Excel application and system overview.
- Email the file to the address specified on the NTA application page.
- Complete any requested corrections. The NTA states that review normally takes about one to one-and-a-half months.
- 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
| Jurisdiction | Current result | Still needed for scheduled ingestion |
|---|---|---|
| Japan | 10% standard and 8% reduced consumption-tax observations | Archive the NTA rate guide and add deterministic publication reconciliation |
| Finland, Denmark, Norway, Sweden, Iceland | 2026 mileage, per diem, and/or VAT observations where officially published | Archive official artifacts, approve annual rollover and layout-drift tests |
| India | Sources registered; no rate published | HSN/SAC classification, CGST/SGST/IGST consolidation, notification amendment engine |
| Philippines | 12% VAT baseline; EO 77 research only | Exception model; regional-cluster and government-personnel scope parser |
| Mexico | 16% federal IVA plus separately qualified border-stimulus observation | CFDI 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.