Articles

API for managing articles

List Articles

GET https://www.magloft.com/api/portal/v1/articles/:app_id

This endpoint returns a list of all articles that belong to the magazine

Path Parameters

Query Parameters

{
  "id": 1234,
  "title": "Welcome to MagLoft",
  "info": null,
  "html": null,
  "assets": null,
  "cover": null,
  "date": null,
  "unlock_type": "free",
  "categories": [
    "Sports",
    "Business",
    "Politics"
  ],
  "category_ids": [
    1,
    2,
    3
  ],
  "publication_id": null,
  "issue_id": null,
  "position": null,
  "visible": true,
  "rss_feed_id": null,
  "source": null
}

Retrieve paginated list of articles

GET https://www.magloft.com/api/portal/v1/articles/:app_id/page/:page

This endpoint returns a page list of all articles that belong to the magazine

Path Parameters

Query Parameters

{
  "total": 1,
  "page": 1,
  "records": [
    {
      "id": 1234,
      "title": "Welcome to MagLoft",
      "info": null,
      "hpub": null,
      "source_file": null,
      "source": "typeloft",
      "unlock_type": "free",
      "hide_locked": false,
      "categories": [
        "Sports",
        "Business",
        "Politics"
      ],
      "category_ids": [
        1,
        2,
        3
      ],
      "classifications": [
        "Sports",
        "Business",
        "Politics"
      ],
      "classification_ids": [
        1,
        2,
        3
      ],
      "product_id": "purchase.issue_123456789",
      "product_id_apple": null,
      "product_id_google": null,
      "product_id_amazon": null,
      "screen_type": "issue",
      "publication_id": null,
      "coupon_code": null,
      "dirty": false,
      "user_id": null,
      "custom_stylesheet": null,
      "custom_data": null,
      "price_tier": null,
      "cover": null,
      "generator": "pdfix"
    }
  ]
}

Get Article

GET https://www.magloft.com/api/portal/v1/articles/:app_id/:id

This endpoint returns a specific article by id

Path Parameters

{
  "id": 1234,
  "title": "Welcome to MagLoft",
  "info": null,
  "html": null,
  "assets": null,
  "cover": null,
  "date": null,
  "unlock_type": "free",
  "categories": [
    "Sports",
    "Business",
    "Politics"
  ],
  "category_ids": [
    1,
    2,
    3
  ],
  "publication_id": null,
  "issue_id": null,
  "position": null,
  "visible": true,
  "rss_feed_id": null,
  "source": null
}

Create an Article

POST https://www.magloft.com/api/portal/v1/articles/:app_id

This endpoint creates a new article and returns the saved article

Path Parameters

Request Body

{
  "id": 1234,
  "title": "Welcome to MagLoft",
  "info": null,
  "html": null,
  "assets": null,
  "cover": null,
  "date": null,
  "unlock_type": "free",
  "categories": [
    "Sports",
    "Business",
    "Politics"
  ],
  "category_ids": [
    1,
    2,
    3
  ],
  "publication_id": null,
  "issue_id": null,
  "position": null,
  "visible": true,
  "rss_feed_id": null,
  "source": null
}

Update an Article

PUT https://www.magloft.com/api/portal/v1/articles/:app_id/:id

This endpoint updates a specific article by id and returns the updated article

Path Parameters

Request Body

{
  "id": 1234,
  "title": "Welcome to MagLoft",
  "info": null,
  "html": null,
  "assets": null,
  "cover": null,
  "date": null,
  "unlock_type": "free",
  "categories": [
    "Sports",
    "Business",
    "Politics"
  ],
  "category_ids": [
    1,
    2,
    3
  ],
  "publication_id": null,
  "issue_id": null,
  "position": null,
  "visible": true,
  "rss_feed_id": null,
  "source": null
}

Delete Article

DELETE https://www.magloft.com/api/portal/v1/articles/:app_id/:id

This endpoint deletes a specific article by id and returns an empty response with status 204

Path Parameters

null

FlexPDF Import

POST https://www.magloft.com/api/portal/v1/articles/:app_id/flexpdf-import

This endpoint creates multiple article and returns

Path Parameters

Request Body

null

Last updated