Abonelik Durumu Sorgulama

Zotlo ile aboneleriniz durumunu sorgulayın

Bu API hizmeti, Zotlo ile yönetilen kullanıcıların aboneliklerine ait son durumu hakkında sizi bilgilendirir.

Abonelik durumu sorgulama servisi GET metoduyla çalışır. Abone'ye ait bilgilerin alınabilmesi için subscriberId ve packageId parametrelerinin gönderilmesi zorunludur.

Örnek İstek

Abonelik sorgulama servisine istek gönderirken gerekli olan Access Key ve Access Secret bilgilerine, Zotlo Panel'de yer alan Developer Tools/API Keys sayfasından ulaşabilirsiniz.

Application ID bilgisinin gönderilmesi zorunlu değildir.

GET https://api.zotlo.com/v1/subscription/profile?subscriberId=SUBSCRIBER_ID&packageId=PACKAGE_ID HTTP/1.1
AccessKey: ••••••
AccessSecret: ••••••
Content-Type: application/json
ApplicationId: •
Language: ••

Başarılı Cevap Örneği

Eğer Abonelik Profili Varsa ve Aktif İse

{
  "meta": {
    "requestId": "6d2989e84793-REQ-5f32a82e299ff",
    "httpStatus": 200
  },
  "result": {
    "profile": {
      "status": "active",
      "realStatus": "active",
      "subscriberId": "9",
      "subscriptionType": "paid",
      "startDate": "2020-08-10 21:57:25",
      "expireDate": "2020-09-09 21:57:25",
      "package": "zotlo-premium",
      "country": "TR",
      "phoneNumber": "+905555555555",
      "language": "tr",
      "originalTransactionId": "80397a95-742d-4c74-975e-f740d1909580",
      "cancellation": null,
      "customParameters": {
        "source": "Landing",
        "adjust": {
          "idfa": "A161AD92-7DC3-4B15-B14C-3AA65995AFCC"
        }
      },
      "renewalFetchCount": 0
    },
    "package": {
      "packageId": "zotlo-premium",
      "price": 3.99,
      "currency": "USD",
      "packageType": "subscription",
      "name": "Zotlo Premium"
    },
    "newPackage": null,
    "card": {
      "cardNumber": "411111******1111",
      "expireDate": "12/20"
    },
    "customer": {
      "id": 1,
      "createDate": "2020-05-13 12:57:36",
      "country": "TR",
      "firstname": "Test",
      "lastname": "Test",
      "email": "test@test.com"
    }
  }
}

Eğer Abonelik Profili Varsa Ancak Hesap İptal Edilmişse

{
  "meta": {
    "requestId": "6d2989e84793-REQ-5f32a89037084",
    "httpStatus": 200
  },
  "result": {
    "profile": {
      "status": "active",
      "realStatus": "passive",
      "subscriberId": "313334342",
      "subscriptionType": "paid",
      "startDate": "2020-08-07 06:44:16",
      "expireDate": "2020-09-06 06:44:16",
      "package": "zotlo-premium",
      "country": "TR",
      "phoneNumber": "+905555555555",
      "language": "tr",
      "originalTransactionId": "51e8fd2a-5b28-4b9f-bfe3-5f752b09d3a3",
      "cancellation": {
        "date": "2020-08-07 06:46:00",
        "reason": "Not Interest",
        "code": "CU00001"
      },
      "customParameters": {
        "source": "Landing"
      }
    },
    "package": {
      "packageId": "zotlo-premium",
      "price": 2.99,
      "currency": "USD",
      "packageType": "subscription",
      "name": "Zotlo Premium"
    },
    "newPackage": null,
    "card": {
      "cardNumber": "411111******1111",
      "expireDate": "12/20"
    },
    "customer": {
      "id": 1,
      "createDate": "2020-05-13 12:57:36",
      "country": "TR",
      "firstname": "Test",
      "lastname": "Test",
      "email": "test@test.com"
    }
  }
}

Başarılı Cevap Parametreleri

Başarılı dönen cevapta yer alan parametreler aşağıdaki gibidir.

Başarısız İstek Örneği

Servislerimizden HTTP status code olarak başarılı durumlarda 200 dönmektedir. Başarısız durumlarda ise 400 ya da 500 Http StatusCode dönmektedir. Örnek hata cevabı aşağıdaki şekildedir.

{
  "meta": {
    "requestId": "app2.domain-REQ-5e73a811d5d",
    "httpStatus": 400,
    "errorMessage": "Kullanıcı profili bulunamadı.",
    "errorCode": 400009
  },
  "result": []
}

Başarısız Cevap Parametreleri

Başarısız dönen isteklerde yer alan parametreler aşağıdaki gibidir. Başarısız isteklerde hata kodu olarak 400 ya da 500 dönmektedir.

Last updated