Edit this Page

Abonelik Sorgulama

Müşterinin Aktif Aboneliklerini Sorgulama

Müşteri sorgulama işlemi, abonenin secureId parametresi ile yapılmaktadır. Bu bilgiye yönetim panelinden, ulaşabilirsiniz.

Path: /api/subscriptions/subscriber/${subscriberSecureId}
Sandbox Url: https://sandbox.subscreasy.com/api/subscriptions/subscriber/${subscriberSecureId}
Method: GET

Headers

Yetkilendirme için aşağıdaki HTTP header kullanılmalıdır.

Authorization: Apikey ${Apikey}

Yönetim paneline giriş yapıp, Company Profile ekranından, Apikey değerine ulaşabilirsiniz.

Örnek Request

Curl

curl -X GET \
  https://sandbox.subscreasy.com/api/subscriptions/subscriber/49242b5e-8be2-4cb5-8a26-f028d35c628e \
  -H 'authorization: Apikey brs-1234567890'

PHP

<?php

$request = new HttpRequest();
$request->setUrl('https://sandbox.subscreasy.com/api/subscriptions/subscriber/ef2f9f5388274859af3470cb37401ae5');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
  'Authorization' => 'Apikey brs-1234567890',
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}

C#

var client = new RestClient("https://sandbox.subscreasy.com/api/subscriptions/subscriber/49242b5e-8be2-4cb5-8a26-f028d35c628e");
var request = new RestRequest(Method.GET);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("authorization", "Apikey brs-1234567890");
IRestResponse response = client.Execute(request);
Örnek Response
[
  {
    "id": 1,
    "subscriberSecureId": "49242b5e-8be2-4cb5-8a26-f028d35c628e",
    "status": "ACTIVE",
    "startDate": "2018-07-26T15:33:33+03:00",
    "endDate": "2018-08-26T15:33:33+03:00",
    "offer": {
      "id": -44,
      "secureId": "asd-006",
      "name": "Browsymous Pro's Edition 1 Month",
      "price": 100,
      "openEnded": false,
      "recurrenceCount": 1,
      "recurrence": {
        "id": 5,
        "recurrenceType": "MONTHLY",
        "length": 1
      }
    },
    "company": {
      "id": -1,
      "name": "Browsymous Bilgi İletişim A.Ş.",
      "siteName": "browsymous",
      "address": null
    },
    "version": 1,
    "services": [],
    "subscriberId": 2,
    "savedCardId": 2
  },
  {
    "id": 2,
    "subscriberSecureId": "49242b5e-8be2-4cb5-8a26-f028d35c628e",
    "status": "ACTIVE",
    "startDate": "2018-07-26T15:33:48+03:00",
    "endDate": "2018-08-26T15:33:48+03:00",
    "offer": {
      "id": -44,
      "secureId": "asd-006",
      "name": "Browsymous Pro's Edition 1 Month",
      "price": 100,
      "openEnded": false,
      "recurrenceCount": 1,
      "recurrence": {
        "id": 5,
        "recurrenceType": "MONTHLY",
        "length": 1
      }
    },
    "company": {
      "id": -1,
      "name": "Browsymous Bilgi İletişim A.Ş.",
      "siteName": "browsymous",
      "address": null
    },
    "version": 1,
    "services": [],
    "subscriberId": 2,
    "savedCardId": 3
  }
]