Skip to content

PHP, .NET and Java SDKs, spreadsheet functions, n8n, Zapier and Make - #1

Merged
simulieren merged 10 commits into
mainfrom
feat/more-sdks
Nov 4, 2026
Merged

simulieren merged 10 commits into
mainfrom
feat/more-sdks

Conversation

@simulieren

@simulieren simulieren commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Why

Developers who integrate customs data mostly don't write TypeScript or Python. Shop systems in the EU run on PHP (Shopware, Magento, WooCommerce), ERP and forwarder software on .NET and Java, and brokers and compliance teams work in spreadsheets and no-code tools. This PR adds a client for each of those, all on the same /api/v1.

Note

Nothing here is published. Every package is version 0.1.0 and marked "unreleased" in the root README. Publishing needs the owner's accounts (see "Release steps" below).

What's added

Folder What Tested with
php/ hscode/sdk, PHP 8.1+, PSR-18 client (Guzzle in Shopware/Magento works) PHPUnit, 13 tests on PHP 8.1 and 8.3 (Docker)
dotnet/ Hscode.Sdk, netstandard2.0 + net8.0, async with CancellationToken, IHttpClientFactory-friendly xUnit, 14 tests, dotnet pack (Docker)
java/ info.hscode:hscode-sdk, Java 11+, java.net.http, Jackson only, sync + CompletableFuture JUnit 5, 16 tests on Java 11 and 21 (Docker)
sheets/ Google Sheets functions HSCODE, HSCODE_DESCRIPTION, HSCODE_DUTY, HSCODE_VALID Node, 19 tests with fake Apps Script services
excel/ Excel add-in, same functions as HSCODE.CODE, .DESCRIPTION, .DUTY, .VALID Node, 9 tests; manifest passes office-addin-manifest validate
n8n/ n8n-nodes-hscode: classify, batch classify, look up, search, duty history, validate build + 3 tests
zapier/ Classify Product action, Look Up Code and Search Codes searches 6 tests with nock; zapier-platform validate (2 warnings)
make/ Make custom app: Classify Product, Look Up Code, Search Codes JSON parses only

The three SDKs match the TypeScript and Python surface:

classify · classifyBatch (1-25) · lookup · history · search · duties · chapters · chapter · snapshots
  • The key comes from HSCODE_KEY when none is passed, and the year defaults to latest.
  • Codes are stripped of spaces and dots, and bad input fails before any request.
  • Errors carry the HTTP status and the API error code. On 429 they also carry Retry-After and RateLimit-Limit / -Remaining / -Reset, the header names src/lib/server/metering.ts sends.

The spreadsheet functions accept ranges. They send them to the batch endpoint in groups of 25 and cache results for 6 hours, so recalculating a sheet does not use quota again.

CI

The new jobs in .github/workflows/ci.yml:

php:          8.1, 8.4   composer install + phpunit
dotnet:       8.0.x      dotnet test + dotnet pack
java:         11, 21     mvn verify
integrations: node 24    sheets, excel, n8n (build + test), zapier, make JSON parse

All jobs pass on this PR. The existing spec-drift job failed at first because the live API gained a context field after the last main run. Commit 8bf35b8 syncs openapi.json and js/src/schema.ts, and main would have failed the same way on its next nightly run.

Not verified

Warning

  • None of this has called the live API. All tests use mocked HTTP built from openapi.json.
  • The Sheets and Excel functions have not run inside real Google Sheets or Excel.
  • The Make app layout is written from memory of the Make Apps Editor format. It may need adjusting on first import.
  • Excel and CORS: the add-in calls the API from a browser runtime. Today OPTIONS /api/v1/* returns 401. The site PR adding CORS (simulieren/hscode-sveltekit, feat/watch-webhooks) has to ship first unless the add-in is hosted on hscode.info itself.
  • Excel icons: excel/assets/icon-*.png are placeholder blue squares.

Release steps (owner)

  • PHP: Packagist needs composer.json at a repo root. Either split php/ into its own repo (for example with a subtree-split Action) or register a path-based package. After that, tag a release.
  • .NET: dotnet pack then dotnet nuget push with a NuGet API key.
  • Java: a Maven Central (Sonatype) namespace for info.hscode, plus the signing, sources and javadoc plugins in pom.xml.
  • Sheets: clasp push to an Apps Script project, then a Workspace Marketplace listing.
  • Excel:
    • Host the files at https://hscode.info/excel/ (steps in excel/README.md).
    • Replace the icons.
    • Submit to AppSource.
  • n8n: npm publish for n8n-nodes-hscode. Run npx @n8n/scan-community-package n8n-nodes-hscode after publishing.
  • Zapier: zapier-platform login, register and push. It also needs a 256px icon.
  • Make: create the app in Make, deploy the files and add a 512px icon.

@simulieren
simulieren merged commit e099428 into main Nov 4, 2026
10 checks passed
@simulieren
simulieren deleted the feat/more-sdks branch November 4, 2026 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant