Skip to main content

SDK Libraries Overview

Staqr provides auto-generated SDK libraries that give you type-safe, language-native interfaces to our APIs.

Why Use SDKs?

FeatureRaw APIPostmanSDK
Type safetyNoNoYes
IDE autocompleteNoNoYes
Compile-time checksNoNoYes
Pre-built modelsNoNoYes
Code generationNoNoYes
Visual testingNoYesNo
Language agnosticYesYesNo

Use SDKs when:

  • Building production integrations
  • Type safety is important
  • You want IDE support and autocomplete
  • Working in supported languages

Use Postman when:

  • Exploring APIs interactively
  • Testing without code
  • Training or demos

Use Raw API when:

  • Language not supported by SDK
  • Need maximum flexibility
  • Simple one-off requests

Available SDKs

Currently Available

LanguagePackageAPIsStatus
TypeScript/JavaScript@staqr/commerce-api-v0Commerce v0Stable
TypeScript/JavaScript@staqr/commerce-api-v1Commerce v1Stable
TypeScript/JavaScript@staqr/commerce-api-v2Commerce v2Stable
TypeScript/JavaScript@staqr/staqr-apiStaqr PlatformStable
Pythonstaqr_commerce_v0Commerce v0Stable
Pythonstaqr_commerce_v1Commerce v1Stable
PythonstaqrStaqr PlatformStable

Coming Soon

LanguageStatusTarget
PHPPlannedQ2 2026
JavaPlannedQ2 2026
C# (.NET)PlannedQ2 2026
GoPlannedQ3 2026
Dart (Flutter)PlannedQ3 2026
Swift (iOS)PlannedQ3 2026
Kotlin (Android)PlannedQ3 2026

Quick Start

TypeScript

# Install (local path for now - not yet published to npm)
npm install file:./sdks/commerce-v1-typescript
import { Configuration, CustomerManagementApi } from '@staqr/commerce-api-v1';

const config = new Configuration({
basePath: 'https://commerce.staqr.com/api',
accessToken: process.env.COMMERCE_API_TOKEN
});

const api = new CustomerManagementApi(config);
const customers = await api.listCustomers();

See TypeScript Guide for full documentation.

Python

# Install (local path for now - not yet published to PyPI)
pip install ./sdks/commerce-v1-python
import staqr_commerce_v1
from staqr_commerce_v1 import Configuration, ApiClient, CustomerManagementApi

config = Configuration()
config.host = "https://commerce.staqr.com/api"
config.access_token = os.environ.get("COMMERCE_API_TOKEN")

with ApiClient(config) as client:
api = CustomerManagementApi(client)
customers = api.list_customers()

See Python Guide for full documentation.


SDK Architecture

All SDKs are auto-generated from OpenAPI specifications using OpenAPI Generator.

OpenAPI Spec (YAML/JSON)

OpenAPI Generator

┌───────────────────────┐
│ TypeScript SDK │
│ Python SDK │
│ (Future: Java, Go...) │
└───────────────────────┘

Benefits of generation:

  • SDKs always match API specification
  • Consistent patterns across languages
  • Automatic updates when API changes
  • Type definitions from API schema

API Coverage

The primary business API for customer and subscription management.

Available operations:

  • Customer Management - CRUD operations, search, hierarchy
  • Subscription Management - Create, modify, terminate
  • Billing - Invoices, payments, wallets, credit operations
  • Orders - Quote to order, fulfillment
  • Product Catalog - Offers, services, charges

Commerce API v2 (Generic CRUD)

Simplified REST interface for basic entity operations.

Use for:

  • Simple CRUD on any entity
  • Generic operations when v1 doesn't have specific endpoint

Commerce API v0 (Legacy)

Complete legacy API - use v1 for new integrations.

Contains:

  • 800+ endpoints (comprehensive but complex)
  • Legacy naming conventions
  • Migration path documented

Staqr Platform API

Core platform operations for flows, connections, and integrations.

Available operations:

  • Flows - Create, execute, manage automation flows
  • Connections - Credential management for integrations
  • Folders - Organize resources
  • Users - User and permission management

Security Considerations

API Key Security

Never embed API keys in client-side code or mobile applications. Always use server-side proxies.

Secure patterns:

  • Store credentials in environment variables
  • Use server-to-server calls for sensitive operations
  • Implement backend proxy for mobile apps
  • Rotate keys regularly

See Authentication Guide for detailed security practices.


Support

SDK Issues:

Feature Requests:

  • Request new languages or features via GitHub issues
  • Community contributions welcome

Next Steps

  1. TypeScript Guide - Full TypeScript/JavaScript documentation
  2. Python Guide - Full Python documentation
  3. Authentication - API key and OAuth setup
  4. Mobile Considerations - Security for mobile apps