👨‍💻 Developer Portal · API v2

Pazaryerinde kod yazma zamanı

Her Şey Pazar API'si ile ilan yayını, sipariş yönetimi, ödeme akışı, kargo takibi ve webhook abonelikleri — tek REST API üzerinden. KVKK 6698 + ISO 27001:2022 uyumlu, 99.9% SLA, 60 saniyede başla.

✓ KVKK 6698 ✓ ISO 27001:2022 argon2id key_hash HMAC SHA-256 webhook 90 gün rotasyon

🚀 Quickstart — 60 saniyede ilk istek

API anahtarınızı admin panelinden alın, JWT üretin, ilk endpoint'i çağırın.

# 1. JWT üret (1 saat geçerli)
curl -sS -X POST https://api.herseypazar.com/v2/auth/token \
  -H 'Content-Type: application/json' \
  -d '{"api_key":"hsp_pk_live_xxx","api_secret":"hsp_sk_live_xxx"}' \
  | jq -r .access_token

# 2. İlk istek: aktif satıcıları listele
TOKEN=$(...)  # yukarıdaki çıktı
curl -sS https://api.herseypazar.com/v2/sellers?limit=5 \
  -H "Authorization: Bearer $TOKEN"
import { Her Şey Pazar } from '@herseypazar/sdk';

const hsp = new Her Şey Pazar({
  apiKey: 'hsp_pk_live_xxx',
  apiSecret: 'hsp_sk_live_xxx',
  // baseUrl varsayılanı: https://api.herseypazar.com/v2
});

// İlk istek
const sellers = await hsp.sellers.list({ tier: 'gold', limit: 10 });
console.log(sellers.items.length, 'satıcı bulundu');

// İlan yayınla
const listing = await hsp.listings.create({
  title: 'Samsung Galaxy S24 Ultra',
  price: 54999.90,
  currency: 'TRY',
  stock: 5,
  category_id: '...',
  condition: 'new',
});
from herseypazar import Her Şey PazarClient

hsp = Her Şey PazarClient(api_key="hsp_pk_live_xxx", api_secret="hsp_sk_live_xxx")

# İlk istek
sellers = hsp.sellers.list(tier="gold", limit=10)
print(f"{len(sellers.items)} satıcı bulundu")

# Webhook abone ol
hook = hsp.webhooks.create(
  url="https://magaza.example.com/webhooks/hsp",
  events=["order.placed", "order.shipped", "payment.refunded"],
)
print("Signing secret (sadece bir kez gösterilir):", hook.signing_secret)

📦 21 endpoint, 9 kategori

Public API ile yapabileceklerin (kart tıkla → Swagger UI'da o kategoriyi aç):

🔐

auth · 2 endpoint

API anahtarından JWT üret, mevcut yetkileri sorgula.

Swagger'da aç →
🏪

sellers · 2 endpoint

Satıcı arama, KYC + rating + tier detayları.

Swagger'da aç →
📦

listings · 5 endpoint

İlan ara, oluştur, güncelle, kaldır.

Swagger'da aç →
🛒

orders · 4 endpoint

Sipariş listele, detay, iptal, kargoya ver.

Swagger'da aç →
💳

payments · 1 endpoint

Ödeme iadesi tetikle (kısmi/tam).

Swagger'da aç →
🔍

search · 1 endpoint

Auto-complete önerileri (Meilisearch backed).

Swagger'da aç →
🚚

shipping · 2 endpoint

Çoklu carrier kargo ücreti + takip.

Swagger'da aç →
🛰️

webhooks · 4 endpoint

Olay aboneliği, signing_secret rotasyonu, redeliver.

Swagger'da aç →
🌳

categories · 1 endpoint

Kategori ağacı (ana + alt, public).

Swagger'da aç →

📚 Resmi SDK'lar

İki ana dilde resmi SDK — TypeScript tipli, retry + idempotency + webhook signature verify dahil.

📦 npm · TypeScript / Node.js / Browser

@herseypazar/sdk

npm install @herseypazar/sdk
v2.0.0 · Native fetch · ESM + CJS · Tree-shakeable
npm sayfası →  ·  GitHub →
🐍 PyPI · Python 3.10+

herseypazar-python

pip install herseypazar
v2.0.0 · httpx · Async + sync · Pydantic v2
PyPI sayfası →  ·  GitHub →

🛰️ Webhook imzası doğrulama

Her webhook payload'ı X-HSP-Signature header'ında HMAC SHA-256 imzasıyla gelir. signing_secret'iniz ile doğrulayın:

// Node.js
import { verifyWebhook } from '@herseypazar/sdk/webhooks';

app.post('/webhooks/hsp', (req, res) => {
  const sig = req.headers['x-hsp-signature'];
  const ok = verifyWebhook(req.rawBody, sig, process.env.HSP_WEBHOOK_SECRET);
  if (!ok) return res.sendStatus(401);
  // İmza geçerli — event'i işle
  const event = JSON.parse(req.rawBody);
  console.log('Event:', event.type, event.data);
  res.sendStatus(200);
});

⚡ Rate Limit & Tier'lar

İstek başına Redis token-bucket. Tier × endpoint granular. Her response X-RateLimit-Remaining header'ı taşır.

🆓 Free

30 req/min · 5K req/ay · webhook 3 abonelik · standard support

Tier seç →

🚀 Starter

120 req/min · 100K req/ay · webhook 10 abonelik · email support

Tier seç →

📈 Growth

600 req/min · 1M req/ay · webhook 25 · priority support · sandbox

Tier seç →

🏢 Enterprise

özel · sınırsız · dedicated rate · 99.95% SLA · TAM

Bizimle iletişime geç →