MFN Integration Guide
  • What is MFN
  • Overview
    • Getting started
    • Integration methods
    • Disclaimer / IPO
    • Caching
    • Checklist after integration
  • Integration methods
    • On-Demand API
    • Synced API
    • MFN Loader
    • IFrame Widget
  • Wordpress Plugin
  • MFN Widgets
    • Report archive
    • Email Subscription Widget
    • Media collection
  • API
    • Feed
    • Model
      • Tags
    • Demo Data
    • WebSub
      • Endpoint
      • Subscribe (optional)
      • Ping Extension (optional)
      • Code samples
      • Misc
    • Archive
    • Email Subscription Guide
Powered by GitBook
On this page
  • Description
  • Method 1: Using the provided news item from the posthook
  • Method 2: Using the posthook as a refresh trigger
  • Integrating the news feed

Was this helpful?

  1. Integration methods

Synced API

PreviousOn-Demand APINextMFN Loader

Last updated 1 year ago

Was this helpful?

Description

By "Synced API" we mean that you can have all news items of the company synced / mirrored locally in your own backend / database. Unlike when fetching the data on-demand, you instead fetch and upsert the news items to your database.

You can achieve this by setting up a , which will do a POST to your web server whenever there's a new news item. The body of the posthook will include the in JSON or XML format, but you can also choose to treat the posthook as an indication there's a new news item, and then use that as a trigger to sync/pull/refresh from our API feed endpoint.

Method 1: Using the provided news item from the posthook

The POST request content will contain the news item in JSON or XML format.

IMPORTANT If you're using the news item in the POSTs body, it is very important that you to make sure that a bad actor cant insert news items into your site, if they find out the post hook URL.

Method 2: Using the posthook as a refresh trigger

Optionally the posthook can just be used as a trigger for when an update to the feed is available. And thus trigger a sync/refresh job on your end. This job should then upsert news-items based on news_id in your system to avoid duplicates.

Integrating the news feed

As with this method consume the data from MFN.se and store it locally, you need to handle the logic for filtering etc. yourself. Our news Model describes the available tags to filter on.

WebSub posthook
verify the HMAC signature
news item