API docs

Coinsplit API allows to create, edit, update Schemes and Shares by sendight HTTP requests to https://coinsplit.io/api/v1/

  • GET — to get info
  • POST — to create resources
  • PUT — edit all fields at once
  • PATCH — edit one fields
  • OPTIONS — to get API parameters description

Schemes

POST to /api/v1/schemes/ — create scheme

GET to /api/v1/schemes/ — get schemes list

GET to /api/v1/schemes/<id> — get scheme details

PATCH or PUT to /api/v1/schemes/<id> — change scheme

Shares

POST to /api/v1/shares/ — create share

GET to /api/v1/shares/ — get shares list

GET to /api/v1/shares/<id> — get share details

PATCH or PUT to /api/v1/shares/<id> — change share

Authorization

This authentication scheme uses a simple token-based HTTP Authentication. For clients to authenticate, the token key should be included in the Authorization HTTP header. The key should be prefixed by the string literal "Token", with whitespace separating the two strings. For example:

You can generate token in Profile.

Testing

You can test API calls right in the browser. Log in and open API endpoing. These pages allow for easy browsing of resources, as well as forms for submitting data to the resources.

The curl command line tool may be useful for testing token authenticated APIs. For example:

curl -X GET http://localhost:8000/api/v1/schemes/ -H 'Authorization: Token 336249a06639907bb8b96171562e275970e9c6c5'

{
    "count": 2,
    "next": null,
    "previous": null,
    "results": [
        {
            "url": "http://localhost:8000/api/v1/schemes/1/",
            "id": 1,
            "name": "test1",
            "currency": "TBTC",
            "address": "mfYcMrUA2UY39xe8RCuwtTU44Htb5ybL2p",
            "public": false,
            "payout_threshold": "0.00100",
            "pay_service_fee": true
        },
        {
            "url": "http://localhost:8000/api/v1/schemes/2/",
            "id": 2,
            "name": "test2",
            "currency": "TBTC",
            "address": "mgQi1TR5nsqBLa44E4z9ELWt2nPKZd2NnM",
            "public": false,
            "payout_threshold": "0.00100",
            "pay_service_fee": true
        }
    ]
}