---
title: Müşteriler
description: Müşterileri listeleyin, oluşturun, güncelleyin ve silin.
full: true
---

## Customer nesnesi [#Customer]

**`Customer`** (v1 · v2)

| Alan | Tip | Açıklama |
| --- | --- | --- |
| `accountStatus` | `CustomerAccountStatusEnum` | CustomerAccountStatusEnum Değerler: `ACTIVE_ACCOUNT`, `DEACTIVATED_ACCOUNT`, `DECLINED_ACCOUNT_INVITATION`, `DISABLED_ACCOUNT`, `INVITED_TO_CREATE_ACCOUNT`. |
| `accountStatusUpdatedAt` | `Timestamp` |  |
| `addresses` | `[CustomerAddress!]` | Müşterinin en son güncellenen on adresinin listesi. |
| `attributes` | `[CustomerAttributeValue!]` |  |
| `b2bStatus` | `CustomerB2BStatusEnum` | Değerler: `ACTIVE_ACCOUNT`, `DISABLED_ACCOUNT`, `WAITING_FOR_APPROVAL`. |
| `birthDate` | `Timestamp` |  |
| `createdAt` | `Timestamp` | Kaydın oluşturulma zamanı (milisaniye cinsinden Unix zaman damgası). |
| `customerGroupIds` | `[String!]` | Mağaza sahibinin müşteriye atadığı gruplar. |
| `customerGroups` (yalnızca v2) | `[SimpleCustomerGroup!]` |  |
| `customerSegmentIds` | `[String!]` | Müşterilerin dahil olduğu segmentler. |
| `customerSequence` | `Float` | Müşterinin sıra değeri. Sıra değeri 1'den başlar. |
| `deleted` | `Boolean!` | Kaydın silinmiş olup olmadığı. |
| `email` | `String` | Müşterinin benzersiz e-posta adresi. Aynı e-posta adresini birden fazla müşteriye atamaya çalışmak hata döndürür. |
| `emailVerifiedDate` | `Timestamp` | **E-posta** adresinin doğrulandığı tarih. |
| `firstName` | `String!` | Müşterinin adı. |
| `firstOrderDate` | `Timestamp` | Müşterinin ilk sipariş tarihi |
| `fullName` | `String` | Müşterinin tam adı. Ad ve soyad varsa ad ile soyadın birleşimidir; aksi halde yalnızca ad olarak kaydedilir. |
| `gender` | `CustomerGenderTypeEnum` | Değerler: `FEMALE`, `MALE`, `OTHER`. |
| `id` | `String!` | Kaydın ID değeri. |
| `ip` | `String` |  |
| `isEmailVerified` | `Boolean` | E-posta doğrulama durumu. E-posta doğrulanmışsa **isEmailVerified** `true` döner. |
| `isPhoneVerified` | `Boolean` | Telefon doğrulama durumu. Telefon numarası doğrulanmışsa **isPhoneVerified** `true` döner. |
| `lastName` | `String` | Müşterinin soyadı. |
| `lastOrderDate` | `Timestamp` | Müşterinin son sipariş tarihi |
| `lastPriceListId` | `String` | Müşterinin son kullandığı fiyat listesinin ID'si. |
| `lastStorefrontRoutingId` | `String` | Müşterinin son kullandığı storefront yönlendirmesinin ID'si. |
| `note` | `String` | Müşteriyle ilgili not. |
| `orderCount` | `Float` | Müşterinin verdiği sipariş sayısı. |
| `passwordUpdateDate` | `Timestamp` | Müşterinin şifresini en son değiştirdiği tarih. |
| `phone` | `String` | Müşterinin telefon numarası |
| `phoneSubscriptionStatus` | `CustomerEmailSubscriptionStatusesEnum` | CustomerEmailSubscriptionStatusesEnum Değerler: `NOT_SUBSCRIBED`, `PENDING_CONFIRMATION`, `SUBSCRIBED`. |
| `phoneSubscriptionStatusUpdatedAt` | `Timestamp` |  |
| `phoneVerifiedDate` | `Timestamp` | **E-posta** adresinin doğrulandığı tarih. |
| `preferredLanguage` | `String` |  |
| `priceListId` | `String` |  |
| `priceListRules` | `[CustomerPriceListRule!]` |  |
| `registrationSource` | `CustomerRegistrationSourceEnum` | Müşterinin kayıt kaynağı. Değerler: `apple`, `credentials`, `facebook`, `google`, `miles_smiles`, `sms`, `twitch`. |
| `smsSubscriptionStatus` | `CustomerEmailSubscriptionStatusesEnum` | CustomerEmailSubscriptionStatusesEnum Değerler: `NOT_SUBSCRIBED`, `PENDING_CONFIRMATION`, `SUBSCRIBED`. |
| `smsSubscriptionStatusUpdatedAt` | `Timestamp` |  |
| `subscriptionStatus` | `CustomerEmailSubscriptionStatusesEnum` | CustomerEmailSubscriptionStatusesEnum Değerler: `NOT_SUBSCRIBED`, `PENDING_CONFIRMATION`, `SUBSCRIBED`. |
| `subscriptionStatusUpdatedAt` | `Timestamp` |  |
| `tagIds` | `[String!]` | Mağaza sahibinin müşteriye eklediği etiketler. |
| `tags` (yalnızca v2) | `[SimpleCustomerTag!]` |  |
| `totalOrderPrice` | `Float` | Müşterinin sipariş sayısı |
| `updatedAt` | `Timestamp` | Kaydın son güncellenme zamanı (milisaniye cinsinden Unix zaman damgası). |
| `userAgent` | `String` |  |

Örnek (temsili):

```json
{
  "accountStatus": "ACTIVE_ACCOUNT",
  "accountStatusUpdatedAt": 1735725600000,
  "addresses": [
    {
      "addressLine1": "Örnek Mah. 1. Sok. No: 1",
      "addressLine2": "Örnek Mah. 1. Sok. No: 1",
      "attributes": null,
      "city": null,
      "company": "Örnek Şirket",
      "country": null,
      "createdAt": 1735725600000,
      "deleted": false,
      "district": null,
      "firstName": "Ayşe",
      "id": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
      "identityNumber": "11111111111",
      "isDefault": true,
      "lastName": "Yılmaz",
      "phone": "+905551112233",
      "postalCode": "34000",
      "region": null,
      "state": null,
      "taxNumber": "1234567890",
      "taxOffice": "Kadıköy",
      "title": "Örnek",
      "updatedAt": 1735725600000
    }
  ],
  "attributes": [
    {
      "customerAttributeId": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
      "customerAttributeOptionId": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
      "value": "string"
    }
  ],
  "b2bStatus": "ACTIVE_ACCOUNT",
  "birthDate": 1735725600000,
  "createdAt": 1735725600000,
  "customerGroupIds": [
    "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21"
  ],
  "customerGroups": [
    {
      "id": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
      "name": "Örnek"
    }
  ],
  "customerSegmentIds": [
    "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21"
  ],
  "customerSequence": 1,
  "deleted": false,
  "email": "musteri@ornek.com",
  "emailVerifiedDate": 1735725600000,
  "firstName": "Ayşe",
  "firstOrderDate": 1735725600000,
  "fullName": "Örnek",
  "gender": "FEMALE",
  "id": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
  "ip": "127.0.0.1",
  "isEmailVerified": true,
  "isPhoneVerified": true,
  "lastName": "Yılmaz",
  "lastOrderDate": 1735725600000,
  "lastPriceListId": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
  "lastStorefrontRoutingId": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
  "note": "Örnek açıklama",
  "orderCount": 1,
  "passwordUpdateDate": 1735725600000,
  "phone": "+905551112233",
  "phoneSubscriptionStatus": "NOT_SUBSCRIBED",
  "phoneSubscriptionStatusUpdatedAt": 1735725600000,
  "phoneVerifiedDate": 1735725600000,
  "preferredLanguage": "string",
  "priceListId": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
  "priceListRules": [
    {
      "discountRate": 20,
      "filters": null,
      "priceListId": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
      "shouldMatchAllFilters": true,
      "value": 129.9,
      "valueType": "DISCOUNT_AMOUNT"
    }
  ],
  "registrationSource": "apple",
  "smsSubscriptionStatus": "NOT_SUBSCRIBED",
  "smsSubscriptionStatusUpdatedAt": 1735725600000,
  "subscriptionStatus": "NOT_SUBSCRIBED",
  "subscriptionStatusUpdatedAt": 1735725600000,
  "tagIds": [
    "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21"
  ],
  "tags": [
    {
      "id": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
      "name": "Örnek"
    }
  ],
  "totalOrderPrice": 129.9,
  "updatedAt": 1735725600000,
  "userAgent": "Mozilla/5.0"
}
```

## Müşterileri listele [#listCustomer]

Tek bir müşteriyi e-posta adresiyle bulmak için `email: { eq: "ayse@ornek.com" }` filtresini kullanın. Telefon numarasıyla aramak için aynı şekilde `phone` filtresi kullanılır.

**`listCustomer`** (query, v1 · v2)

Parametreler:

| Alan | Tip | Açıklama |
| --- | --- | --- |
| `email` | `StringFilterInput` | E-posta için istediğiniz koşulu girerek filtrelenmiş yanıt alabilirsiniz. :::note Örneğin email: { eq: aa@gmail.com} ::: |
| `id` | `StringFilterInput` | Kaydın ID değeri. |
| `merchantId` | `StringFilterInput` |  |
| `pagination` | `PaginationInput` | Sayfalama özelliği, yanıt verisinin belirli bölümlerini filtrelemenizi ve görüntülemenizi sağlar. |
| `phone` | `StringFilterInput` | E-posta için istediğiniz koşulu girerek filtrelenmiş yanıt alabilirsiniz. :::note Örneğin phone: { eq: 5123456789999} ::: |
| `search` | `String` | Listeleme API'lerinde belirtilen alanlarda arama yapılmasını sağlar. Örnek: searchableFields=['name', 'description'] ve search='AAA' ise, API name veya description alanında 'AAA' içeren kayıtları döndürür. |
| `sort` | `String` | Yanıt verisinin belirtilen alanlara göre sıralanmasını sağlar. Örnek: sortableFields=['updatedAt'] ise yanıt verisi updatedAt alanına göre sıralanır. |
| `updatedAt` | `DateFilterInput` | Kaydın son güncellenme zamanı (milisaniye cinsinden Unix zaman damgası). |

Dönen değer: `CustomerPaginationResponse!`

Örnek istek - Müşteri Listeleme (`POST https://api.myikas.com/api/v2/admin/graphql`):

Hesap oluşturmuş / oluşturmamış tüm müşterileri bu query'den görüntüleyebilirsiniz.

```graphql
query listCustomer($pagination: PaginationInput!, $search: String) {
  listCustomer(pagination: $pagination, search: $search) {
    count
    hasNext
    limit
    page
    data {
      accountStatus
      createdAt
      email
      firstName
      id
      lastName
      phone
      updatedAt
    }
  }
}
```

```json
{
  "pagination": {
    "page": 1,
    "limit": 20
  }
}
```

Örnek yanıt (temsili):

```json
{
  "data": {
    "listCustomer": {
      "count": 1,
      "hasNext": true,
      "limit": 50,
      "page": 1,
      "data": [
        {
          "accountStatus": "ACTIVE_ACCOUNT",
          "createdAt": 1735725600000,
          "email": "musteri@ornek.com",
          "firstName": "Ayşe",
          "id": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
          "lastName": "Yılmaz",
          "phone": "+905551112233",
          "updatedAt": 1735725600000
        }
      ]
    }
  }
}
```

Örnek istek - Müşteri Arama (`POST https://api.myikas.com/api/v2/admin/graphql`):

```graphql
query ListCustomer {
  listCustomer {
    count
    hasNext
    limit
    page
    data {
      accountStatus
      createdAt
      email
      firstName
      id
      lastName
      phone
      updatedAt
    }
  }
}
```

```json
{
  "search": "ikas"
}
```

Örnek yanıt (temsili):

```json
{
  "data": {
    "listCustomer": {
      "count": 1,
      "hasNext": true,
      "limit": 50,
      "page": 1,
      "data": [
        {
          "accountStatus": "ACTIVE_ACCOUNT",
          "createdAt": 1735725600000,
          "email": "musteri@ornek.com",
          "firstName": "Ayşe",
          "id": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
          "lastName": "Yılmaz",
          "phone": "+905551112233",
          "updatedAt": 1735725600000
        }
      ]
    }
  }
}
```

Örnek istek - Müşterileri listeleme (`POST https://api.myikas.com/api/v2/admin/graphql`):

CRM veya ERP entegrasyonunda, belirli bir tarihten sonra güncellenen müşterileri sayfa sayfa çekerek artımlı senkronizasyon yapmak için kullanılır.

```graphql
query ListCustomer($updatedAt: DateFilterInput, $pagination: PaginationInput) {
  listCustomer(updatedAt: $updatedAt, pagination: $pagination) {
    count
    hasNext
    page
    limit
    data {
      id
      firstName
      lastName
      email
      phone
      accountStatus
      subscriptionStatus
      customerGroupIds
      tagIds
      orderCount
      updatedAt
    }
  }
}
```

```json
{
  "updatedAt": {
    "gt": 1790812800000
  },
  "pagination": {
    "page": 1,
    "limit": 50
  }
}
```

Örnek yanıt (temsili):

```json
{
  "data": {
    "listCustomer": {
      "count": 1,
      "hasNext": true,
      "page": 1,
      "limit": 50,
      "data": [
        {
          "id": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
          "firstName": "Ayşe",
          "lastName": "Yılmaz",
          "email": "musteri@ornek.com",
          "phone": "+905551112233",
          "accountStatus": "ACTIVE_ACCOUNT",
          "subscriptionStatus": "NOT_SUBSCRIBED",
          "customerGroupIds": [
            "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21"
          ],
          "tagIds": [
            "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21"
          ],
          "orderCount": 1,
          "updatedAt": 1735725600000
        }
      ]
    }
  }
}
```

## Müşteri oluştur [#createCustomer]

**`createCustomer`** (mutation, v2)

Customer oluşturan mutation.

Yalnızca v2 endpoint'inde: `https://api.myikas.com/api/v2/admin/graphql`

Parametreler:

| Alan | Tip | Açıklama |
| --- | --- | --- |
| `input` (zorunlu) | `CreateCustomerInput!` | İşlemin girdi nesnesi. |

Dönen değer: `Customer!`

Örnek istek - Müşteri oluşturma (`POST https://api.myikas.com/api/v2/admin/graphql`):

Mağaza dışındaki bir kanaldan (ör. fiziksel mağaza veya CRM) gelen müşteriyi varsayılan adresi ve pazarlama izinleriyle birlikte ikas'a eklemek için kullanılır.

```graphql
mutation CreateCustomer($input: CreateCustomerInput!) {
  createCustomer(input: $input) {
    id
    firstName
    lastName
    email
    phone
    subscriptionStatus
    smsSubscriptionStatus
    tags {
      id
      name
    }
    createdAt
  }
}
```

```json
{
  "input": {
    "firstName": "Ayşe",
    "lastName": "Yılmaz",
    "email": "ayse.yilmaz@ornek.com",
    "phone": "+905551112233",
    "gender": "FEMALE",
    "birthDate": 705801600000,
    "subscriptionStatus": "SUBSCRIBED",
    "smsSubscriptionStatus": "SUBSCRIBED",
    "preferredLanguage": "tr",
    "tags": [
      {
        "name": "Mağazadan Kayıt"
      }
    ],
    "addresses": [
      {
        "title": "Ev",
        "firstName": "Ayşe",
        "lastName": "Yılmaz",
        "addressLine1": "Bağdat Caddesi No: 215 Daire: 8",
        "postalCode": "34728",
        "country": {
          "name": "Türkiye",
          "iso2": "TR",
          "iso3": "TUR"
        },
        "city": {
          "name": "İstanbul"
        },
        "district": {
          "name": "Kadıköy"
        },
        "phone": "+905551112233",
        "isDefault": true
      }
    ]
  }
}
```

Örnek yanıt (temsili):

```json
{
  "data": {
    "createCustomer": {
      "id": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
      "firstName": "Ayşe",
      "lastName": "Yılmaz",
      "email": "musteri@ornek.com",
      "phone": "+905551112233",
      "subscriptionStatus": "NOT_SUBSCRIBED",
      "smsSubscriptionStatus": "NOT_SUBSCRIBED",
      "tags": [
        {
          "id": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
          "name": "Örnek"
        }
      ],
      "createdAt": 1735725600000
    }
  }
}
```

## Müşteriyi güncelle [#updateCustomer]

**`updateCustomer`** (mutation, v2)

Customer güncelleyen mutation.

Yalnızca v2 endpoint'inde: `https://api.myikas.com/api/v2/admin/graphql`

Parametreler:

| Alan | Tip | Açıklama |
| --- | --- | --- |
| `input` (zorunlu) | `UpdateCustomerInput!` | İşlemin girdi nesnesi. |

Dönen değer: `Customer!`

Örnek istek - Müşteri güncelleme (`POST https://api.myikas.com/api/v2/admin/graphql`):

Müşterinin iletişim bilgilerini ve pazarlama izinlerini güncellemek için kullanılır. Yalnızca gönderilen alanlar değişir.

```graphql
mutation UpdateCustomer($input: UpdateCustomerInput!) {
  updateCustomer(input: $input) {
    id
    firstName
    lastName
    email
    phone
    subscriptionStatus
    smsSubscriptionStatus
    updatedAt
  }
}
```

```json
{
  "input": {
    "id": "4e58c411-9540-427e-a047-6c257e8d51c0",
    "phone": "+905553334455",
    "subscriptionStatus": "NOT_SUBSCRIBED",
    "smsSubscriptionStatus": "SUBSCRIBED"
  }
}
```

Örnek yanıt (temsili):

```json
{
  "data": {
    "updateCustomer": {
      "id": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
      "firstName": "Ayşe",
      "lastName": "Yılmaz",
      "email": "musteri@ornek.com",
      "phone": "+905551112233",
      "subscriptionStatus": "NOT_SUBSCRIBED",
      "smsSubscriptionStatus": "NOT_SUBSCRIBED",
      "updatedAt": 1735725600000
    }
  }
}
```

## Müşteri kaydet [#saveCustomer]

**`saveCustomer`** (mutation, v1)

Customer kaydeden mutation.

Yalnızca v1 endpoint'inde: `https://api.myikas.com/api/v1/admin/graphql`. v2 karşılığı: `createCustomer`, `updateCustomer`.

Parametreler:

| Alan | Tip | Açıklama |
| --- | --- | --- |
| `input` (zorunlu) | `CustomerInput!` | İşlemin girdi nesnesi. |

Dönen değer: `Customer!`

Örnek istek - Müşteri kaydetme (`POST https://api.myikas.com/api/v1/admin/graphql`):

ERP'deki müşteri kaydını ikas ile eşitlemek için kullanılır. `id` gönderildiğinde mevcut müşteri güncellenir, gönderilmediğinde yeni müşteri oluşturulur.

```graphql
mutation SaveCustomer($input: CustomerInput!) {
  saveCustomer(input: $input) {
    id
    firstName
    lastName
    email
    phone
    note
    tagIds
    updatedAt
  }
}
```

```json
{
  "input": {
    "id": "4e58c411-9540-427e-a047-6c257e8d51c0",
    "firstName": "Mehmet",
    "lastName": "Demir",
    "email": "mehmet.demir@ornek.com",
    "phone": "+905552223344",
    "note": "ERP cari kodu: C-10482",
    "tagIds": [
      "2fd03b37-0ff3-444b-9aad-a4204ff07bbe"
    ]
  }
}
```

Örnek yanıt (temsili):

```json
{
  "data": {
    "saveCustomer": {
      "id": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
      "firstName": "Ayşe",
      "lastName": "Yılmaz",
      "email": "musteri@ornek.com",
      "phone": "+905551112233",
      "note": "Örnek açıklama",
      "tagIds": [
        "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21"
      ],
      "updatedAt": 1735725600000
    }
  }
}
```

## Müşterileri sil [#deleteCustomerList]

**`deleteCustomerList`** (mutation, v1 · v2)

Customer silen mutation.

Parametreler:

| Alan | Tip | Açıklama |
| --- | --- | --- |
| `idList` (zorunlu) | `[String!]!` | İşlem yapılacak kayıtların ID listesi. |

Dönen değer: `Boolean!`

Örnek istek - Müşterileri silme (`POST https://api.myikas.com/api/v2/admin/graphql`):

KVKK kapsamında silme talebinde bulunan müşterilerin kayıtlarını toplu olarak kaldırmak için kullanılır.

```graphql
mutation DeleteCustomerList($idList: [String!]!) {
  deleteCustomerList(idList: $idList)
}
```

```json
{
  "idList": [
    "f6cb8a2e-87cf-4b42-9ef7-1b4768caaa0b",
    "88f51b34-7f81-4524-a12d-5c39238e3d15"
  ]
}
```

Örnek yanıt (temsili):

```json
{
  "data": {
    "deleteCustomerList": true
  }
}
```

## Müşteri ve adres özelliklerini güncelle [#updateCustomerAndAddressAttributes]

**`updateCustomerAndAddressAttributes`** (mutation, v2)

Yalnızca v2 endpoint'inde: `https://api.myikas.com/api/v2/admin/graphql`

Parametreler:

| Alan | Tip | Açıklama |
| --- | --- | --- |
| `input` (zorunlu) | `UpdateCustomerAndAddressAttributesInput!` | İşlemin girdi nesnesi. |

Dönen değer: `Customer!`

Örnek istek - Müşteri ve adres özelliklerini güncelleme (`POST https://api.myikas.com/api/v2/admin/graphql`):

Müşteriye ve adreslerine ait özel alan değerlerini tek istekte günceller. Özellik ve seçenek ID'leri `listCustomerAttribute` ile alınır.

```graphql
mutation UpdateCustomerAndAddressAttributes($input: UpdateCustomerAndAddressAttributesInput!) {
  updateCustomerAndAddressAttributes(input: $input) {
    id
    fullName
    attributes {
      customerAttributeId
      customerAttributeOptionId
      value
    }
    updatedAt
  }
}
```

```json
{
  "input": {
    "customerId": "4e58c411-9540-427e-a047-6c257e8d51c0",
    "customerAttributes": [
      {
        "customerAttributeId": "b9a9ed82-ceec-4ca3-a373-a3ed333638dc",
        "value": "1234567890"
      },
      {
        "customerAttributeId": "617cf1f1-f8a9-4184-9d9a-8903573904b1",
        "customerAttributeOptionIds": [
          "6918a3b1-19e7-47b1-aafc-82f5fe1b821e"
        ]
      }
    ],
    "addressAttributes": [
      {
        "addressId": "e45f8efc-60b1-4e8f-9a40-4bc5beaaddf6",
        "attributes": [
          {
            "customerAttributeId": "8a200938-5e5a-4ea9-99b7-37c06db2647b",
            "value": "Hafta içi 09:00-18:00 arası teslimat"
          }
        ]
      }
    ]
  }
}
```

Örnek yanıt (temsili):

```json
{
  "data": {
    "updateCustomerAndAddressAttributes": {
      "id": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
      "fullName": "Örnek",
      "attributes": [
        {
          "customerAttributeId": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
          "customerAttributeOptionId": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
          "value": "string"
        }
      ],
      "updatedAt": 1735725600000
    }
  }
}
```

## Müşterinin B2B durumunu güncelle [#updateCustomerB2BStatus]

**`updateCustomerB2BStatus`** (mutation, v1)

Yalnızca v1 endpoint'inde: `https://api.myikas.com/api/v1/admin/graphql`.

Parametreler:

| Alan | Tip | Açıklama |
| --- | --- | --- |
| `b2bStatus` (zorunlu) | `CustomerB2BStatusEnum!` | Değerler: `ACTIVE_ACCOUNT`, `DISABLED_ACCOUNT`, `WAITING_FOR_APPROVAL`. |
| `customerId` (zorunlu) | `String!` |  |

Dönen değer: `Boolean!`

Örnek istek - Müşterinin B2B durumunu güncelleme (`POST https://api.myikas.com/api/v1/admin/graphql`):

Onay bekleyen bir B2B hesap başvurusunu kabul etmek veya B2B hesabı devre dışı bırakmak için kullanılır.

```graphql
mutation UpdateCustomerB2BStatus($customerId: String!, $b2bStatus: CustomerB2BStatusEnum!) {
  updateCustomerB2BStatus(customerId: $customerId, b2bStatus: $b2bStatus)
}
```

```json
{
  "customerId": "30ce9622-9ae6-40e3-a77a-a784ddc178c4",
  "b2bStatus": "ACTIVE_ACCOUNT"
}
```

Örnek yanıt (temsili):

```json
{
  "data": {
    "updateCustomerB2BStatus": true
  }
}
```

## Müşterinin e-posta abonelik durumunu güncelle [#updateSubscriptionStatus]

**`updateSubscriptionStatus`** (mutation, v1)

Yalnızca v1 endpoint'inde: `https://api.myikas.com/api/v1/admin/graphql`.

Parametreler:

| Alan | Tip | Açıklama |
| --- | --- | --- |
| `customerId` (zorunlu) | `String!` |  |
| `subscriptionStatus` (zorunlu) | `CustomerEmailSubscriptionStatusesEnum!` | Değerler: `NOT_SUBSCRIBED`, `PENDING_CONFIRMATION`, `SUBSCRIBED`. |

Dönen değer: `Boolean!`

Örnek istek - E-posta abonelik durumunu güncelleme (`POST https://api.myikas.com/api/v1/admin/graphql`):

E-posta pazarlama uygulamanızda abonelikten çıkma bağlantısına tıklayan müşterinin ikas tarafındaki e-posta izin durumunu güncellemek için kullanılır.

```graphql
mutation UpdateSubscriptionStatus($customerId: String!, $subscriptionStatus: CustomerEmailSubscriptionStatusesEnum!) {
  updateSubscriptionStatus(
    customerId: $customerId
    subscriptionStatus: $subscriptionStatus
  )
}
```

```json
{
  "customerId": "84d98463-9a8d-4b95-a44e-131d4d91a8c4",
  "subscriptionStatus": "NOT_SUBSCRIBED"
}
```

Örnek yanıt (temsili):

```json
{
  "data": {
    "updateSubscriptionStatus": true
  }
}
```

## Müşteri özelliklerini listele [#listCustomerAttribute]

**`listCustomerAttribute`** (query, v1 · v2)

Parametreler:

| Alan | Tip | Açıklama |
| --- | --- | --- |
| `includeDeleted` | `Boolean` | `true` gönderilirse silinmiş kayıtlar da listelenir. |

Dönen değer: `[CustomerAttribute!]!`

Örnek istek - Müşteri özelliklerini listeleme (`POST https://api.myikas.com/api/v2/admin/graphql`):

Mağazada tanımlı özel müşteri alanlarını (ör. vergi numarası, sektör) ve seçeneklerini almak için kullanılır. Dönen `id` değerleri, müşteri özelliği güncellerken `customerAttributeId` olarak kullanılır.

```graphql
query ListCustomerAttribute($includeDeleted: Boolean) {
  listCustomerAttribute(includeDeleted: $includeDeleted) {
    id
    name
    description
    type
    order
    options {
      id
      name
    }
  }
}
```

```json
{
  "includeDeleted": false
}
```

Örnek yanıt (temsili):

```json
{
  "data": {
    "listCustomerAttribute": [
      {
        "id": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
        "name": "Örnek",
        "description": "Örnek açıklama",
        "type": "BOOLEAN",
        "order": 1,
        "options": [
          {
            "id": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
            "name": "Örnek"
          }
        ]
      }
    ]
  }
}
```
