Subscriptions Report

Report subscriptions with Zotlo

This API service is a read-only reporting endpoint that allows you to query all subscription records created through Zotlo in a secure, performant, and scalable manner. It enables you to view active, inactive, or canceled subscriptions on the platform using various filters such as date range, package/product, and country. The endpoint allows you to fetch large volumes of subscription data efficiently and manage your reporting and operational workflows smoothly.

The service operates with the GET method, and the main endpoint is as follows:

Parameter
Description
Required

limit

The maximum number of records to return. (Default: 25, Max: 100)

Optional

country

Filters transactions by the country where the payment was processed.

Optional

package_id

Filters transactions by the associated package .

Optional

start_date

Lists transactions created after the specified date. (Format: Y-m-d)

Optional

end_date

Lists transactions created after the specified date. (Format: Y-m-d)

Optional

before

To navigate to the previous page, send the before cursor value returned in the previous response.

Required only during pagination step.

after

To navigate to the previous page, send the before cursor value returned in the previous response.

Required only during pagination step.

Example Request:

To send a request to the Transaction Report Service, you must include your Access Key, Access Secret, and App ID in the request headers. You can obtain these credentials from the Zotlo Panel → Developer Tools → API Keys section.

GET https://api.zotlo.com/v1/reports/activity/subscription?limit=50?&start_date=2025-11-01&end_date=2025-11-30 HTTP/1.1
AccessKey: ••••••
AccessSecret: ••••••
Content-Type: application/json
ApplicationId: •
Language: ••

Successful Response Examples

{
  "meta": {
    "requestId": "5896c0267514-REQ-6924662e5718a",
    "httpStatus": 200
  },
  "result": {
    "data": [
      {
        "id": 343,
        "platform": "ios",
        "startDate": "2025-11-10 08:27:37",
        "expireDate": "2025-11-10 08:28:08",
        "subscriberId": "3a33eb5d-3e4b-4875-916f-7e9fb5867f3f",
        "productId": "web_premium",
        "originalTransactionId": "29d557b4-2563-497b-ad1f-677ac6910b81",
        "lastTransactionId": "29d557b4-2563-497b-ad1f-677ac6910b81",
        "lastTrandactionDate": "2025-11-10 08:27:37",
        "status": "passive",
        "subscriptionType": "paid",
        "currency": "TRY",
        "price": "200.00",
        "trialPrice": "0.00",
        "country": "TR",
        "language": "TR",
        "teamId": 1,
        "providerId": 13,
        "period": 1,
        "trialPeriod": 0,
        "renewalDate": "2025-12-10 08:27:37",
        "appId": 1,
        "cancellationDate": "2025-11-10 08:28:08",
        "cancellationReason": "{\"reason\":\"\",\"user\":\"API: \"}",
        "cancellationCode": "CU00002",
        "mobilePhone": "+905555555555",
        "email": "[email protected]",
        "jsonPayload": "{\"forceWebhook\":true,\"subscriberIpAddress\":\"0.0.0.0\"}",
        "quantity": 1,
        "pendingQuantity": 0,
        "periodType": "month",
        "trialPeriodType": "day",
        "packageCountry": "TR",
        "freezeEndDate": null
      },
      {
        "id": 342,
        "platform": "ios",
        "startDate": "2025-11-10 08:19:29",
        "expireDate": "2025-11-10 08:26:59",
        "subscriberId": "8aa4de92-a86d-4330-bb3c-6995a5f837ed",
        "productId": "web_premium",
        "originalTransactionId": "6edc57b0-86a1-4ba7-bf9a-81d05afbf505",
        "lastTransactionId": "6edc57b0-86a1-4ba7-bf9a-81d05afbf505",
        "lastTrandactionDate": "2025-11-10 08:19:29",
        "status": "passive",
        "subscriptionType": "paid",
        "currency": "TRY",
        "price": "200.00",
        "trialPrice": "0.00",
        "country": "TR",
        "language": "TR",
        "teamId": 1,
        "providerId": 13,
        "period": 1,
        "trialPeriod": 0,
        "renewalDate": "2025-12-10 08:19:29",
        "appId": 1,
        "cancellationDate": "2025-11-10 08:26:59",
        "cancellationReason": "{\"reason\":\"\",\"user\":\"API: \"}",
        "cancellationCode": "CU00002",
        "mobilePhone": "+905555555555",
        "email": "[email protected]",
        "jsonPayload": "{\"forceWebhook\":true,\"subscriberIpAddress\":\"0.0.0.0\"}",
        "quantity": 1,
        "pendingQuantity": 0,
        "periodType": "month",
        "trialPeriodType": "day",
        "packageCountry": "TR",
        "freezeEndDate": null
      }
    ],
    "paging": {
      "cursors": {
        "previous": null,
        "next": "ExxyYaIVgzdwKWb7tuUf8WlwMlFSZmcxYVpiem5iWE93NW9EZkMrYk9oSE9tVEYrUlV4TUZMV2Y2ZG9VOEhucFdaSHRxNXVFaEdwYS90Z2lXRnpweEtzcG1WbG04THBLMGtJMWlmL2NKdjFneDJZZE5mNEIyVTNwQWlFSFV4ZU9wL2gyRUc0N2JYdjc0SEwxOVZwVGU4MUV3VUM2UFJCbWt0Y0tacUpjVFliRWg3eEoySVhWSEF2RDJIdkE2S3M4dCtiekZlMGJkZFFpblIxZU4vWE1hZmErTzJRSmdVNFBnbHFDQ28ya2hDMVJ5ZTJpU1ZyWGNLbGxrK009"
      },
      "previous": "https://local-api.zotlo.com:39443/v1/reports/activity/subscription",
      "next": "https://local-api.zotlo.com:39443/v1/reports/activity/subscription?after=ExxyYaIVgzdwKWb7tuUf8WlwMlFSZmcxYVpiem5iWE93NW9EZkMrYk9oSE9tVEYrUlV4TUZMV2Y2ZG9VOEhucFdaSHRxNXVFaEdwYS90Z2lXRnpweEtzcG1WbG04THBLMGtJMWlmL2NKdjFneDJZZE5mNEIyVTNwQWlFSFV4ZU9wL2gyRUc0N2JYdjc0SEwxOVZwVGU4MUV3VUM2UFJCbWt0Y0tacUpjVFliRWg3eEoySVhWSEF2RDJIdkE2S3M4dCtiekZlMGJkZFFpblIxZU4vWE1hZmErTzJRSmdVNFBnbHFDQ28ya2hDMVJ5ZTJpU1ZyWGNLbGxrK009"
    }
  }
}

Failed Response Example

In successful cases, our services return an HTTP status code of 200. In unsuccessful cases, an HTTP Status Code of 400 or 500 is returned. A sample error response is as follows.

{
  "meta": {
    "requestId": "5896c0267514-REQ-692464aa9a8c8",
    "httpStatus": 400,
    "errorMessage": "Invalid start_date format. Use Y-m-d",
    "errorCode": "400024"
  },
  "result": []
}

Failed Response Parameters

The parameters for unsuccessful requests are as follows. Failed requests return an error code of 400 or 500.

requestId

A unique ID assigned to every request. Used for identifying and tracking errors in system logs.

httpStatus

The HTTP status code of the error.

errorMessage

The error message returned by the API. You can view all error codes here.

errorCode

The error code provided by Zotlo for this specific error.

Last updated