App Pages

API for managing In-App Pages

List App Pages

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

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

Path Parameters

{
  "id": 1234,
  "name": "Welcome Letter",
  "title": "Welcome to MagLoft",
  "icon": "trophy",
  "trigger": "on_launch",
  "action": "subscribe",
  "visibility": [
    "web",
    "ios",
    "android"
  ],
  "created_at": "2018-01-24 10:55:35",
  "updated_at": "2018-01-24 10:55:35",
  "published": true,
  "html": "<p>Hello World</p>"
}

Retrieve paginated list of readers

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

This endpoint returns a page list of app pages that belong to the magazine

Path Parameters

Query Parameters

{
  "total": 1,
  "page": 1,
  "records": [
    {
      "id": 1234,
      "name": "Welcome Letter",
      "title": "Welcome to MagLoft",
      "icon": "trophy",
      "trigger": "on_launch",
      "action": "subscribe",
      "visibility": [
        "web",
        "ios",
        "android"
      ],
      "created_at": "2018-01-24 10:55:35",
      "updated_at": "2018-01-24 10:55:35",
      "published": true,
      "html": "<p>Hello World</p>"
    }
  ]
}

Get App Page

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

This endpoint returns a specific app page by id

Path Parameters

{
  "id": 1234,
  "name": "Welcome Letter",
  "title": "Welcome to MagLoft",
  "icon": "trophy",
  "trigger": "on_launch",
  "action": "subscribe",
  "visibility": [
    "web",
    "ios",
    "android"
  ],
  "created_at": "2018-01-24 10:55:35",
  "updated_at": "2018-01-24 10:55:35",
  "published": true,
  "html": "<p>Hello World</p>"
}

Create App Page

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

This endpoint creates a new app page and returns the saved app page

Path Parameters

Request Body

{
  "id": 1234,
  "name": "Welcome Letter",
  "title": "Welcome to MagLoft",
  "icon": "trophy",
  "trigger": "on_launch",
  "action": "subscribe",
  "visibility": [
    "web",
    "ios",
    "android"
  ],
  "created_at": "2018-01-24 10:55:35",
  "updated_at": "2018-01-24 10:55:35",
  "published": true,
  "html": "<p>Hello World</p>"
}

Update App Page

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

This endpoint updates a specific app page by id and returns the updated app page

Path Parameters

Request Body

{
  "id": 1234,
  "name": "Welcome Letter",
  "title": "Welcome to MagLoft",
  "icon": "trophy",
  "trigger": "on_launch",
  "action": "subscribe",
  "visibility": [
    "web",
    "ios",
    "android"
  ],
  "created_at": "2018-01-24 10:55:35",
  "updated_at": "2018-01-24 10:55:35",
  "published": true,
  "html": "<p>Hello World</p>"
}

Delete App Page

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

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

Path Parameters

null

Last updated