Skip to main content
PUT
/
sources
/
admin
/
{id}
Update Royalty Source (Admin)
curl --request PUT \
  --url https://server26-dot-royalti-project.uc.r.appspot.com/sources/admin/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Spotify UK",
  "label": "Spotify UK",
  "startDate": "2021-01-01",
  "endDate": "2025-12-31",
  "dataQuery": "<string>",
  "fileNameFormat": "<string>",
  "schema": {},
  "delimiter": "<string>",
  "type": "<string>",
  "tableNameFormat": "<string>",
  "format": "<string>",
  "headerRows": 123,
  "public": true
}'
{
  "message": "RoyaltySource updated successfully"
}
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/sources/admin/example-id', {
  method: 'PUT',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "name": "Spotify UK",
    "label": "Spotify UK",
    "startDate": "2021-01-01",
    "endDate": "2025-12-31",
    "dataQuery": "sample-dataQuery",
    "fileNameFormat": "sample-fileNameFormat",
    "schema": {},
    "delimiter": "sample-delimiter",
    "type": "sample-type",
    "tableNameFormat": "sample-tableNameFormat",
    "format": "sample-format",
    "headerRows": 1,
    "public": true
  })
});

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
required

Royalty source ID

Example:

"src-1"

Body

application/json
name
string
Example:

"Spotify UK"

label
string
Example:

"Spotify UK"

startDate
string<date>
Example:

"2021-01-01"

endDate
string<date>
Example:

"2025-12-31"

dataQuery
string | null
fileNameFormat
string | null
schema
object | null
delimiter
string | null
type
string
tableNameFormat
string | null
format
string
headerRows
integer | null
public
boolean

Response

Royalty source updated successfully

message
string
Example:

"RoyaltySource updated successfully"