Using Our APIs
Usage Alerts API
Usage Alerts (POST Service)
14 min
overview sim insight can generate usage alerts when defined thresholds are reached alerts are typically delivered by email if required, alerts can also be delivered via https post to your server post requests are sent with content type text/xml (utf 8 encoded) user agent csl sim insight/1 0 0 payload xml (formats shown below) for initial testing, http post may also be enabled endpoint configuration you may provide a primary resource url an optional backup resource url an optional passphrase example endpoints https //primeserver clientdomain com/alertshandler aspx https //secondaryserver clientdomain uk/alertshandler2 aspx delivery behaviour when the service is enabled alerts are queued in the order generated items are delivered on a first in, first out (fifo) basis if delivery to the primary url fails, the backup url (if specified) is attempted if both endpoints fail, retries occur on the following schedule 5s → 10s → 30s → 1m → 2m → 5m → every 15 minutes thereafter undelivered alerts are held indefinitely it is possible for alerts to be delivered more than once if the http response code does not reach the platform endpoints must safely handle duplicate events alert configuration each alert type can be configured on a group by group basis via the sim insight portal delivery can be configured for email api post or both alert payloads each alert type is delivered as a separate xml payload sim usage warning reached \<post alert sim warning version="1" api did="0000187011"> \<passphrase>password\</passphrase> \<iccid>1234567890123456789\</iccid> \<warning level mb>2560\</warning level mb> \<timestamp>09/01/2023 16 28 15\</timestamp> \</post alert sim warning> sim usage limit reached \<post alert sim limit version="1" api did="0000187012"> \<passphrase>password\</passphrase> \<iccid>1234567890123456789\</iccid> \<cut off level mb>2560\</cut off level mb> \<timestamp>09/01/2023 16 28 15\</timestamp> \</post alert sim limit> sim contract – one month remaining \<post alert contract final month version="1" api did="0000187013"> \<passphrase>password\</passphrase> \<iccid>1234567890123456789\</iccid> \</post alert contract final month> sim contract expired \<post alert contract expired version="1" api did="0000187014"> \<passphrase>password\</passphrase> \<iccid>1234567890123456789\</iccid> \</post alert contract expired> group forecast data charge warning reached \<post alert group data version="1" api did="0000187015"> \<passphrase>password\</passphrase> \<group>group code\</group> \<threshold>2560\</threshold> \<timestamp>09/01/2023 16 28 15\</timestamp> \</post alert group data> group forecast sms charge warning reached \<post alert group sms version="1" api did="0000187016"> \<passphrase>password\</passphrase> \<group>group code\</group> \<threshold>230\</threshold> \<timestamp>09/01/2023 16 28 15\</timestamp> \</post alert group sms> group forecast voice charge warning reached \<post alert group voice version="1" api did="0000187017"> \<passphrase>password\</passphrase> \<group>group code\</group> \<threshold>500\</threshold> \<timestamp>09/01/2023 16 28 15\</timestamp> \</post alert group voice> group out of zone charge warning reached \<post alert group ooz version="1" api did="0000187018"> \<passphrase>password\</passphrase> \<group>group code\</group> \<threshold>750\</threshold> \<timestamp>09/01/2023 16 28 15\</timestamp> \</post alert group ooz> forecast total group charge warning reached \<post alert group total version="1" api did="0000187019"> \<passphrase>password\</passphrase> \<group>group code\</group> \<threshold>5400\</threshold> \<timestamp>09/01/2023 16 28 15\</timestamp> \</post alert group total> elements element description api did (attribute) delivery id generated by csl unique reference for outbound api messages unsigned long integer (decimal) \<passphrase> optional shared security string (max 16 alphanumeric characters) \<iccid> iccid of the sim \<group> group code associated with the alert distributor specific \<timestamp> utc time the alert was recognised and actioned format dd/mm/yyyy hh\ mm\ ss \<warning level mb> sim usage warning level in mb (decimal) \<cut off level mb> sim usage cut off level in mb (decimal) \<threshold> monetary threshold triggering the alert expressed in the group’s tariff currency (decimal)