Skip to main content

Push notifications

Introduction

The Astrocast API enables you to receive Push notifications from the Astrocast Network.

Requirements

You can configure Push notifications at the Device Group level. Therefore, your devices must be assigned to a Device Group if you want to receive their messages through Push notifications.

Configuration

  1. Go to the Astrocast Portal.
  2. Click on Settings in the sidebar.
  3. Click on Callbacks to access the device group details.
  4. Click on Configure Callback on the top right.
  5. Enter the Callback URL and the Key and Value of the header(s) of your callback.
  6. Click on Save.

Message delivery notification

Definition

Receive a Push notification message every time an Uplink Message is received by the Astrocast network.

JSON Body

{
"messageGuid": "00000000-0000-0000-0000-000000000000",
"deviceGuid": "00000000-0000-0000-0000-000000000000",
"deviceGroupGuid": "00000000-0000-0000-0000-000000000000",
"createdDate": "2022-01-01T00:00:00Z",
"receivedDate": "2022-01-02T00:00:00Z",
"latitude": null,
"longitude": null,
"data": "",
"messageSize": 0
}

Command acknowledgement notification

Definition

Receive a Push notification message every time a Downlink Command is successfully received by a device.

JSON Body

{
"commandGuid": "00000000-0000-0000-0000-000000000000",
"commandReference": "My Custom Reference",
"deviceGuid": "00000000-0000-0000-0000-000000000000",
"createdDate": "2022-01-01T00:00:00Z",
"expirationDate": "2023-03-01T00:00:00Z",
"receivedDate": "2022-01-01T00:00:00Z",
"ackReceivedDate": "2022-01-01T00:00:00Z",
"cancelledDate": null,
"commandData": "EACurq6uEBA=",
"commandSize": 8,
"commandStatus": 4
}

Retry mechanism

An HTTP 200 OK success status response code is expected when the Callback URL is requested. In this case, the message callbackDelivered parameter will be set to true in the Astrocast API.

In any other case, such as a different HTTP response code or timeout, the following retry cubic sequence will be attempted, until a 200 OK is received or the end of the sequence is reached.

# retry attemptDelay (min)Delay (hh:mm)
1500:05
22500:25
37001:10
415002:30
527504:35
645507:35
770011:40
8102017:00
9142523:45