Skip to main content
PUT
/
asset
/
{id}
/
setdefaultsplit
Set default split for an asset
curl --request PUT \
  --url https://server26-dot-royalti-project.uc.r.appspot.com/asset/{id}/setdefaultsplit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "share": 50
}'
{
  "success": true,
  "message": "<string>",
  "data": {}
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Code Examples

const response = await fetch('https://server26-dot-royalti-project.uc.r.appspot.com/asset/example-id/setdefaultsplit', {
  method: 'PUT',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "userId": "sample-userId",
    "share": 1
  })
});

const data = await response.json();
console.log(data);

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Path Parameters

id
string<uuid>
required

Asset ID

Body

application/json
userId
string<uuid>
share
number
Required range: 0 <= x <= 100

Response

Default split set successfully

success
boolean
Example:

true

message
string
data
object