API Endpoints

These are the endpoints available for Front End integration with On Site Notifications and Rich Inbox. These endpoints are returning data for logged in users.

Getting the config and authenticating the user

Get config

GET https://am-events-[env].fasttrack-solutions.com/api/v1/config/[brand]

This endpoint returns needed config values for your brand

Path Parameters

Name
Type
Description

brand*

String

Your "Fast Track Brand Name" given to you by the Integration Manager

env*

String

Current environment, can be staging or nothing which means production.

{
  "crmUrl": "https://sub.example.com/integration-api",
  "fusionUrl": "https://sub.example.com/integration-api",
  "prismaUrl": "https://sub.example.com/integration-api",
  "pusherKey": "123bc",
  "pusherRegion": "eu"
}

Authenticate

POST [FUSION_URL]/Platform/LoginAuthToken

The login endpoint which exchanges the sid / auth token for a user object.

Headers

Name
Type
Description

authtoken*

String

The sid / auth token to authenticate the user with

{
    "Data": {
        "JwtToken": "abc123",
        "Authentication": {
            "IsAuthenticated:": true,
            "AuthToken": "abc123"
        },
        "User": {
            "UserId": 123,
            "BrandId": 123,
            "IsTestUser": false,
            "Firstname": "Darth",
            "Lastname": "Vader"
        }
    },
    "Success": true,
    "Errors": null
}

Authenticate against Pusher

GET [FUSION_API]/external/pusher/[brand]?authToken=[sid]

This endpoint is usually consumed by the Front End Pusher Javascript SDK.

Path Parameters

Name
Type
Description

brand*

String

Your "Fast Track Brand Name" given to you by the Integration Manager

Query Parameters

Name
Type
Description

authToken*

String

The sid / auth token to authenticate the user with

{
    "auth":"abc123:abc123"
}

Consuming the data

Get all notifications

GET [FUSION_URL]/Notifications/v2/user-notifications

Lists all notifications for the authenticated user. Use the query string parameters to filter notifications.

The DisplayType can be used to send silent inbox notifications. There is a checkbox in the CRM for silent notifications.

Query Parameters

Name
Type
Description

unread-only*

boolean

Only return unread notifications

Headers

Name
Type
Description

authtoken*

String

sid / auth token for currently logged in user.

{
  "Data": [
    {
      "MessageId": 123,
      "UserId": 123,
      "Event": "message",
      "Title": "Title",
      "Message": "<div>This is message body</div>", // Can contain HTML
      "PreviewText": "Preview text", // Cannot contain HTML
      "FooterText": "<div>This is footer text</div>", // Can contain HTML
      "Data": {}, // Extra fields for your usage
      "CTAButtonLink": "https://www.example.com",
      "CTAButtonText": "Click here!",
      "CTAButton2Link": "https://www.example.com",
      "CTAButton2Text": "Read more!",
      "ImageUrl": "https://www.example.com/image.jpg",
      "IsRead": true,
      "Date": "2019-02-14 13:07:00",
      "Expires": "2019-12-12 12:00:00"
    },
    ...
  ],
  "Success": true,
  "Errors": []
}

Get specific notification

GET [FUSION_URL]/Notifications/v2/user-notification/[id]

Returns a specific notification for the authenticated user. Pass the message id in the url.

Path Parameters

Name
Type
Description

id*

Integer

The id of the message to retrieve

Headers

Name
Type
Description

authtoken*

String

sid / auth token for currently logged in user.

{
  "Data": {
      "MessageId": 123,
      "UserId": 123,
      "Event": "message",
      "Title": "Title",
      "Message": "<div>This is message body</div>", // Can contain HTML
      "PreviewText": "Preview text", // Cannot contain HTML
      "FooterText": "<div>This is footer text</div>", // Can contain HTML
      "Data": {}, // Extra fields for your usage
      "CTAButtonLink": "https://www.example.com",
      "CTAButtonText": "Click here!",
      "CTAButton2Link": "https://www.example.com",
      "CTAButton2Text": "Read more!",
      "ImageUrl": "https://www.example.com/image.jpg",
      "IsRead": true,
      "Date": "2019-02-14 13:07:00",
      "Expires": "2019-12-12 12:00:00"
  },
  "Success": true,
  "Errors": []
}

Delete Rich Inbox Message

DELETE [FUSION_URL]/Notifications/v2/user-notification/[id]

Deletes a Rich Inbox Message for the authenticated user. So that the message is not returned again on API.

Path Parameters

Name
Type
Description

id*

Integer

The id of the message to delete

Headers

Name
Type
Description

authtoken*

String

sid / auth token for currently logged in user.

{
  "Data": null,
  "Success": true,
  "Errors": []
}

Mark a notification as read

POST [FUSION_URL]/Notifications/MarkNotificationAsRead

Marks On Site Notification or Rich Inbox message as read for authenticated user

Headers

Name
Type
Description

authtoken*

String

sid / auth token for currently logged in user.

Request Body

Name
Type
Description

MessageId*

Integer

The id of the message to be marked as read

{
  "Data": true,
  "Success": true,
  "Errors": []
}

Last updated

Was this helpful?