🔍 Overview

The OfferLink model stores partner offer URLs (for example, trafficback URLs) that are monitored separately from regular Links.

Offer links are checked via Google Safe Browsing and DNS, and notifications are sent via the offers Telegram bot (see Telegram Messages).


📑 Fields

FieldTypeDescription
root_domainstrRoot domain extracted from link.
domainstrDomain extracted from link.
linkURLFieldOffer URL (unique).
partnerstrPartner identifier/name.
statusstrCurrent status (active/blocked/unblocked).
ownerForeign Key UserOptional owner.
created_atdatetimeCreation timestamp.
updated_atdatetimeLast update timestamp.
blocked_atdatetimeWhen blocked.
reasonstrBlock reason (DNS_NOT_RESOLVABLE or Google Safe Browsing threat types, etc.).
unblocked_atdatetimeWhen unblocked.
changed_bystrActor identifier (system/user).

🧩 Methods

MethodDescription
get_domains_map(statuses, reason_exclude=None)Returns {domain -> [OfferLink...]} for the given statuses.
set_block(reason, action_by="system")Sets blocked status and sends an offers-bot Telegram notification.
set_unblock(action_by="system")Sets unblocked status and sends an offers-bot Telegram notification.

🏷 Statuses

StatusDescription
activeOffer link is active and monitored.
blockedOffer link is blocked.
unblockedOffer link is unblocked by Google and can be used again.

💡 Notes

  • domain and root_domain are derived from link on save.