OpenAPI Türkçe gyrohosting.com ↗

Affiliate

Affiliate programme.

#GET/affiliate

Get affiliateScope: Affiliate/GetAffiliatecoreGetAffiliateOpenAPI for this operation

Get affiliate.

Core WISECP client endpoint (Turkish reference: https://dev.wisecp.com/tr/satis-ortakligi-kazanci).

Responses

200Success — data: object
401Missing, invalid or revoked key
403Key lacks the scope, IP not allowed, or feature disabled
422affiliate_disabled

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/affiliate' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro affiliate get
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/affiliate", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/affiliate", {
  method: "GET",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#GET/affiliate/commissions

List affiliate commissionsScope: Affiliate/GetAffiliateCommissionscoreGetAffiliateCommissionsOpenAPI for this operation

List affiliate commissions.

Core WISECP client endpoint (Turkish reference: https://dev.wisecp.com/tr/satis-ortakligi-kazanci).

Parameters

FieldinTypeDescription
pagequeryintegerKaçıncı sayfa.
limitqueryintegerSayfa başına satır. En çok 100.

Responses

200Success — data: array<object>
401Missing, invalid or revoked key
403Key lacks the scope, IP not allowed, or feature disabled
422affiliate_disabled, not_enrolled

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/affiliate/commissions' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro affiliate commission list
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/affiliate/commissions", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/affiliate/commissions", {
  method: "GET",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#POST/affiliate/enroll

Enroll affiliateScope: Affiliate/EnrollAffiliatecoreEnrollAffiliateOpenAPI for this operation

Enroll affiliate.

Core WISECP client endpoint (Turkish reference: https://dev.wisecp.com/tr/satis-ortakligi-kazanci).

Responses

200Success — data: object
401Missing, invalid or revoked key
403Key lacks the scope, IP not allowed, or feature disabled
422affiliate_disabled

Examples

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/affiliate/enroll' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro affiliate enroll
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/affiliate/enroll", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/affiliate/enroll", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#POST/affiliate/withdraw

Withdraw affiliateScope: Affiliate/WithdrawAffiliatecoreWithdrawAffiliateOpenAPI for this operation

Withdraw affiliate.

Core WISECP client endpoint (Turkish reference: https://dev.wisecp.com/tr/satis-ortakligi-kazanci).

Request body

FieldTypeDescription
amount requirednumberİstenen tutar. Alt sınır ile kullanılabilir bakiye arasında olmalıdır.
gateway requiredstringÖdeme yolu. Operatörün sunduklarından biri olmalıdır.
gateway_infostringHedef bilgisi. Kayıtlı bir hedef varsa atlanabilir.
save_defaultbooleanBu hedefi sonraki talepler için kaydet.

Responses

200Success — data: object
401Missing, invalid or revoked key
403Key lacks the scope, IP not allowed, or feature disabled
422affiliate_disabled, affiliate_disabled_account, amount_invalid, below_minimum, gateway_info_required, gateway_invalid, not_enrolled, withdrawal_pending, withdrawal_rejected

Examples

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/affiliate/withdraw' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"amount": 1.0, "gateway": "string", "gateway_info": "string", "save_default": true}'
gyro affiliate withdraw --help    # all flags
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/affiliate/withdraw", headers=h, json={"amount": 1.0, "gateway": "string", "gateway_info": "string", "save_default": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/affiliate/withdraw", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"amount": 1.0, "gateway": "string", "gateway_info": "string", "save_default": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#PUT/affiliate/payment-method

Save affiliate payout methodScope: Affiliate/SaveAffiliatePayoutMethodcoreSaveAffiliatePayoutMethodOpenAPI for this operation

Save affiliate payout method.

Core WISECP client endpoint (Turkish reference: https://dev.wisecp.com/tr/satis-ortakligi-kazanci).

Request body

FieldTypeDescription
gateway requiredstringÖdeme yolu.
infostringHedef bilgisi. Boş göndermek kaydı siler.

Responses

200Success — data: object
401Missing, invalid or revoked key
403Key lacks the scope, IP not allowed, or feature disabled
422affiliate_disabled, gateway_invalid, not_enrolled

Examples

curl -s -X PUT 'https://www.gyrohosting.com/api/v1/client/affiliate/payment-method' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"gateway": "string", "info": "string"}'
gyro affiliate payment-method set --help    # all flags
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.put("https://www.gyrohosting.com/api/v1/client/affiliate/payment-method", headers=h, json={"gateway": "string", "info": "string"}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/affiliate/payment-method", {
  method: "PUT",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"gateway": "string", "info": "string"}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);