> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orkesta.com.tr/llms.txt
> Use this file to discover all available pages before exploring further.

# Bayi Oluştur

> Yeni bir bayi oluşturur

## ➕ Bayi Oluştur

Yeni bir bayi oluşturur veya zaten aynı vergi numarasına ait bayi varsa bayiyi ilgili üye işyeri ile ilişkilendirir.

**`POST`** `https://api-test.fincraft.com.tr/api/v1/general/merchant-members/settings/create`

## Request Body

```json theme={null}
{
  "memberType": "PRIVATE_COMPANY",
  "externalId": "MM-1001",
  "name": "Demo Bayi",
  "address": "İstanbul",
  "email": "bayi@example.com",
  "phoneNumber": "+905550000000",
  "iban": "TR450006294767877926419521",
  "contactName": "Ali",
  "contactSurname": "Veli",
  "taxNumber": "1234567890",
  "taxOffice": "Beyоğlu"
}
```

## Request Parametreleri

| Parametre        | Tip               | Zorunlu | Validation        | Açıklama                                                           |
| ---------------- | ----------------- | ------- | ----------------- | ------------------------------------------------------------------ |
| `memberType`     | MemberCompanyType | Evet    | @NotNull          | Şirket tipi (PRIVATE\_COMPANY, LIMITED\_OR\_JOINT\_STOCK\_COMPANY) |
| `externalId`     | String            | Evet    | @NotBlank         | Dış sistem üye/bayi ID                                             |
| `name`           | String            | Evet    | @NotBlank         | Üye/bayi adı                                                       |
| `address`        | String            | Evet    | @NotBlank         | Adres                                                              |
| `email`          | String            | Evet    | @NotBlank, @Email | E-posta                                                            |
| `phoneNumber`    | String            | Evet    | @NotBlank         | Telefon                                                            |
| `iban`           | String            | Evet    | @NotBlank         | IBAN                                                               |
| `contactName`    | String            | Evet    | @NotBlank         | İlgili kişi adı                                                    |
| `contactSurname` | String            | Evet    | @NotBlank         | İlgili kişi soyadı                                                 |
| `taxNumber`      | String            | Evet    | @NotBlank         | Vergi numarası                                                     |
| `taxOffice`      | String            | Evet    | @NotBlank         | Vergi dairesi                                                      |

## cURL Örneği

```bash theme={null}
curl -X POST https://api-test.fincraft.com.tr/api/v1/general/merchant-members/settings/create \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "memberType": "PRIVATE_COMPANY",
    "externalId": "MM-1001",
    "name": "Demo Bayi",
    "address": "İstanbul",
    "email": "bayi@example.com",
    "phoneNumber": "+905550000000",
    "iban": "TR450006294767877926419521",
    "contactName": "Ali",
    "contactSurname": "Veli",
    "taxNumber": "1234567890",
    "taxOffice": "Beyоğlu"
  }'
```
