---
title: "Satış ortaklığı — API başvurusu"
description: "Satış ortaklığı."
url: https://www.gyrohosting.com/developers/tr/api/affiliate.html
language: tr
openapi: https://www.gyrohosting.com/developers/openapi.json
api_version: 2.30.0
---

# Satış ortaklığı

Satış ortaklığı.

Base URL: `https://www.gyrohosting.com/api/v1/client` · OpenAPI: https://www.gyrohosting.com/developers/openapi.json


## GET /affiliate

**Program Durumunu Okuma** · operationId `coreGetAffiliate` · scope `Affiliate/GetAffiliate` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/coreGetAffiliate.json

Programı, kazancı ve ödeme durumunu tek çağrıda döndürür. — olgunlaşanı taşır


### Yanıtlar

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

### Örnekler

```bash
curl -s 'https://www.gyrohosting.com/api/v1/client/affiliate' \
  -H "Authorization: Bearer $GYRO_TOKEN"
```
```bash
gyro affiliate get
```
```python
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"])
```
```js
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

**Komisyonları Listeleme** · operationId `coreGetAffiliateCommissions` · scope `Affiliate/GetAffiliateCommissions` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/coreGetAffiliateCommissions.json

Kazanılan komisyonları en yeniden başlayarak döndürür. — anahtarın sahibi


### Parametreler

| Alan | in | Tür | Açıklama |
|---|---|---|---|
| `page` | query | integer | Kaçıncı sayfa. |
| `limit` | query | integer | Sayfa başına satır. En çok 100. |

### Yanıtlar

- **200**: Success
- **401**: Missing, invalid or revoked key
- **403**: Key lacks the scope, IP not allowed, or feature disabled
- **422**: affiliate_disabled, not_enrolled

### Örnekler

```bash
curl -s 'https://www.gyrohosting.com/api/v1/client/affiliate/commissions' \
  -H "Authorization: Bearer $GYRO_TOKEN"
```
```bash
gyro affiliate commission list
```
```python
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"])
```
```js
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

**Programa Katılma** · operationId `coreEnrollAffiliate` · scope `Affiliate/EnrollAffiliate` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/coreEnrollAffiliate.json

Hesabı satış ortaklığı programına kaydeder. — hesabın para birimi


### Yanıtlar

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

### Örnekler

```bash
curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/affiliate/enroll' \
  -H "Authorization: Bearer $GYRO_TOKEN"
```
```bash
gyro affiliate enroll
```
```python
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"])
```
```js
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

**Ödeme Talebi Açma** · operationId `coreWithdrawAffiliate` · scope `Affiliate/WithdrawAffiliate` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/coreWithdrawAffiliate.json

Kullanılabilir kazancın ödenmesini ister. — aynı anda tek talep


### İstek gövdesi

| Alan | Tür | Açıklama |
|---|---|---|
| `amount` (zorunlu) | number | İstenen tutar. Alt sınır ile kullanılabilir bakiye arasında olmalıdır. |
| `gateway` (zorunlu) | string | Ödeme yolu. Operatörün sunduklarından biri olmalıdır. |
| `gateway_info` | string | Hedef bilgisi. Kayıtlı bir hedef varsa atlanabilir. |
| `save_default` | boolean | Bu hedefi sonraki talepler için kaydet. |

### Yanıtlar

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

### Örnekler

```bash
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}'
```
```bash
gyro affiliate withdraw --help    # tüm seçenekler
```
```python
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"])
```
```js
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

**Ödeme Hedefini Kaydetme** · operationId `coreSaveAffiliatePayoutMethod` · scope `Affiliate/SaveAffiliatePayoutMethod` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/coreSaveAffiliatePayoutMethod.json

Bir ödeme yolunun hedef bilgisini kaydeder ya da siler. — anahtarın sahibi


### İstek gövdesi

| Alan | Tür | Açıklama |
|---|---|---|
| `gateway` (zorunlu) | string | Ödeme yolu. |
| `info` | string | Hedef bilgisi. Boş göndermek kaydı siler. |

### Yanıtlar

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

### Örnekler

```bash
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"}'
```
```bash
gyro affiliate payment-method set --help    # tüm seçenekler
```
```python
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"])
```
```js
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}`);
```
