AimRack API
Client SDKs
AimRack publishes an OpenAPI spec for all 1,308 operations, so a typed client in your language is one generator command away — nothing hand-maintained to fall behind.
The spec
The spec is public — no key needed to fetch it, so it works in CI and codegen pipelines:
curl <your-host>/api/v1/openapi.json -o openapi.jsonInside are all 1,308 operations, each a POST tagged by its module, with input schemas taken from the same validators the server runs and response shapes on ~95% of operations — so a generated client is typed in both directions.
TypeScript
@hey-api/openapi-ts generates a typed fetch client plus request/response types, grouped one class per AimRack module:
// openapi-ts.config.ts
import { defineConfig } from "@hey-api/openapi-ts";
export default defineConfig({
input: "<your-host>/api/v1/openapi.json",
output: "src/client",
plugins: [
"@hey-api/client-fetch",
{
name: "@hey-api/sdk",
operations: {
// One class per AimRack module: Sales.getQuotes, Production.insertJob, …
strategy: "byTags",
container: "class",
nestingDelimiters: /(?!)/,
methodName: (name) => name.split(".").pop() ?? name
}
}
]
});npm install -D @hey-api/openapi-ts typescript
npx openapi-tsPython
openapi-python-client generates a modern client with typed models:
pipx install openapi-python-client --include-deps
openapi-python-client generate --url <your-host>/api/v1/openapi.jsonGo
oapi-codegen generates a typed client and request/response structs — pure Go, no Java runtime. Fetch the spec first (the command above), then:
go run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@latest \
-generate types,client -package carbon \
-o carbon.gen.go openapi.jsonRuby, C#, PHP — any language
openapi-generator covers 50+ languages. Its official Docker image needs no Java install — swap -g ruby for csharp, php, or any other generator (with Java 11+ installed, npx openapi-generator-cli takes the same flags):
docker run --rm -v $PWD:/local openapitools/openapi-generator-cli generate \
-i <your-host>/api/v1/openapi.json \
-g ruby \
-o /local/carbon-clientAuthenticate the client
One way in: the spec declares a single Bearer scheme, so every generated client sends a scoped API key from as Authorization: Bearer crbn_…. For the TypeScript client that is one config line:
import { client } from "./src/client/client.gen";
client.setConfig({
auth: "<api-key>"
});What comes back
Single results are the response body itself — no envelope to unwrap. List results come as { results, count }, since a total only means something on a paginated read. Both shapes are in the spec, so generated return types already carry them. Failures return an error body with an HTTP status:
400403404429Key-level failures (an expired or missing key) return 401 before the operation runs — see Authentication.