API ve entegrasyon
/api/v1/… altında JSON API. Güncel rotalar dağıtımınızdaki OpenAPI’dedir. Örneklerde YOUR_HOST yerine kendi hostunuzun yazın.
Dokümantasyon
- Etkileşimli: /docs (etkinse).
- Şema:
GET /api/v1/openapi.json. - Durum:
GET /health,GET /readiness,GET /api/v1/status.
Kurallar
- Üretimde HTTPS.
Content-Type: application/json(uyuşmazlık dosya yüklemeleri hariç).POST /api/v1/auth/loginsonrası — cookie ve/veyaAuthorization: Bearer ….- Yenileme:
POST /api/v1/auth/refresh. - Hassas işlemler
Idempotency-Keykullanabilir — OpenAPI’ye bakın.
Ana gruplar
- Auth ve oturumlar: register, login, refresh, logout, MFA.
- Profil ve cüzdan:
/api/v1/me,/api/v1/wallet/balances,/api/v1/wallet/activity. - Emanet (escrow): create, list, fund, release, dispute.
- Helpdesk: biletler.
- Tam liste — OpenAPI’de.
Entegrasyon desteği
Erişim ve senaryolar hakkında sorular: yardım veya support@evopay.biz. Oturum açmış istemciler POST /api/v1/helpdesk/tickets ile bilet oluşturabilir.
Örnekler
json · istek gövdesi
{
"email": "user@example.com",
"password": "YourStrongPassw0rd!",
"display_name": "Demo User"
}
bash · kayıt
curl -sS -X POST "https://YOUR_HOST/api/v1/auth/register" \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "YourStrongPassw0rd!",
"display_name": "Demo User"
}'
bash · giriş
curl -sS -X POST "https://YOUR_HOST/api/v1/auth/login" \
-H "Content-Type: application/json" \
-c cookies.txt \
-d '{
"email": "user@example.com",
"password": "YourStrongPassw0rd!"
}'
bash · profil ve cüzdan
curl -sS "https://YOUR_HOST/api/v1/me" -b cookies.txt
curl -sS "https://YOUR_HOST/api/v1/wallet/balances" -b cookies.txt
curl -sS "https://YOUR_HOST/api/v1/wallet/activity?limit=20" -b cookies.txt
bash · emanet oluştur
curl -sS -X POST "https://YOUR_HOST/api/v1/escrow" \
-H "Content-Type: application/json" \
-b cookies.txt \
-d '{
"title": "Ekipman teslimatı",
"description": "Spesifikasyona göre sunucu ekipmanı",
"amount": "8000.00",
"currency": "USD"
}'
Ardından ESCROW_ID yerine koyun:
bash · emanet yaşam döngüsü
curl -sS "https://YOUR_HOST/api/v1/escrow/contracts/ESCROW_ID" -b cookies.txt
curl -sS -X POST "https://YOUR_HOST/api/v1/escrow/ESCROW_ID/fund" \
-H "Content-Type: application/json" -b cookies.txt -d '{}'
curl -sS -X POST "https://YOUR_HOST/api/v1/escrow/ESCROW_ID/release" \
-H "Content-Type: application/json" -b cookies.txt -d '{}'
bash · durum
curl -sS "https://YOUR_HOST/api/v1/status"
curl -sS "https://YOUR_HOST/readiness"