Flattr Developer Platform

Subscriptions

List subscriptions

Scope required: flattr

Request
GET https://api.flattr.com/rest/v2/user/subscriptions
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Current: 1
X-RateLimit-Reset: 1342521939
[
  {
    "type": "subscription",
    "active": true,
    "created_at": 1350654024,
    "started_at": 1351164964,
    "thing": {
      "type": "thing",
      "resource": "https://api.flattr.com/rest/v2/things/423405",
      "link": "https://flattr.com/thing/423405",
      "id": 423405,
      "url": "http://blog.flattr.net/2011/10/api-v2-beta-out-whats-changed/",
      "language": "en_GB",
      "category": "text",
      "owner": {
        "type": "user",
        "resource": "https://api.flattr.com/rest/v2/users/flattr",
        "link": "https://flattr.com/profile/flattr",
        "id": "3bpQBK",
        "username": "flattr"
      },
      "hidden": false,
      "image": "http://flattr.com/thing/image/4/2/3/4/0/5/medium.png",
      "created_at": 1319704532,
      "tags": [
        "api"
      ],
      "flattrs": 8,
      "description": "We have been working hard to deliver a great experience for developers and tried to build a good foundation for easily add new features. The API will remain in beta for a while for us to kill quirks and refine some of the resources, this means there might be big changes without notice for ...",
      "title": "API v2 beta out - what's changed?",
      "flattred": false,
      "subscribed": true
    }
  }
]

Create a new subscription

Scope required: flattr

Request
POST https://api.flattr.com/rest/v2/things/:id/subscriptions
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Current: 1
X-RateLimit-Reset: 1342521939
{
  "message": "ok",
  "description": "Successfully subscribed to Thing",
  "thing": {
    "type": "thing",
    "resource": "https://api.flattr.com/rest/v2/things/423405",
    "link": "https://flattr.com/thing/423405",
    "id": 423405,
    "flattrs": 3,
    "url": "http://blog.flattr.net/2011/10/api-v2-beta-out-whats-changed/",
    "title": "API v2 beta out - what's changed?",
    "image": "https://flattr.com/thing/image/4/2/3/4/0/5/medium.png"
  }
}
Errors

Pause and start subscriptions

Scope required: flattr

Request
PUT https://api.flattr.com/rest/v2/things/:id/subscriptions
Example response when started
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Current: 1
X-RateLimit-Reset: 1342521939
{
  "message": "started",
  "description": "Subscription started"
}
Example response when paused
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Current: 1
X-RateLimit-Reset: 1342521939
{
  "message": "paused",
  "description": "Subscription paused"
}
Errors

Delete a subscription

Scope required: flattr

Request
DELETE https://api.flattr.com/rest/v2/things/:id/subscriptions
Example response
HTTP/1.1 204 No Content
Content-Type: application/json;charset=utf-8
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Current: 1
X-RateLimit-Reset: 1342521939


Errors
Visit Flattr.com to learn more about Flattr.