Genel Bilgiler
Tüm istekler POST metodu ile çalışmaktadır.
API Adresi: https://www.zayorogame.com/api
API Key: Header'da Authorization: Bearer {api_key} şeklinde gönderilmelidir.
Durum Sorgulama
curl -X POST 'https://www.zayorogame.com/api/status' \
-H 'Authorization: Bearer {api_key}'
API erişiminizin durumunu kontrol eder.
https://www.zayorogame.com/api/status
{
"code": 200,
"status": 1,
"message": "İşlem başarılı..."
}
Bakiye Sorgulama
curl -X POST 'https://www.zayorogame.com/api/get_balance' \
-H 'Authorization: Bearer {api_key}'
Mevcut bakiye durumunu döndürür.
balance: Çekilemez bakiyeniz
balance_wd: Çekilebilir bakiyeniz
negative_limit: Kredili bakiye limitiniz
total: Toplam kullanılabilir bakiyeniz
https://www.zayorogame.com/api/get_balance
{
"code": 200,
"status": 1,
"message": "İşlem başarılı...",
"data": {
"balance": 10249.98,
"balance_wd": 1000,
"negative_limit": 10000,
"total": 21249.98
}
}
Ürün Listesi
curl -X POST 'https://www.zayorogame.com/api/get_products' \
-H 'Authorization: Bearer {api_key}'
Tüm ürünleri liste halinde döndürür.
id: Ürünün id değeri
title: Ürünün adı
price: Ürünün fiyatı
attrs: Siparişte istenilen bilgiler
https://www.zayorogame.com/api/get_products
{
"code": 200,
"status": 1,
"message": "İşlem başarılı...",
"data": [
{
"id": 631,
"title": "Razer Gold 1000 TL",
"price": 1000,
"attrs": []
},
{
"id": 106,
"title": "Top-Up 8100 UC",
"price": 3533.99,
"attrs": [
{
"key": "pubgm_user_id",
"title": "PUBG Mobile ID"
}
]
},
{
"id": 658,
"title": "AoE Mobile 9999 Doruk Parası",
"price": 3544.49,
"attrs": [
{
"key": "age_of_empires_user_id",
"title": "Age of Empires ID"
},
{
"key": "age_of_empires_server",
"title": "Age of Empires Server"
}
]
},
...
]
}
Ürün Detay
curl 'https://www.zayorogame.com/api/get_product' \
-H 'Authorization: Bearer {api_key}' \
-F 'product_id=106'
İletilen product_id ile ilgili ürünü döndürür.
id: Ürünün id değeri
title: Ürünün adı
price: Ürünün fiyatı
attrs: Siparişte istenilen bilgiler
https://www.zayorogame.com/api/get_product
{
"code": 200,
"status": 1,
"message": "İşlem başarılı...",
"data": {
"id": 106,
"title": "Top-Up 8100 UC",
"price": 3533.99,
"attrs": [
{
"key": "pubgm_user_id",
"title": "PUBG Mobile ID"
}
]
}
}
Sipariş Oluşturma
curl 'https://www.zayorogame.com/api/order_create' \
-H 'Authorization: Bearer {api_key}' \
-F 'product_id=106' \
-F 'quantity=1' \
-F 'attr[pubgm_user_id]="123456789"'
Eğer ürün için siparişte istenen bilgi yoksa attr değişkeni gönderilmez veya boş array gönderilebilir.
product_id: Sipariş oluşturulacak ürünün id değeri
quantity: Sipariş oluşturulacak adet
price: Ürünün fiyatı
attr: Siparişte istenilen bilgiler array formatında key ile gönderilir
price_total: Toplam sipariş tutarı
order_ids: Oluşturulan siparişlerin id değeri array içerisinde döner
Sipariş bir paket ürüne(örn: Top-Up 120 UC) ait değilse array içerisinde tek bir id değeri bulunur.
https://www.zayorogame.com/api/order_create
{
"code": 200,
"status": 1,
"message": "İşlem başarılı...",
"data": {
"price_total": 3533.99,
"order_ids": [
1234,
...
]
}
}
Sipariş Sorgulama
curl 'https://www.zayorogame.com/api/order_check' \
-H 'Authorization: Bearer {api_key}' \
-F 'order_id=1234'
İletilen order_id ile ilgili siparişi döndürür.
order_id: Siparişin id değeri
product: Ürün adı
status: Sipariş durumu (progress - cancel - delivered - partial)
description: Sipariş sonuç açıklaması
count: Sipariş adeti
count_delivered: Sipariş teslim edilen adet
count_cancel: Sipariş iade edilen adet
price_total: Toplam sipariş tutarı
insert_date: Sipariş oluşturulma tarihi
update_date: Sipariş son işlem tarihi
https://www.zayorogame.com/api/order_check
{
"code": 200,
"status": 1,
"message": "İşlem başarılı...",
"data": {
"order_id": 1234,
"product": "Top-Up 8100 UC",
"status": "delivered",
"description": "Siparişiniz teslim edilmiştir.",
"count": 1,
"count_delivered": 1,
"count_cancel": 0,
"price_total": 3533.99,
"insert_date": "2024-11-16 13:51:47",
"update_date": "2024-11-16 15:52:30"
}
}
Hata Kodları
Sorgudan dönen code değişkeninin tanımları
Code | Tanımı |
---|---|
200 | İşlem başarılı |
101 | api_key gönderilmemiş |
102 | api_key hatalı |
103 | Sağlayıcı kaynaklı hata |
1 | Eksik veya hatalı form verisi |
2 | Sipariş oluşturulacak ürün mevcut değil |
3 | Sipariş oluşturulacak ürün için yeterli stok yok |
4 | Sipariş oluşturmak için bakiye yetersiz |
5 | Sepetle ilgili bir hata - GENELLİKLE KARŞILAŞILMAZ |
6 | Sepetle ilgili bir hata - GENELLİKLE KARŞILAŞILMAZ |
7 | Gönderilen order_id karşığı sipariş bulunamadı |
8 | Gönderilen product_id karşığı ürün bulunamadı |
9 | Siparişte istenilen bilgiler eksik - attr |