Device Status notification details

On this page, you will find the different types of notification JSON schemas for Device-Status, such as Connectivity, Roaming and End of subscription. Underneath each JSON schema, there is a table with further information on the specific schema right above it. At the bottom of this page, you can also check a table, which contains further details on the values that are shared by all the different schemas.

Remember that the string values represented below are just examples that can be used. So, they should contain your real device-status values.

Connectivity-event-detail schema

This is the notification JSON schema for monitoring when a device is attached or detached from a data network (connectivity).

{
    "id": "9884b8d2-5392-4ed7-8cde-0ce25bf58df3",
    "source": "/device-status/v0/subscriptions/83b1eaae-4533-4bff-a0af-e805cb8a2940",
    "type": "org.camaraproject.device-status.v0.connectivity-data",
    "specversion": "1.0",
    "datacontenttype": "application/json",
    "time": "2026-04-17T07:31:01.416474Z",
    "eventSubscriptionId": "83b1eaae-4533-4bff-a0af-e805cb8a2940",
    "event": {
        "eventType": "DEVICE_STATUS_CHANGED",
        "eventTime": "2026-04-17T07:31:01.416474Z",
        "eventDetail": {
            "device": {
                "phoneNumber": "36701234567",
                "networkAccessIdentifier": "device@testcsp.net",
                "ipv4Address": {
                    "publicAddress": "233.252.0.2",
                    "privateAddress": "192.0.2.25",
                    "publicPort": 80
                },
                "ipv6Address": "2001:db8:1234:5678:9abc:def0:fedc:ba98"
            },
            "subscriptionId": "2001:db8:1234:5678:9abc:def0:fedc:ba98",
            "deviceStatus": "REACHABLE"
        }
    },
    "data": {
        "device": {
            "phoneNumber": "36701234567",
            "networkAccessIdentifier": "device@testcsp.net",
            "ipv4Address": {
                "publicAddress": "233.252.0.2",
                "privateAddress": "192.0.2.25",
                "publicPort": 80
            },
            "ipv6Address": "2001:db8:1234:5678:9abc:def0:fedc:ba98"
        },
        "subscriptionId": "83b1eaae-4533-4bff-a0af-e805cb8a2940"
    }
}
Connectivity-keyword valuesDescription
deviceStatusA string, which will be REACHABLE if the device is online and UNREACHABLE when it's offline.

Roaming-event-detail schema

This is the notification JSON schema for monitoring if a device is roaming or not.

{
    "id": "2628b42e-8789-4fcd-942a-841f16f52897",
    "source": "/device-status/v0/subscriptions/90409561-68f5-4360-b12d-9003f4dca8b0",
    "type": "org.camaraproject.device-status.v0.roaming-status",
    "specversion": "1.0",
    "datacontenttype": "application/json",
    "time": "2026-04-17T07:31:01.416474Z",
    "eventSubscriptionId": "90409561-68f5-4360-b12d-9003f4dca8b0",
    "event": {
        "eventTime": "2026-04-17T07:31:01.416474Z",
        "eventDetail": {
            "device": {
                "phoneNumber": "36701234567",
                "networkAccessIdentifier": "device@testcsp.net",
                "ipv4Address": {
                    "publicAddress": "233.252.0.2",
                    "privateAddress": "192.0.2.25",
                    "publicPort": 80
                },
                "ipv6Address": "2001:db8:1234:5678:9abc:def0:fedc:ba98"
            },
            "subscriptionId": "90409561-68f5-4360-b12d-9003f4dca8b0",
            "roaming": true,
            "countryCode": 587
        }
    },
    "data": {
        "device": {
            "phoneNumber": "36701234567",
            "networkAccessIdentifier": "device@testcsp.net",
            "ipv4Address": {
                "publicAddress": "233.252.0.2",
                "privateAddress": "192.0.2.25",
                "publicPort": 80
            },
            "ipv6Address": "2001:db8:1234:5678:9abc:def0:fedc:ba98"
        },
        "subscriptionId": "90409561-68f5-4360-b12d-9003f4dca8b0",
        "roaming": true,
        "countryCode": 587
    }
}
Roaming-event-detail-keyword valuesDescription
roamingEither a Boolean or a "null" value.
countryCodeEither an integer with the country code or a "null" value.
countryNameEither a string or string array with the country name(s) or a "null" value.

Subscription-ends-event-detail schema

This is the notification JSON schema for monitoring why a device's subscription ended.

{
   "id":"2628b42e-8789-4fcd-942a-841f16f52897",
   "source":"/device-status/v0/subscriptions/f76c90dd-3f68-4c69-bbdc-57bddfd0f910",
   "type":"org.camaraproject.device-status.v0.subscription-ends",
   "specversion":"1.0",
   "datacontenttype":"application/json",
   "time":"2027-04-17T07:31:01.416474Z",
   "eventSubscriptionId":"f76c90dd-3f68-4c69-bbdc-57bddfd0f910",
   "event":{
      "eventType":"SUBSCRIPTION_ENDS",
      "eventTime":"2027-04-17T07:31:01.416474Z",
      "eventDetail":{
         "device":{
            "phoneNumber":"36701234567",
            "networkAccessIdentifier": "device@testcsp.net",
            "ipv4Address": {
                "publicAddress": "233.252.0.2",
                "privateAddress": "192.0.2.25",
                "publicPort": 80
            },
            "ipv6Address": "2001:db8:1234:5678:9abc:def0:fedc:ba98"
         },
         "subscriptionId":"f76c90dd-3f68-4c69-bbdc-57bddfd0f910",
         "terminationReason":"SUBSCRIPTION_EXPIRED"
      }
   },
   "data":{
      "device":{
         "phoneNumber":"36701234567",
            "networkAccessIdentifier": "device@testcsp.net",
            "ipv4Address": {
                "publicAddress": "233.252.0.2",
                "privateAddress": "192.0.2.25",
                "publicPort": 80
            },
            "ipv6Address": "2001:db8:1234:5678:9abc:def0:fedc:ba98"
      },
      "subscriptionId":"f76c90dd-3f68-4c69-bbdc-57bddfd0f910",
      "terminationReason":"SUBSCRIPTION_EXPIRED"
   }
}
Subscription-ends-keyword valuesDescription
terminationReasonA string value containing the termination reason. It explains if the subscription ended due to expiration "SUBSCRIPTION_EXPIRED" or network interruption "NETWORK_TERMINATED".

Shared-keyword values

Check the table below for further information on mandatory, optional values and their types. The values described here are common to all the Device-Status notification JSON schemas:

Keyword valuesDescription
subscriptionIdA string value with the event subscription identifier.
sourceA string value that identifies the source where the event happened. It contains the Network as Code API implementation and subscription ID.
typeA string value returned by the API with different statuses.
specversionA string representing the specification version.
datacontenttypeIt indicates the mediat type for the event payload encoding. It must be "application/json" in the context of CAMARA APIs
timeA string value with the time the event occurred. Date and time are specified in ISO 8601 format, e.g.: 2023-08-20T21:01:02.345Z.

Device identifiers

Keyword valuesDescription
dataAn object that will contain other objects or strings with multiple device status data.
deviceAn object that will contain other objects or strings with multiple device identifiers.
phoneNumberOptional string with a pattern that matches "^[+]?[0-9]{5,15}$" or a "null" value.
networkAccessIdentifierOptional string with a pattern that matches "^[+]?[0-9]{5,15}$" or a "null" value. It is an email-like external identifier for a device (or subscriber) into the network. If both the networkAccessIdentifier and phoneNumber are included, phoneNumber will be dropped and networkAccessIdentifier will be retained.
ipv4AddressOptional object containing an object for IPv4 address values or a "null" value. It refers to the IPv4 address of the device. An IP address is needed for some flow-oriented services, such as QoD.
publicAddressOptional string with either the device's public IPv4 address, the Network Address Translation (NAT) behind it or a "null" value. Learn more about NAT.
privateAddressOptional string with the device's private IPv4 address if it is behind NAT or a "null" value.
publicPortOptional integer with the public port used by the device or a "null" value. A port is necessary, as private address ranges overlap, and public port is used to extend the range for Carrier-grade NAT (CGNAT), a type of large-scale NAT.
ipv6AddressOptional string containing the device's IPv6 address or a "null" value. An IP address is needed for some flow-oriented services, such as QoD.

Last updated on July 09, 2024