Kart FiyatKartFiyat API

GraphQL v3

Mutasyonlar

Veri değiştiren işlemler. Bu sayfa planlanan mutasyon sözleşmesidir: mutasyonlar henüz yayında değildir, yayındaki v3 şeması yalnızca katalog sorgularını içerir.

Plus Paketi Gerektirir

Aşağıdaki mutasyonlar yalnızca Plus (ve üstü: Kurumsal) paketinde çalışır. Diğer paketlerle yapıldığında 403 PLAN_UPGRADE_REQUIRED döner. İşlemler, API anahtarının sahibi olan kullanıcı üzerinde yapılır.

İlan Fiyatını Güncelle

graphql
mutation {
  updateListingPrice(listingId: 5044, price: 11900) {
    id
    price
    status
    message
  }
}
JSON
{
  "data": {
    "updateListingPrice": {
      "id": 5044,
      "price": 11900,
      "status": "active",
      "message": "Fiyat güncellendi."
    }
  }
}

İlanı Güncelle

Fiyat dışında bir alan gönderirseniz ilan yeniden onaya alınır ( status: "pending"). Yalnızca fiyat değiştirecekseniz updateListingPrice kullanın.

graphql
mutation {
  updateListing(listingId: 5044, input: {
    title: "Charizard VMAX PSA 10"
    description: "Kutuda, temiz durumda"
  }) {
    id
    price
    status
    message
  }
}

İlan Durumunu Değiştir

graphql
mutation {
  setListingStatus(listingId: 5044, action: "pause") {
    id
    status
    message
  }
}

Koleksiyon Kaydı

graphql
mutation {
  addCollectionItem(collectionId: 18, input: {
    itemId: 12345
    quantity: 2
    purchasePrice: 8500
    note: "Kutuda saklanıyor"
  }) {
    id
    itemName
    groupLabel
    quantity
    message
  }
}

Webhook Yapılandırması

graphql
mutation {
  configureWebhook(input: {
    url: "https://siteniz.com/webhooks/kartfiyat"
    onSale: true
    onExpire: true
    isActive: true
  }) {
    url
    onSale
    onExpire
    isActive
  }
}

Alıcı Teklifleri

İlanlara teklif verin, karşı teklifi yanıtlayın, kabul veya reddedin. Kimlik doğrulama + Plus gerekir. Aktif teklifin süresi 24 saattir; süresi dolan teklif expired olur.

Teklif Oluştur

graphql
mutation {
  createOffer(listingId: 5044, amount: 11500) {
    offer { id amount status lastProposedBy expiresAt }
    message
  }
}

Karşı Teklif Yap

Satıcı karşı teklif sunduğunda alıcı yeni tutarla yanıtlar.

graphql
mutation {
  counterOffer(offerId: 301, amount: 11900) {
    offer { id amount status lastProposedBy expiresAt }
    message
  }
}

Teklifi Kabul Et

graphql
mutation {
  acceptOffer(offerId: 301) {
    offer { id status convertedOrderId }
    message
  }
}

Teklifi Reddet

graphql
mutation {
  rejectOffer(offerId: 301) {
    offer { id status }
    message
  }
}

Teklif kuralları

Yalnızca aktif tekliflere karşı teklif/kabul/red gönderebilirsiniz. Kabul edilen teklif, süresi dolmadan siparişe dönüştürülmelidir; aksi halde expired olur.

İlan Soru-Cevap

Soru sormak için kimlik doğrulama yeterlidir; onay mekanizması açıksa soru önce pending olur. Cevaplama işlemi yalnızca ilanın sahibi satıcıya açıktır.

Soru Sor

graphql
mutation {
  askListingQuestion(listingId: 5044, question: "Kartın köşeleri temiz mi?") {
    question { id question status }
    message
  }
}

Soruyu Cevapla

graphql
mutation {
  answerListingQuestion(questionId: 88, answer: "Evet, köşeler temiz.") {
    question { id answer answeredAt status }
    message
  }
}

Sipariş Dışa Aktarma

Satış veya alış tarafındaki siparişlerinizi arka planda CSV olarak hazırlanmasını istersiniz. Kimlik doğrulama + Plus gerekir. İş tamamlanınca orderExports sorgusuyla downloadUrl alınır.

graphql
mutation {
  requestOrderExport(scope: SALES) {
    job { id status totalRows downloadUrl }
    message
  }
}

Hatalar

Mutasyon hataları errors alanında döner. Uygulama hataları için extensions.code değeri kullanılır (örn. PLUS_LISTING_ERROR, PLUS_COLLECTION_ERROR).

JSON
{
  "errors": [
    {
      "message": "Bu ilan size ait değil.",
      "extensions": { "code": "PLUS_LISTING_ERROR" }
    }
  ],
  "data": null
}

Tüm mutasyonlar ve parametreleri için Şema sayfasına bakın.