Admin SDK
Build admin dashboards and back-office tools.
Admin SDK Setup
The Admin SDK provides full access to brand administrative operations.
Admin SDK Usage
TypeScript
import { ThreeuAdmin } from "threeu-sdk/admin";
const threeu = new ThreeuAdmin(process.env.THREEU_SECRET_KEY!);
const brand = await threeu.brand("brand-slug");
await brand.products.create({
name: "Black Abaya", price: 350,
currency: "QAR", stock: 20
});
const orders = await brand.orders.list({ status: "pending" });
await brand.inventory.adjust({
product_id: "prod_123", delta: -5, reason: "sold"
});Available Resources
The Admin SDK exposes:
- products — Full CRUD for product catalog
- orders — Order viewing and status management
- customers — Customer profiles and history
- inventory — Stock levels and adjustments
- collections — Product collection management
- discounts — Discount codes and rules
- payments — Payment records and refunds
- shipping — Shipping configuration and rates
- locations — Store locations and warehouses
- analytics — Sales and product analytics
- marketing — Campaign management