Custom Subscriptions

API for managing Custom Subscription

List Custom Subscriptions

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

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

Path Parameters

{
  "id": 1234,
  "order_id": "sub-12345",
  "source": "custom",
  "user_id": "FF063C1C-C5F3-4749-A7FC-7DCF91B3278F",
  "active": true,
  "start_date": "2018-01-24",
  "end_date": "2018-01-24",
  "created_at": "2018-01-24 10:55:35",
  "reader": {
    "id": 12345,
    "email": "user@magloft.com",
    "custom_data": {
      "gender": "male"
    },
    "confirmed": true
  },
  "status": "updated",
  "password": "pass1234"
}

List Custom Subscriptions Page

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

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

Path Parameters

Query Parameters

{
  "total": 1,
  "page": 1,
  "records": [
    {
      "id": 1234,
      "order_id": "sub-12345",
      "source": "custom",
      "user_id": "FF063C1C-C5F3-4749-A7FC-7DCF91B3278F",
      "active": true,
      "start_date": "2018-01-24",
      "end_date": "2018-01-24",
      "created_at": "2018-01-24 10:55:35",
      "reader": {
        "id": 12345,
        "email": "user@magloft.com",
        "custom_data": {
          "gender": "male"
        },
        "confirmed": true
      },
      "status": "updated",
      "password": "pass1234"
    }
  ]
}

Get Custom Subscription

GET https://www.magloft.com/api/portal/v1/custom_subscriptions/:app_id/(:email)(:id)

This endpoint returns a specific custom subscription by id

Path Parameters

{
  "id": 1234,
  "order_id": "sub-12345",
  "source": "custom",
  "user_id": "FF063C1C-C5F3-4749-A7FC-7DCF91B3278F",
  "active": true,
  "start_date": "2018-01-24",
  "end_date": "2018-01-24",
  "created_at": "2018-01-24 10:55:35",
  "reader": {
    "id": 12345,
    "email": "user@magloft.com",
    "custom_data": {
      "gender": "male"
    },
    "confirmed": true
  },
  "status": "updated",
  "password": "pass1234"
}

Create Custom Subscription

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

This endpoint creates a new custom subscription and returns the saved custom subscription

Path Parameters

Request Body

{
  "id": 1234,
  "order_id": "sub-12345",
  "source": "custom",
  "user_id": "FF063C1C-C5F3-4749-A7FC-7DCF91B3278F",
  "active": true,
  "start_date": "2018-01-24",
  "end_date": "2018-01-24",
  "created_at": "2018-01-24 10:55:35",
  "reader": {
    "id": 12345,
    "email": "user@magloft.com",
    "custom_data": {
      "gender": "male"
    },
    "confirmed": true
  },
  "status": "updated",
  "password": "pass1234"
}

Update Custom Subscription

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

This endpoint updates a specific custom subscription by id and returns the updated custom subscription

Path Parameters

Request Body

{
  "id": 1234,
  "order_id": "sub-12345",
  "source": "custom",
  "user_id": "FF063C1C-C5F3-4749-A7FC-7DCF91B3278F",
  "active": true,
  "start_date": "2018-01-24",
  "end_date": "2018-01-24",
  "created_at": "2018-01-24 10:55:35",
  "reader": {
    "id": 12345,
    "email": "user@magloft.com",
    "custom_data": {
      "gender": "male"
    },
    "confirmed": true
  },
  "status": "updated",
  "password": "pass1234"
}

Delete Custom Subscription

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

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

Path Parameters

null

Export Custom Subscriptions

GET https://www.magloft.com/api/portal/v1/custom_subscriptions/:app_id/export.csv

This endpoint returns a csv document that contains a spreadsheet of all custom subscriptions

Path Parameters

null

Last updated