Skip to content

Commit

Permalink
Add documentation for rights transfers
Browse files Browse the repository at this point in the history
  • Loading branch information
sohkai committed Feb 17, 2017
1 parent 9dd7fc1 commit 332db55
Showing 1 changed file with 42 additions and 1 deletion.
43 changes: 42 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ PAYLOAD:
"publicKey": "<base58 string>",
"privateKey": "<base58 string>"
},
"sourceRightId": "<ID of an existing Right that allows for the creation of this new Right>"
"sourceRightId": "<ID of an existing Right that allows for the creation of this new Right; must be held by the user specified in `currentHolder`>"
}
RETURNS:
Expand All @@ -296,3 +296,44 @@ RETURNS:
To check if your POST was successful, follow the steps in [registering a
manifestation](#was-my-post-to-manifestations-successful) and use the returned
Right's data instead.


### Transfer a Right

You may only transfer a Right that you are currently holding. RightsAssignment
entities are automatically created for each transfer and may include additional,
arbitrary attributes if a `rightsAssignment` dict is given in the payload.

```
POST /api/v1/rights/transfer
HEADERS {"Content-Type": "application/json"}
PAYLOAD:
{
"rightId": "<ID of an existing Right to transfer; must be held by the user specified in `currentHolder`>",
"rightsAssignment": {
...
},
"currentHolder": {
"publicKey": "<base58 string>",
"privateKey": "<base58 string>"
},
"to": {
"publicKey": "<base58 string>",
"privateKey": "<base58 string>"
}
}
RETURNS:
{
"rightsAssignment": {
"@id": "<currently empty>",
"@type": "RightsTransferAction",
... (provided `rightsAssignment`)
}
}
```

To check if your POST was successful, follow the steps in [registering a
manifestation](#was-my-post-to-manifestations-successful) and use the returned
Right's data instead.

0 comments on commit 332db55

Please sign in to comment.