🔄 Unified Update System

If you are a plugin, app or script developer selling your product on Digital Store, this service lets you show an update alert directly inside your users’ app: the app periodically checks the site and, when a new version is released, receives the version number, the changelog and a secure download link. In addition, your buyers also get a notification on the site itself.

POST/api/updates/check

Check for updates to a product. No authentication is required; for paid products, send the buyer’s license key in the body to receive a secure download link.

Request body parameters (JSON)

FieldTypeRequiredDescription
slugstringYes*Product slug on the site
productIdnumberYes*Alternative to slug (*one of these two)
currentVersionstringNoVersion installed in the client app (e.g. 1.2.0)
licenseKeystringFor paid productsBuyer’s license key
platformstringNowordpress | node | android | ios | desktop | other
channelstringNoSTABLE (default) | TRIAL | INSIDER

Sample request and response

request.json
{
  "slug": "advanced-seo-pro",
  "currentVersion": "1.0.0",
  "licenseKey": "A1B2-C3D4-E5F6-...",
  "platform": "wordpress"
}
response.json
{
  "updateAvailable": true,
  "product": {
    "id": 12,
    "name": "پلاگین سئو پیشرفته",
    "slug": "advanced-seo-pro",
    "featuredImage": "https://.../image.jpg",
    "pricingType": "ONE_TIME"
  },
  "currentVersion": "1.0.0",
  "latestVersion": "1.2.0",
  "channel": "STABLE",
  "changelog": "رفع باگ‌ها و افزودن قابلیت جدید",
  "publishedAt": "2026-09-01T12:00:00.000Z",
  "requiresLicense": true,
  "licenseValid": true,
  "downloadUrl": "https://api.example.com/api/download/file?token=...",
  "fileSize": 1048576,
  "fileHash": "sha256:...",
  "checkedAt": "2026-09-16T12:00:00.000Z"
}
Important notes:
  • downloadUrl is a signed 5-minute link — use it immediately and don’t store it.
  • If licenseValid: false, downloadUrl is null.
  • Version comparison uses real semver (e.g. 1.2.10 > 1.2.9).
  • Rate limit: 120 requests per hour per IP — checking twice a day is enough.

GET/api/updates/versions/:slug

Released version history + changelog (for the in-app “Changelog” page). Optional ?channel=STABLE|TRIAL|INSIDER.

GET/api/update-check (legacy compatibility)

The legacy format used by older WordPress plugins — still works:

legacy
GET /api/update-check?slug=advanced-seo-pro&version=1.0.0&license=KEY

{
  "update_available": true,
  "new_version": "1.2.0",
  "changelog": "...",
  "requires_license": false,
  "package": "https://.../api/download/file?token=..."
}

POST/api/updates/vendor/products/:id/versions

Publish a new version programmatically (CI/CD friendly) with a seller API key. Create the key in Seller Panel → Update System and send it in the X-Update-Api-Key header.

publish.sh
curl -X POST "https://api.example.com/api/updates/vendor/products/12/versions" \
  -H "Content-Type: application/json" \
  -H "X-Update-Api-Key: dsu_..." \
  -d '{
    "version": "1.3.0",
    "changelog": "رفع باگ‌ها و بهبود سرعت",
    "fileUrl": "/uploads/plugin-1.3.0.zip",
    "fileSize": 1048576,
    "fileHash": "sha256:...",
    "channel": "STABLE"
  }'

Publishing to the STABLE channel: buyers are notified on the site, the store cache is cleared and every connected app sees the new version on its next check. Check statistics are available from GET /api/updates/vendor/stats, which reports check counts.

Full update lifecycle

  1. The seller publishes a new version in the panel (or from CI/CD with the API key).
  2. The site sends a notification to all buyers (notification bell + badge).
  3. The client app calls POST /updates/check during its periodic check.
  4. Response: new version + changelog + secure download link (when the license is valid).
  5. The app alerts the user and downloads the file from the secure link.
  6. The seller sees check statistics and outdated clients in the panel.

Ready-to-use integration code

Complete code samples for WordPress/PHP, Node.js and Android/Kotlin along with a step-by-step guide are available in the seller panel:

Seller Panel → Update System