NAV Navigation
Go HTTP JavaScript Node.JS Python Ruby

Katalysis Feather v1.0.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

This is the description of the Feather API service. This API is used internally by the Feather plugin, and makes a number of assumption on the identification of objects in the system.

Base URLs:

Terms of service Email: Support License: Apache 2.0

origin

Setting and getting origin and associated meta data.

Find out more

Registration of origin and associated meta data.

Code samples

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://sandbox01.katalysis.io/v1/origin/{origin_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST https://sandbox01.katalysis.io/v1/origin/{origin_id}?signature=string HTTP/1.1
Host: sandbox01.katalysis.io
Content-Type: application/json

var headers = {
  'Content-Type':'application/json'

};

$.ajax({
  url: 'https://sandbox01.katalysis.io/v1/origin/{origin_id}',
  method: 'post',
  data: '?signature=string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "string",
  "terms_accepted": true,
  "editor_email": "string",
  "editor_share": 0
}';
const headers = {
  'Content-Type':'application/json'

};

fetch('https://sandbox01.katalysis.io/v1/origin/{origin_id}?signature=string',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json'
}

r = requests.post('https://sandbox01.katalysis.io/v1/origin/{origin_id}', params={
  'signature': 'string'
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json'
}

result = RestClient.post 'https://sandbox01.katalysis.io/v1/origin/{origin_id}',
  params: {
  'signature' => 'string'
}, headers: headers

p JSON.parse(result)

POST /origin/{origin_id}

Register origin and associated meta data with the Feather backend. The signing uses the Origin private key.

Body parameter

{
  "name": "string",
  "terms_accepted": true,
  "editor_email": "string",
  "editor_share": 0
}

Parameters

Parameter In Type Required Description
origin_id path string true 32 bytes Ethereum Public key of the platform.
signature query string true 32 bytes secp256k1(keccak(message)) signature (Ethereum signature).
body body SaveOrigin true Origin which needs to be saved.

Responses

Status Meaning Description Schema
200 OK Success. None
400 Bad Request Signature parameter missing. None
500 Internal Server Error Signature verification failed. None

content

Operations relative to content

Find out more

Saves or update new content

Code samples

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://sandbox01.katalysis.io/v1/content/{content_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST https://sandbox01.katalysis.io/v1/content/{content_id}?signature=string HTTP/1.1
Host: sandbox01.katalysis.io
Content-Type: application/json

var headers = {
  'Content-Type':'application/json'

};

$.ajax({
  url: 'https://sandbox01.katalysis.io/v1/content/{content_id}',
  method: 'post',
  data: '?signature=string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "id": "string"
}';
const headers = {
  'Content-Type':'application/json'

};

fetch('https://sandbox01.katalysis.io/v1/content/{content_id}?signature=string',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json'
}

r = requests.post('https://sandbox01.katalysis.io/v1/content/{content_id}', params={
  'signature': 'string'
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json'
}

result = RestClient.post 'https://sandbox01.katalysis.io/v1/content/{content_id}',
  params: {
  'signature' => 'string'
}, headers: headers

p JSON.parse(result)

POST /content/{content_id}

Saves or update new content

Body parameter

{
  "id": "string"
}

Parameters

Parameter In Type Required Description
content_id path string true 32 bytes Content Fingerprint.
signature query string true 32 bytes secp256k1(keccak(message)) signature (Ethereum signature).
body body SaveContent false The content to add/update to the Blockchain.

Responses

Status Meaning Description Schema
200 OK Success. None
400 Bad Request Signature parameter missing. None
500 Internal Server Error Signature verification failed. None

Participant request to buy content (pay per article).

Code samples

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://sandbox01.katalysis.io/v1/content/{content_id}/buy", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST https://sandbox01.katalysis.io/v1/content/{content_id}/buy?signature=string HTTP/1.1
Host: sandbox01.katalysis.io
Content-Type: application/json

var headers = {
  'Content-Type':'application/json'

};

$.ajax({
  url: 'https://sandbox01.katalysis.io/v1/content/{content_id}/buy',
  method: 'post',
  data: '?signature=string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "id": "string"
}';
const headers = {
  'Content-Type':'application/json'

};

fetch('https://sandbox01.katalysis.io/v1/content/{content_id}/buy?signature=string',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json'
}

r = requests.post('https://sandbox01.katalysis.io/v1/content/{content_id}/buy', params={
  'signature': 'string'
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json'
}

result = RestClient.post 'https://sandbox01.katalysis.io/v1/content/{content_id}/buy',
  params: {
  'signature' => 'string'
}, headers: headers

p JSON.parse(result)

POST /content/{content_id}/buy

Participant request to buy content (pay per article).

Body parameter

{
  "id": "string"
}

Parameters

Parameter In Type Required Description
content_id path string true 32 bytes Content Fingerprint.
signature query string true 32 bytes secp256k1(keccak(message)) signature (Ethereum signature).
body body BuyContent false Buy content object.

Responses

Status Meaning Description Schema
200 OK Success. None
400 Bad Request Signature parameter missing. None
500 Internal Server Error Signature verification failed. None

Request readable state for content.

Code samples

package main

import (
       "bytes"
       "net/http"
)

func main() {

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://sandbox01.katalysis.io/v1/content/{content_id}/readable", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET https://sandbox01.katalysis.io/v1/content/{content_id}/readable?participant_id=string&signature=string HTTP/1.1
Host: sandbox01.katalysis.io


$.ajax({
  url: 'https://sandbox01.katalysis.io/v1/content/{content_id}/readable',
  method: 'get',
  data: '?participant_id=string&signature=string',

  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

fetch('https://sandbox01.katalysis.io/v1/content/{content_id}/readable?participant_id=string&signature=string',
{
  method: 'GET'

})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests

r = requests.get('https://sandbox01.katalysis.io/v1/content/{content_id}/readable', params={
  'participant_id': 'string',  'signature': 'string'
)

print r.json()

require 'rest-client'
require 'json'

result = RestClient.get 'https://sandbox01.katalysis.io/v1/content/{content_id}/readable',
  params: {
  'participant_id' => 'string',
'signature' => 'string'
}

p JSON.parse(result)

GET /content/{content_id}/readable

Request readable state for content.

Parameters

Parameter In Type Required Description
content_id path string true 32 bytes Content Fingerprint.
participant_id query string true Participant id (32 bytes uiid).
signature query string true 32 bytes secp256k1(keccak(message)) signature (Ethereum signature).

Responses

Status Meaning Description Schema
200 OK Success. None
400 Bad Request Signature parameter missing. None
500 Internal Server Error Signature verification failed. None

subscriptions

Operations relative to subscriptions

Find out more

Get a list of all available subscriptions for this platform.

Code samples

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://sandbox01.katalysis.io/v1/subscriptions", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET https://sandbox01.katalysis.io/v1/subscriptions?origin=string HTTP/1.1
Host: sandbox01.katalysis.io
Accept: application/json

var headers = {
  'Accept':'application/json'

};

$.ajax({
  url: 'https://sandbox01.katalysis.io/v1/subscriptions',
  method: 'get',
  data: '?origin=string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('https://sandbox01.katalysis.io/v1/subscriptions?origin=string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://sandbox01.katalysis.io/v1/subscriptions', params={
  'origin': 'string'
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://sandbox01.katalysis.io/v1/subscriptions',
  params: {
  'origin' => 'string'
}, headers: headers

p JSON.parse(result)

GET /subscriptions

Get a list of all available subscriptions for this platform.

Parameters

Parameter In Type Required Description
origin query string true 32 bytes Ethereum Public key of the platform.

Example responses

200 Response

[
  {
    "name": "string",
    "id": "string",
    "price": {
      "value": 0,
      "unit": "string"
    },
    "duration_type": "string",
    "duration_length": 0
  }
]

Responses

Status Meaning Description Schema
200 OK Successful operation. Inline
400 Bad Request Failed request due to missing origin. None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [SubscriptionTemplate] false none none
» name string(string) false none Name for the subscription template.
» id string(string) false none 32 bytes uuid of the subscription template.
» price Price false none none
»» value integer(int64) false none Value of the Price.
»» unit string(string) false none Unit in which the value is represented.
» duration_type string(string) false none One of the enums returned by the duration call.
» duration_length integer(int32) false none Length of duration (UInt8)

Get a list of supported subscription donations for this platform.

Code samples

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://sandbox01.katalysis.io/v1/subscriptions/durations", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET https://sandbox01.katalysis.io/v1/subscriptions/durations HTTP/1.1
Host: sandbox01.katalysis.io
Accept: application/json

var headers = {
  'Accept':'application/json'

};

$.ajax({
  url: 'https://sandbox01.katalysis.io/v1/subscriptions/durations',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('https://sandbox01.katalysis.io/v1/subscriptions/durations',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://sandbox01.katalysis.io/v1/subscriptions/durations', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://sandbox01.katalysis.io/v1/subscriptions/durations',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /subscriptions/durations

Get a list of supported subscription donations for this platform.

Example responses

200 Response

[
  "string"
]

Responses

Status Meaning Description Schema
200 OK Successful operation. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Duration] false none [Duration as a string.]

Creates or updates a subscription for this platform.

Code samples

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://sandbox01.katalysis.io/v1/subscriptions/{subscription_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST https://sandbox01.katalysis.io/v1/subscriptions/{subscription_id}?signature=string HTTP/1.1
Host: sandbox01.katalysis.io
Content-Type: application/json

var headers = {
  'Content-Type':'application/json'

};

$.ajax({
  url: 'https://sandbox01.katalysis.io/v1/subscriptions/{subscription_id}',
  method: 'post',
  data: '?signature=string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "origin": {
    "name": "string",
    "id": "string"
  },
  "content": {
    "name": "string",
    "id": "string",
    "price": {
      "value": 0,
      "unit": "string"
    },
    "duration_type": "string",
    "duration_length": 0
  },
  "owner": "string"
}';
const headers = {
  'Content-Type':'application/json'

};

fetch('https://sandbox01.katalysis.io/v1/subscriptions/{subscription_id}?signature=string',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json'
}

r = requests.post('https://sandbox01.katalysis.io/v1/subscriptions/{subscription_id}', params={
  'signature': 'string'
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json'
}

result = RestClient.post 'https://sandbox01.katalysis.io/v1/subscriptions/{subscription_id}',
  params: {
  'signature' => 'string'
}, headers: headers

p JSON.parse(result)

POST /subscriptions/{subscription_id}

Creates or updates a subscription for this platform.

Body parameter

{
  "origin": {
    "name": "string",
    "id": "string"
  },
  "content": {
    "name": "string",
    "id": "string",
    "price": {
      "value": 0,
      "unit": "string"
    },
    "duration_type": "string",
    "duration_length": 0
  },
  "owner": "string"
}

Parameters

Parameter In Type Required Description
subscription_id path string true 32 bytes Subscription Template Fingerprint.
signature query string true 32 bytes secp256k1(keccak(message)) signature (Ethereum signature).
body body SaveSubscriptionTemplate false Subscription add/request request body.

Responses

Status Meaning Description Schema
200 OK Successful operation. None
400 Bad Request Failed request, could be missing parameter, wrong subscription id, failed state change. None
500 Internal Server Error Trying to save to an unauthorised origin (either different than advertised or signature not verified). None

Delete a subscription for this platform.

Code samples

package main

import (
       "bytes"
       "net/http"
)

func main() {

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://sandbox01.katalysis.io/v1/subscriptions/{subscription_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE https://sandbox01.katalysis.io/v1/subscriptions/{subscription_id}?signature=string HTTP/1.1
Host: sandbox01.katalysis.io


$.ajax({
  url: 'https://sandbox01.katalysis.io/v1/subscriptions/{subscription_id}',
  method: 'delete',
  data: '?signature=string',

  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

fetch('https://sandbox01.katalysis.io/v1/subscriptions/{subscription_id}?signature=string',
{
  method: 'DELETE'

})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests

r = requests.delete('https://sandbox01.katalysis.io/v1/subscriptions/{subscription_id}', params={
  'signature': 'string'
)

print r.json()

require 'rest-client'
require 'json'

result = RestClient.delete 'https://sandbox01.katalysis.io/v1/subscriptions/{subscription_id}',
  params: {
  'signature' => 'string'
}

p JSON.parse(result)

DELETE /subscriptions/{subscription_id}

Delete a subscription for this platform.

Parameters

Parameter In Type Required Description
subscription_id path string true 32 bytes Subscription Template Fingerprint.
signature query string true 32 bytes secp256k1(keccak(message)) signature (Ethereum signature).

Responses

Status Meaning Description Schema
200 OK Successful operation None
400 Bad Request Failed request, could be missing parameter, wrong subscription id, failed state change. None
500 Internal Server Error Trying to delete from unauthorised origin (either different than advertised or signature not verified). None

Subscribe to the platform

Code samples

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://sandbox01.katalysis.io/v1/subscriptions/{subscription_id}/buy", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST https://sandbox01.katalysis.io/v1/subscriptions/{subscription_id}/buy?signature=string HTTP/1.1
Host: sandbox01.katalysis.io
Content-Type: application/json

var headers = {
  'Content-Type':'application/json'

};

$.ajax({
  url: 'https://sandbox01.katalysis.io/v1/subscriptions/{subscription_id}/buy',
  method: 'post',
  data: '?signature=string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "pubKey": "string",
  "instance": "string",
  "txBuy": {
    "id": "string"
  }
}';
const headers = {
  'Content-Type':'application/json'

};

fetch('https://sandbox01.katalysis.io/v1/subscriptions/{subscription_id}/buy?signature=string',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json'
}

r = requests.post('https://sandbox01.katalysis.io/v1/subscriptions/{subscription_id}/buy', params={
  'signature': 'string'
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json'
}

result = RestClient.post 'https://sandbox01.katalysis.io/v1/subscriptions/{subscription_id}/buy',
  params: {
  'signature' => 'string'
}, headers: headers

p JSON.parse(result)

POST /subscriptions/{subscription_id}/buy

Subscribe to the platform

Body parameter

{
  "pubKey": "string",
  "instance": "string",
  "txBuy": {
    "id": "string"
  }
}

Parameters

Parameter In Type Required Description
subscription_id path string true 32 bytes Subscription Template Fingerprint.
signature query string true 32 bytes secp256k1(keccak(message)) signature (Ethereum signature).
body body BuySubscription false Subscription buy request body.

Responses

Status Meaning Description Schema
200 OK Successful operation None
400 Bad Request Failed request, could be missing parameter, wrong subscription id, failed state change. None

Code samples

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://sandbox01.katalysis.io/v1/subscriptions/{content_id}/has", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET https://sandbox01.katalysis.io/v1/subscriptions/{content_id}/has?participant_id=string HTTP/1.1
Host: sandbox01.katalysis.io
Accept: application/json

var headers = {
  'Accept':'application/json'

};

$.ajax({
  url: 'https://sandbox01.katalysis.io/v1/subscriptions/{content_id}/has',
  method: 'get',
  data: '?participant_id=string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('https://sandbox01.katalysis.io/v1/subscriptions/{content_id}/has?participant_id=string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://sandbox01.katalysis.io/v1/subscriptions/{content_id}/has', params={
  'participant_id': 'string'
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://sandbox01.katalysis.io/v1/subscriptions/{content_id}/has',
  params: {
  'participant_id' => 'string'
}, headers: headers

p JSON.parse(result)

GET /subscriptions/{content_id}/has

Donate a specific amount to the registered platform

Parameter In Type Required Description
content_id path string true 32 bytes Content Fingerprint.
participant_id query string true Participant id (32 bytes uiid).

Example responses

200 Response

[
  {
    "active": true,
    "until": "2019-04-13T10:33:58Z"
  }
]
Status Meaning Description Schema
200 OK Successful operation Inline
400 Bad Request Failed request, could be missing parameter, or inability to resolve content signature None

Status Code 200

Name Type Required Restrictions Description
anonymous [HasSubscription] false none none
» active boolean(boolean) false none Whether there is a an active subscription or not.
» until string(date-time) false none End date of the last active subscription (can be in the past), or 01-01-1970 if there are no subscriptions found.

donations

Operations relative to donations

Find out more

Code samples

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://sandbox01.katalysis.io/v1/origin/{origin_id}/donate", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST https://sandbox01.katalysis.io/v1/origin/{origin_id}/donate?signature=string HTTP/1.1
Host: sandbox01.katalysis.io
Content-Type: application/json

var headers = {
  'Content-Type':'application/json'

};

$.ajax({
  url: 'https://sandbox01.katalysis.io/v1/origin/{origin_id}/donate',
  method: 'post',
  data: '?signature=string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "amount": {
    "value": 0,
    "unit": "string"
  },
  "instance": "string",
  "tx": {
    "id": "string"
  }
}';
const headers = {
  'Content-Type':'application/json'

};

fetch('https://sandbox01.katalysis.io/v1/origin/{origin_id}/donate?signature=string',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json'
}

r = requests.post('https://sandbox01.katalysis.io/v1/origin/{origin_id}/donate', params={
  'signature': 'string'
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json'
}

result = RestClient.post 'https://sandbox01.katalysis.io/v1/origin/{origin_id}/donate',
  params: {
  'signature' => 'string'
}, headers: headers

p JSON.parse(result)

POST /origin/{origin_id}/donate

Donate a specific amount to the registered platform.

Body parameter

{
  "amount": {
    "value": 0,
    "unit": "string"
  },
  "instance": "string",
  "tx": {
    "id": "string"
  }
}
Parameter In Type Required Description
origin_id path string true 32 bytes Ethereum Public key of the platform.
signature query string true 32 bytes secp256k1(keccak(message)) signature (Ethereum signature).
body body Donation true Donation object.
Status Meaning Description Schema
200 OK Success. None
400 Bad Request Signature parameter missing. None
500 Internal Server Error Signature verification failed. None

Code samples

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://sandbox01.katalysis.io/v1/content/{content_id}/donate", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST https://sandbox01.katalysis.io/v1/content/{content_id}/donate?signature=string HTTP/1.1
Host: sandbox01.katalysis.io
Content-Type: application/json

var headers = {
  'Content-Type':'application/json'

};

$.ajax({
  url: 'https://sandbox01.katalysis.io/v1/content/{content_id}/donate',
  method: 'post',
  data: '?signature=string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "amount": {
    "value": 0,
    "unit": "string"
  },
  "instance": "string",
  "tx": {
    "id": "string"
  }
}';
const headers = {
  'Content-Type':'application/json'

};

fetch('https://sandbox01.katalysis.io/v1/content/{content_id}/donate?signature=string',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json'
}

r = requests.post('https://sandbox01.katalysis.io/v1/content/{content_id}/donate', params={
  'signature': 'string'
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json'
}

result = RestClient.post 'https://sandbox01.katalysis.io/v1/content/{content_id}/donate',
  params: {
  'signature' => 'string'
}, headers: headers

p JSON.parse(result)

POST /content/{content_id}/donate

Multiple status values can be provided with comma separated strings

Body parameter

{
  "amount": {
    "value": 0,
    "unit": "string"
  },
  "instance": "string",
  "tx": {
    "id": "string"
  }
}
Parameter In Type Required Description
content_id path string true 32 bytes Content Fingerprint.
signature query string true 32 bytes secp256k1(keccak(message)) signature (Ethereum signature).
body body Donation true Donation object.
Status Meaning Description Schema
200 OK Success. None
400 Bad Request Signature parameter missing. None
500 Internal Server Error Signature verification failed. None

Schemas

Origin

{
  "name": "string",
  "id": "string"
}

Properties

Name Type Required Restrictions Description
name string(string) false none Name of the platform
id string(string) false none 32 bytes public key of the origin platform.

Price

{
  "value": 0,
  "unit": "string"
}

Properties

Name Type Required Restrictions Description
value integer(int64) false none Value of the Price.
unit string(string) false none Unit in which the value is represented.

Duration

"string"

Duration as a string.

Properties

Name Type Required Restrictions Description
anonymous string(string) false none Duration as a string.

SaveOrigin

{
  "name": "string",
  "terms_accepted": true,
  "editor_email": "string",
  "editor_share": 0
}

Properties

Name Type Required Restrictions Description
name string(string) false none Url of the platform.
terms_accepted boolean(boolean) false none Terms accepted.
editor_email string(string) false none Email of the platform owner.
editor_share integer(int32) false none Percentage (in percent) of the proceeds going to the editor.

HasSubscription

{
  "active": true,
  "until": "2019-04-13T10:33:58Z"
}

Properties

Name Type Required Restrictions Description
active boolean(boolean) false none Whether there is a an active subscription or not.
until string(date-time) false none End date of the last active subscription (can be in the past), or 01-01-1970 if there are no subscriptions found.

BuySubscription

{
  "pubKey": "string",
  "instance": "string",
  "txBuy": {
    "id": "string"
  }
}

Properties

Name Type Required Restrictions Description
pubKey string(binary) false none 32 bytes string representing the Public Key of the buying participant.
instance string(string) false none 32 bytes uuid for the subscription instance being bought (and part of the embedded blockchain transaction).
txBuy BuyTx false none BC raw (and signed) buy transaction

SaveSubscriptionTemplate

{
  "origin": {
    "name": "string",
    "id": "string"
  },
  "content": {
    "name": "string",
    "id": "string",
    "price": {
      "value": 0,
      "unit": "string"
    },
    "duration_type": "string",
    "duration_length": 0
  },
  "owner": "string"
}

Properties

Name Type Required Restrictions Description
origin Origin false none none
content SubscriptionTemplate false none none
owner string(string) false none Email of owner of subscription template.

SubscriptionTemplate

{
  "name": "string",
  "id": "string",
  "price": {
    "value": 0,
    "unit": "string"
  },
  "duration_type": "string",
  "duration_length": 0
}

Properties

Name Type Required Restrictions Description
name string(string) false none Name for the subscription template.
id string(string) false none 32 bytes uuid of the subscription template.
price Price false none none
duration_type string(string) false none One of the enums returned by the duration call.
duration_length integer(int32) false none Length of duration (UInt8)

Donation

{
  "amount": {
    "value": 0,
    "unit": "string"
  },
  "instance": "string",
  "tx": {
    "id": "string"
  }
}

Donation request object.

Properties

Name Type Required Restrictions Description
amount Price false none none
instance string(string) false none 32 bytes uuid for the subscription instance being bought (and part of the embedded blockchain transaction).
tx BuyTx false none BC raw (and signed) buy transaction

BuyTx

{
  "id": "string"
}

BC raw (and signed) buy transaction

Properties

Name Type Required Restrictions Description
id string(string) false none to change

SaveContent

{
  "id": "string"
}

Save/Update content on blockchain.

Properties

Name Type Required Restrictions Description
id string(string) false none to change

BuyContent

{
  "id": "string"
}

Buy content.

Properties

Name Type Required Restrictions Description
id string(string) false none to change

Data Model

Origin

An origin is the unique identifier for a system registering content. Each content has a unique origin. An origin has a private key, which it uses to sign messages sent to the Feather API server when creating or updating content. Registering an origin requires to provide the email address of the editor (=owner) of the platform. That email address will be associated to a participant account.

Participant

Content

Content needs to be registered on the system through the Feather API. Registration of content is done from the platform and requires signing of the registration request with the origin private key.

Upon registering content, one will provide a price, a list of participants who have contributed to the content and their respective share.

In the current Feather Wordpress plugin implementation, the list of participants is composed of the author of the post as well as the editor of the origin.

Subscription Template

A Subscription Template defines a template for subscriptions. It is tied to an origin. When a participant purchases a subscription template, the amount (minus the donation transaction fee) will be transfered to the participant registered as editor of the origin.

Donation

Donations are currently done at the origin level. That means that donating will route the donated amount (minus the donation transaction fee) to the participant registered as editor of the origin.

Price

A price is a value and a unit.

Authentication and Security

Authentication is performed by verifying the possession of a private Key when . The {public/private} key scheme used for all signing of messages is that use by Ethereum (secp256k1)