Fuel Site Monitor - Integrate
Last updated: Aug 15th, 7:02am
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 2020-01-30 19:00:58
.
1GET https://certification-sitestatus.external.skybridge.paydiant.com/site-status?startTime=2020-01-30 19:00:58
For the Prod environment use:
1GET https://prod-sitestatus.external.skybridge.paydiant.com/site-status?startTime=2020-01-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
1200 OK2Content-type: application/json3Body:45{6 "tenant": "BigFuelMerchant",7 "startTime": "2020-01-18 14:30:05",8 "endTime": "2020-01-18 14:31:50",9 "sites": [10 {11 "siteId": "SITE_1",12 "eventTime": "2020-01-18 14:30:23.362",13 "currentStatus": "OFFLINE",14 "statusReason": "MPPA INITIATED DISCONNECT NODE FAILURE"15 },16 {17 "siteId": "SITE_2",18 "eventTime": "2020-01-18 14:31:45.783",19 "currentStatus": "OFFLINE",20 "statusReason": "MPPA INITIATED DISCONNECT IDLE CONNECTION"21 }22 ]23}
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 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
- Invalid access key
- Invalid secret key
- Missing
startTime
query parameter - Invalid
startTime
format - Invalid
startTime
format in future - Too many requests
Missing Authentication Token
Error response when merchant fails to sign the request with AccessKey
and SecretKey
using AWS4 signing protocol.
1403 Forbidden23{4 "message": "Missing Authentication Token"5}
Invalid Access Key
Error response when merchant fails to sign the request with AccessKey
.
1403 Forbidden23{4 "message": "The security token included in the request is invalid."5}
Invalid Secret Key
Error response when merchant signs the request with an invalid SecretKey
.
1403 Forbidden23{4 "message": "The request signature we calculated does not match the signature you provided.5 Check your AWS Secret Access Key and signing method ...."6}
Missing startTime query parameter
Error response when merchant fails to provide mandatory query parameter startTime
.
1400 Bad Request23{4 "message": "Missing required request parameters: [startTime]"5}
Invalid startTime format
Error response when merchant provides startTime
in an invalid format.
1400 Bad Request23{4 "message": "startTime should be a valid timestamp in ‘yyyy-MM-dd HH:mm:ss’ format5}
Invalid startTime format in future
Error response when merchant provided startTime
is greater than the current timestamp.
1400 Bad Request23{4 "message": "startTime cannot be a future time"5}
Too many requests
Error response when merchant invokes API more than once per minute.
1429 Too Many Requests23{4 "message": "Too Many Requests"5}