API REST

SDKs

Hoy la API REST de SELLERP es lo bastante pequeña (3 endpoints) y estable para llamarla con fetch / requests directo. Los SDKs oficiales generados desde OpenAPI vienen en v1.1.

Estado actual

LenguajeStatusETA
TypeScript / Node.jsEn diseño (Stainless / fern.dev)Q3 2026
PythonEn diseño (auto-gen desde OpenAPI)Q3 2026
GoRoadmapQ4 2026
Apps ScriptDisponible (no es SDK formal, es plantilla)

Mientras tanto: cliente TypeScript en 30 líneas

type Order = { id: string; marketplace: string; status: string; total: number; currency: string; /* ... */ };

class SellerpClient {
  constructor(private apiKey: string, private baseUrl = "https://api.sellerp.com/v1") {}

  async listOrders(opts: { limit?: number; cursor?: string; updated_since?: string } = {}) {
    const url = new URL(`${this.baseUrl}/orders`);
    for (const [k, v] of Object.entries(opts)) if (v != null) url.searchParams.set(k, String(v));
    return this.request<{ data: Order[]; pagination: { next_cursor?: string; has_more: boolean } }>(url);
  }

  async getOrder(id: string) {
    return this.request<{ data: Order }>(`${this.baseUrl}/orders/${id}`);
  }

  async me() {
    return this.request<{ data: { organization_id: string; plan: string } }>(`${this.baseUrl}/me`);
  }

  private async request<T>(input: URL | string): Promise<T> {
    const res = await fetch(input, { headers: { Authorization: `Bearer ${this.apiKey}` } });
    if (!res.ok) throw new Error(`SELLERP ${res.status}: ${await res.text()}`);
    return res.json() as Promise<T>;
  }
}