Skip to content

Developer Platform API

Overview

The Developer Platform API handles signup requests for the Statista Developer Platform.

OpenAPI spec source: PIT-Search-API/developer-platform

Local copy: app/services/api/developer-platform/openapi.yml

Environments

Environment URL
Development https://platform.opp-solutions.dev.aws.statista.com/
Staging https://platform.opp-solutions.stage.aws.statista.com/
Production https://platform.statista.ai/

Env variable: APP_DEVELOPER_PLATFORM_API (see .env.example)

Generated Code

All TypeScript types and the API client are auto-generated from the OpenAPI spec. Never edit files in the generated/ directory.

app/services/api/developer-platform/
├── openapi.yml                          # OpenAPI spec (source of truth)
├── api.server.ts                        # Client factory (getClient, apiUrl)
└── generated/                           # Auto-generated — do not edit
    ├── openapi.server.ts                # TypeScript types (paths, components, operations)
    ├── openapi.helper.server.ts         # Client class wrapping openapi-fetch
    └── client.server.ts                 # Exports getClient, apiUrl, RequestOf, ResponseOf

Regenerate after spec changes:

pnpm run generate-developer-platform-api

This is also run automatically as part of pnpm run dev and pnpm run build.

Usage

The pattern is the same as the Registration API (app/services/api/registration/):

1. Import the client factory

import { getClient } from "~/services/api/developer-platform/api.server";

2. Create wrapper functions per operation

One file per operation (e.g., post-signup.server.ts). Follow the pattern in app/services/api/registration/get-personalization-steps.server.ts.

3. Use generated types directly

For type-only imports (no runtime code needed):

import type { components } from "~/services/api/developer-platform/generated/openapi.server";

type SignupStatus = components["schemas"]["SignupStatus"];
type SignupRequest = components["schemas"]["SignupRequest"];

Updating the OpenAPI Spec

  1. Check the latest spec at the source repo
  2. Copy the contents into app/services/api/developer-platform/openapi.yml
  3. Run pnpm run generate-developer-platform-api to regenerate types
  4. Run pnpm run check to verify nothing broke