Skip to main content
POST
/
defaultsettings
/
preview
/
asset
Preview Asset Defaults
curl --request POST \
  --url https://api.royalti.io/defaultsettings/preview/asset \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "artistId": "660e8400-e29b-41d4-a716-446655440001",
  "assetData": {
    "assetName": "New Track",
    "duration": 180
  }
}'
{
  "success": true,
  "message": "Asset preview generated successfully",
  "data": {
    "original": {},
    "withDefaults": {},
    "appliedDefaults": [
      {
        "field": "<string>",
        "value": "<any>",
        "source": {
          "entityType": "<string>",
          "entityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "category": "<string>"
        }
      }
    ]
  }
}

Description

POST /defaultsettings/preview/asset Description: Preview how defaults will be applied to an asset, showing original data, data with defaults, and which defaults were applied from which sources. Method: POST Request Body:
ParameterTypeDescriptionRequired
labelIduuidLabel contextNo
artistIduuidArtist contextNo
userIduuidUser contextNo
assetDataobjectPartial asset data to testNo

Code Examples

const response = await fetch('https://api.royalti.io/defaultsettings/preview/asset', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "labelId": "sample-labelId",
    "artistId": "sample-artistId",
    "userId": "sample-userId",
    "assetData": {}
  })
});

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

Authorizations

Authorization
string
header
required

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

Body

application/json
labelId
string<uuid>
artistId
string<uuid>
userId
string<uuid>
assetData
object

Partial asset data to merge with defaults

Response

Asset preview generated successfully

success
boolean
Example:

true

message
string
Example:

"Asset preview generated successfully"

data
object

Preview of how defaults would be applied