Fuel Site Monitor - Integrate

Use the request to set up status monitoring.

Fuel Site Monitor Request

Make the following sample call to the Cert environment using the start time of 2019-10-30 19:00:58.

GET https://certification-sitestatus.external.skybridge.paydiant.com/site-status?startTime=2019-10-30 19:00:58

For the Prod environment use:

GET https://prod-sitestatus.external.skybridge.paydiant.com/site-status?startTime=2019-10-30 19:00:58
Item Description
Headers Pass the x-api-key in the request header when invoking the API. If the API Key is not sent in the header, you get a 403 - Forbidden error.
Query parameters Pass startTime as a mandatory query parameter while invoking the API. The API returns only sites whose connectivity status has changed on or after the timestamp mentioned in startTime. startTime is UTC timestamp in the format: yyyy-MM-dd-HH:mm:ss.
Content type Specify the API response in json format.
media/type: application/json

Fuel Site Monitor Success Response

200 OK
Content-type: application/json
Body:

{
  "tenant": "BigFuelMerchant",
  "startTime": "2019-09-18 14:30:05",
  "endTime": "2019-09-18 14:31:50",
  "sites": [
  {
  "siteId": "SITE_1",
                 "eventTime": "2019-09-18 14:30:23.362",
  "currentStatus": "OFFLINE",
  "statusReason": "MPPA INITIATED DISCONNECT NODE FAILURE"
  },
  {
  "siteId": "SITE_2",
                 "eventTime": "2019-09-18 14:31:45.783",
  "currentStatus": "OFFLINE",
  "statusReason": "MPPA INITIATED DISCONNECT IDLE CONNECTION"
  }
  ]
}

Response parameters

Parameter Description
tenant Merchant to which the site details belong.
startTime Timestamp passed by merchant in request, starting time from when the status changes are retrieved.
endTime Timestamp that identifies the end of the the time period during which the status changes are retrieved. Merchant can use this timestamp for their subsequent request.
sites List of fuel sites whose connection status are changed.
siteId External store location Id of the site.
eventTime Timestamp when the site connection status was changed, including details in milliseconds.
currentStatus Current status of site: Valid values are:
ONLINE
OFFLINE
statusReason Reason for site connection changes. Valid values are:
CONNECTION ESTABLISHED
SITE INITIATED DISCONNECTION
MPPA INITIATED DISCONNECTION DUPLICATE CONNECTION
MPPA INITIATED DISCONNECTION IDLE CONNECTION
MPPA INITIATED DISCONNECTION NODE FAILURE

The following table lists the status changes that are tracked:

Status Description
CONNECTION ESTABLISHED ONLINE
Site is ONLINE and connected to MPPA.
SITE INITIATED DISCONNECTION OFFLINE
Site is OFFLINE. Disconnection initiated from Site.
MPPA INITIATED DISCONNECTION DUPLICATE CONNECTION OFFLINE
Site is OFFLINE. Disconnection initiated from MPPA. MPPA identified duplicate connection from Site.
MPPA INITIATED DISCONNECTION IDLE CONNECTION OFFLINE
Site is OFFLINE. Disconnection initiated from MPPA. Site was idle.
MPPA INITIATED DISCONNECTION NODE FAILURE OFFLINE
Site is OFFLINE. Disconnection initiated from MPPA. MPPA Node failure.

Fuel Site Monitor Error Responses

The API returns error responses for the following scenarios:

Missing Authentication Token

Error response when merchant fails to sign the request with AccessKey and SecretKey using AWS4 signing protocol.

403 Forbidden

{
    "message": "Missing Authentication Token"
}

Invalid Access Key

Error response when merchant fails to sign the request with AccessKey.

403 Forbidden

{
  "message": "The security token included in the request is invalid."
}

Invalid Secret Key

Error response when merchant signs the request with an invalid SecretKey.

403 Forbidden

{
  "message": "The request signature we calculated does not match the signature you provided.
  Check your AWS Secret Access Key and signing method ...."
}

Missing startTime query parameter

Error response when merchant fails to provide mandatory query parameter startTime.

400 Bad Request

{
  "message": "Missing required request parameters: [startTime]"
}

Invalid startTime format

Error response when merchant provides startTime in an invalid format.

400 Bad Request

{
  "message": "startTime should be a valid timestamp in ‘yyyy-MM-dd HH:mm:ss’ format
}

Invalid startTime format in future

Error response when merchant provided startTime is greater than the current timestamp.

400 Bad Request

{
  "message": "startTime cannot be a future time"
}

Too many requests

Error response when merchant invokes API more than once per minute.

429 Too Many Requests

{
  "message": "Too Many Requests"
}

Next