---
title: Fiyat listeleri
description: Müşteri gruplarına veya satış kanallarına özel fiyat listelerini yönetin.
full: true
---

## PriceList nesnesi [#PriceList]

**`PriceList`** (v1 · v2)

| Alan | Tip | Açıklama |
| --- | --- | --- |
| `addProductsAutomatically` | `Boolean` |  |
| `createdAt` | `Timestamp` | Kaydın oluşturulma zamanı (milisaniye cinsinden Unix zaman damgası). |
| `currency` | `String!` | Ürünün fiyat listesinin para birimi. |
| `currencyCode` | `String` |  |
| `currencySymbol` | `String` |  |
| `deleted` | `Boolean!` | Kaydın silinmiş olup olmadığı. |
| `id` | `String!` | Kaydın ID değeri. |
| `name` | `String!` | Ürünün fiyat listesinin adı. |
| `ruleList` | `[PriceListRuleList!]` |  |
| `type` | `PriceListTypeEnum` | Fiyat listesinin fiyat tipi Değerler: `DYNAMIC`, `DYNAMIC_RATE`, `MANUAL`. |
| `updatedAt` | `Timestamp` | Kaydın son güncellenme zamanı (milisaniye cinsinden Unix zaman damgası). |

Örnek (temsili):

```json
{
  "addProductsAutomatically": true,
  "createdAt": 1735725600000,
  "currency": "TRY",
  "currencyCode": "TRY",
  "currencySymbol": "₺",
  "deleted": false,
  "id": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
  "name": "Örnek",
  "ruleList": [
    {
      "basePriceListId": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
      "currencyRateSettings": null,
      "currencySettings": null,
      "rules": null
    }
  ],
  "type": "DYNAMIC",
  "updatedAt": 1735725600000
}
```

## Fiyat listelerini listele [#listPriceList]

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

Parametreler:

| Alan | Tip | Açıklama |
| --- | --- | --- |
| `id` | `StringFilterInput` | Kaydın ID değeri. |

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

Örnek istek - Fiyat Listelerini Listeleme (`POST https://api.myikas.com/api/v2/admin/graphql`):

Bu API sayesinde, sistemdeki fiyat listelerini çekebilirsiniz. Eğer kullanıncın hiçbir fiyat listesi yoksa, sistemde tek bir Currency ile satış yaptığını varsayabilirsiniz. Bu Currency'i de Satıcı Bilgisi - Varsayılan Para Birimi kısmından öğrenebilirsiniz.

```graphql
query ListPriceList {
  listPriceList {
    addProductsAutomatically
    createdAt
    currency
    currencyCode
    currencySymbol
    deleted
    id
    name
    ruleList {
      basePriceListId
      currencyRateSettings {
        amount
        type
      }
      currencySettings {
        roundingFormat
      }
      rules {
        amount
        amountType
        operationType
      }
    }
    type
    updatedAt
  }
}
```

Örnek yanıt (temsili):

```json
{
  "data": {
    "listPriceList": [
      {
        "addProductsAutomatically": true,
        "createdAt": 1735725600000,
        "currency": "TRY",
        "currencyCode": "TRY",
        "currencySymbol": "₺",
        "deleted": false,
        "id": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
        "name": "Örnek",
        "ruleList": [
          {
            "basePriceListId": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
            "currencyRateSettings": {
              "amount": 129.9,
              "type": "CURRENT_RATE"
            },
            "currencySettings": {
              "roundingFormat": "string"
            },
            "rules": [
              {
                "amount": 129.9,
                "amountType": "AMOUNT",
                "operationType": "DECREASE"
              }
            ]
          }
        ],
        "type": "DYNAMIC",
        "updatedAt": 1735725600000
      }
    ]
  }
}
```

Örnek istek - Fiyat listelerini listeleme (`POST https://api.myikas.com/api/v2/admin/graphql`):

```graphql
{
  listPriceList {
    id
    name
  }
}
```

Örnek yanıt:

```json
{
  "data": {
    "listPriceList": [
      {
        "id": "8cf68e80-82ac-437f-9dd5-dc88cfef8293",
        "name": "Price list name"
      }
    ]
  }
}
```

## Fiyat listesi oluştur [#createPriceList]

**`createPriceList`** (mutation, v2)

PriceList oluşturan mutation.

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

Parametreler:

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

Dönen değer: `PriceList!`

Örnek istek - Dinamik fiyat listesi oluşturma (`POST https://api.myikas.com/api/v2/admin/graphql`):

Yurt dışı satışlar için, varsayılan fiyatlardan güncel kurla Euro'ya çevrilen ve yüzde 10 artırılan bir fiyat listesi oluşturur. Fiyatlar `.99` ile biten değerlere yuvarlanır.

```graphql
mutation CreatePriceList($input: CreatePriceListInput!) {
  createPriceList(input: $input) {
    id
    name
    type
    currency
    addProductsAutomatically
    ruleList {
      currencyRateSettings {
        type
      }
      currencySettings {
        roundingFormat
      }
      rules {
        amount
        amountType
        operationType
      }
    }
    createdAt
  }
}
```

```json
{
  "input": {
    "name": "Avrupa Fiyat Listesi",
    "type": "DYNAMIC",
    "currency": "EUR",
    "addProductsAutomatically": true,
    "ruleList": [
      {
        "currencyRateSettings": {
          "type": "CURRENT_RATE"
        },
        "currencySettings": {
          "roundingFormat": ".99"
        },
        "rules": [
          {
            "amount": 10,
            "amountType": "RATIO",
            "operationType": "INCREASE"
          }
        ]
      }
    ]
  }
}
```

Örnek yanıt (temsili):

```json
{
  "data": {
    "createPriceList": {
      "id": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
      "name": "Örnek",
      "type": "DYNAMIC",
      "currency": "TRY",
      "addProductsAutomatically": true,
      "ruleList": [
        {
          "currencyRateSettings": {
            "type": "CURRENT_RATE"
          },
          "currencySettings": {
            "roundingFormat": "string"
          },
          "rules": [
            {
              "amount": 129.9,
              "amountType": "AMOUNT",
              "operationType": "DECREASE"
            }
          ]
        }
      ],
      "createdAt": 1735725600000
    }
  }
}
```

## Fiyat listesini güncelle [#updatePriceList]

**`updatePriceList`** (mutation, v2)

PriceList güncelleyen mutation.

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

Parametreler:

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

Dönen değer: `PriceList!`

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

Mevcut bir dinamik fiyat listesinin kur ve artış kurallarını günceller. Bu örnekte güncel kur yerine sabit bir kur kullanılır ve artış oranı yüzde 15'e çıkarılır.

```graphql
mutation UpdatePriceList($input: UpdatePriceListInput!) {
  updatePriceList(input: $input) {
    id
    name
    type
    currency
    ruleList {
      currencyRateSettings {
        type
        amount
      }
      currencySettings {
        roundingFormat
      }
      rules {
        amount
        amountType
        operationType
      }
    }
    updatedAt
  }
}
```

```json
{
  "input": {
    "id": "0e404fb4-0c4e-4d2a-83cf-97ca9a2f798d",
    "ruleList": [
      {
        "currencyRateSettings": {
          "type": "CUSTOM_RATE",
          "amount": 0.027
        },
        "currencySettings": {
          "roundingFormat": ".90"
        },
        "rules": [
          {
            "amount": 15,
            "amountType": "RATIO",
            "operationType": "INCREASE"
          }
        ]
      }
    ]
  }
}
```

Örnek yanıt (temsili):

```json
{
  "data": {
    "updatePriceList": {
      "id": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
      "name": "Örnek",
      "type": "DYNAMIC",
      "currency": "TRY",
      "ruleList": [
        {
          "currencyRateSettings": {
            "type": "CURRENT_RATE",
            "amount": 129.9
          },
          "currencySettings": {
            "roundingFormat": "string"
          },
          "rules": [
            {
              "amount": 129.9,
              "amountType": "AMOUNT",
              "operationType": "DECREASE"
            }
          ]
        }
      ],
      "updatedAt": 1735725600000
    }
  }
}
```

## Fiyat listelerini sil [#deletePriceListList]

**`deletePriceListList`** (mutation, v2)

PriceList silen mutation.

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

Parametreler:

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

Dönen değer: `Boolean!`

Örnek istek - Fiyat listelerini silme (`POST https://api.myikas.com/api/v2/admin/graphql`):

Kullanılmayan fiyat listelerini ID listesiyle silmek için kullanılır.

```graphql
mutation DeletePriceListList($idList: [String!]!) {
  deletePriceListList(idList: $idList)
}
```

```json
{
  "idList": [
    "169567b6-7006-430c-aac5-9a6cec17f0d5"
  ]
}
```

Örnek yanıt (temsili):

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