Skip to main content

SDKs and Postman

Hometown keeps three SDKs and a Postman collection. All four come from the same contract the reference shows, so a field the API adds reaches them together.

LanguagePackageNeeds
TypeScript@hometown-workforce/estimator on npmNode.js 20.19 or newer
Pythonhometown-estimator on PyPIPython 3.11 or newer
PHPhometown/estimator on PackagistPHP 8.2 or newer, ext-curl and ext-json

None of them installs another package.

What every SDK does for you​

  • Types. Every object and request body is typed with the keys of the API, so your editor completes them and a typo fails before it runs.
  • Idempotency. Creating an estimate, a follow-up or a customer sends an Idempotency-Key on its own, or yours. A retry reuses it, so the call is charged once.
  • Retries. A 429 or 503 that carries Retry-After is retried up to twice, waiting what it says. A wait over 60 seconds is not waited for, and nothing else is retried.
  • Errors. Each error code has its own exception class, and every error the API answers carries the request_id to quote to support.
  • Webhooks. One call checks Hometown-Signature and returns the event, the way the webhooks guide describes.
  • A fixed version. Each release sends the Hometown-Version it was built for. The answers keep the shape its types describe until you upgrade.

Versions​

SDK versions read YEAR.MONTH.PATCH, such as 2026.10.0. A release that follows a breaking change of the API moves to a new month. A patch release never changes what a call returns.

Postman​

Import postman.json into Postman. It has one folder per part of the API and an example body on each request. Set the apiKey variable to a test key to try the sandbox. Each create request sends a fresh Idempotency-Key.

License​

The SDKs are source available under the Functional Source License (FSL-1.1-MIT); each version becomes MIT two years after release.