Skip to content

Generate an SDK

The OpenAPI contract is the single source of truth for this API, so you don't have to hand-write a client - generate a typed one from the live spec and regenerate whenever it changes. No published Harmon SDK required.

Always generate from the canonical spec

Point your generator at the published contract - https://api.harmon.example/openapi.json - not a copied-down file, so your client never drifts from what the API serves.

1. Download the contract

# Download the OpenAPI contract (JSON)
curl -s https://api.harmon.example/openapi.json -o harmon-storefront.openapi.json

# …or YAML
curl -s "https://api.harmon.example/openapi.json?format=yaml" -o harmon-storefront.openapi.yaml

You can also grab it (and a ready-made Postman collection) from the API Reference download menu.

2. Generate a typed client

Pick your stack - each command reads the canonical spec directly:

# Generate fully-typed bindings straight from the live spec.
npx openapi-typescript https://api.harmon.example/openapi.json -o src/harmon-storefront.d.ts

# A tiny typed client (openapi-fetch) that uses them:
npm i openapi-fetch

Want the generated client to use your key automatically? Set it once with the key control on the Quickstart, and every snippet on that page rewrites to your key.

Next steps

Built on the Harmon platform — the storefront API for merchants.