Update a report's narrative overrides
curl --request PATCH \
--url https://api.royalti.io/reports/{id}/narrative \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"terminology": {},
"sourceAliasText": "<string>",
"sectionToggles": {},
"blocks": [
{
"anchor": "<string>",
"body": "<string>",
"title": "<string>"
}
]
}
'import requests
url = "https://api.royalti.io/reports/{id}/narrative"
payload = {
"terminology": {},
"sourceAliasText": "<string>",
"sectionToggles": {},
"blocks": [
{
"anchor": "<string>",
"body": "<string>",
"title": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
terminology: {},
sourceAliasText: '<string>',
sectionToggles: {},
blocks: [{anchor: '<string>', body: JSON.stringify('<string>'), title: '<string>'}]
})
};
fetch('https://api.royalti.io/reports/{id}/narrative', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.royalti.io/reports/{id}/narrative",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'terminology' => [
],
'sourceAliasText' => '<string>',
'sectionToggles' => [
],
'blocks' => [
[
'anchor' => '<string>',
'body' => '<string>',
'title' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.royalti.io/reports/{id}/narrative"
payload := strings.NewReader("{\n \"terminology\": {},\n \"sourceAliasText\": \"<string>\",\n \"sectionToggles\": {},\n \"blocks\": [\n {\n \"anchor\": \"<string>\",\n \"body\": \"<string>\",\n \"title\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.royalti.io/reports/{id}/narrative")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"terminology\": {},\n \"sourceAliasText\": \"<string>\",\n \"sectionToggles\": {},\n \"blocks\": [\n {\n \"anchor\": \"<string>\",\n \"body\": \"<string>\",\n \"title\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/reports/{id}/narrative")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"terminology\": {},\n \"sourceAliasText\": \"<string>\",\n \"sectionToggles\": {},\n \"blocks\": [\n {\n \"anchor\": \"<string>\",\n \"body\": \"<string>\",\n \"title\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "<string>",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"TenantId": 123,
"TenantUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "earnings_audit",
"periodStart": "2023-11-07T05:31:56Z",
"periodEnd": "2023-11-07T05:31:56Z",
"status": "draft",
"version": 123,
"dataSnapshot": {},
"dataHash": "<string>",
"narrative": {
"terminology": {},
"sourceDisclosure": "named",
"sourceAliasText": "<string>",
"sectionToggles": {},
"blocks": [
{
"anchor": "<string>",
"body": "<string>",
"title": "<string>"
}
]
},
"finalizedAt": "2023-11-07T05:31:56Z",
"finalizedByUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdByUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"status": "error",
"message": "Unauthorized"
}{
"status": "error",
"message": "Resource not found"
}Reports
Update a report's narrative overrides
Update report narrative
PATCH
/
reports
/
{id}
/
narrative
Update a report's narrative overrides
curl --request PATCH \
--url https://api.royalti.io/reports/{id}/narrative \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"terminology": {},
"sourceAliasText": "<string>",
"sectionToggles": {},
"blocks": [
{
"anchor": "<string>",
"body": "<string>",
"title": "<string>"
}
]
}
'import requests
url = "https://api.royalti.io/reports/{id}/narrative"
payload = {
"terminology": {},
"sourceAliasText": "<string>",
"sectionToggles": {},
"blocks": [
{
"anchor": "<string>",
"body": "<string>",
"title": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
terminology: {},
sourceAliasText: '<string>',
sectionToggles: {},
blocks: [{anchor: '<string>', body: JSON.stringify('<string>'), title: '<string>'}]
})
};
fetch('https://api.royalti.io/reports/{id}/narrative', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.royalti.io/reports/{id}/narrative",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'terminology' => [
],
'sourceAliasText' => '<string>',
'sectionToggles' => [
],
'blocks' => [
[
'anchor' => '<string>',
'body' => '<string>',
'title' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.royalti.io/reports/{id}/narrative"
payload := strings.NewReader("{\n \"terminology\": {},\n \"sourceAliasText\": \"<string>\",\n \"sectionToggles\": {},\n \"blocks\": [\n {\n \"anchor\": \"<string>\",\n \"body\": \"<string>\",\n \"title\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.royalti.io/reports/{id}/narrative")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"terminology\": {},\n \"sourceAliasText\": \"<string>\",\n \"sectionToggles\": {},\n \"blocks\": [\n {\n \"anchor\": \"<string>\",\n \"body\": \"<string>\",\n \"title\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/reports/{id}/narrative")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"terminology\": {},\n \"sourceAliasText\": \"<string>\",\n \"sectionToggles\": {},\n \"blocks\": [\n {\n \"anchor\": \"<string>\",\n \"body\": \"<string>\",\n \"title\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "<string>",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"TenantId": 123,
"TenantUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "earnings_audit",
"periodStart": "2023-11-07T05:31:56Z",
"periodEnd": "2023-11-07T05:31:56Z",
"status": "draft",
"version": 123,
"dataSnapshot": {},
"dataHash": "<string>",
"narrative": {
"terminology": {},
"sourceDisclosure": "named",
"sourceAliasText": "<string>",
"sectionToggles": {},
"blocks": [
{
"anchor": "<string>",
"body": "<string>",
"title": "<string>"
}
]
},
"finalizedAt": "2023-11-07T05:31:56Z",
"finalizedByUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdByUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"status": "error",
"message": "Unauthorized"
}{
"status": "error",
"message": "Resource not found"
}Description
Update report narrative Draft-only. Validates the patch and shallow-merges it into the report’s storednarrative overrides — existing entries not named in
the patch survive (blocks is whole-array replace-on-provided).
Rejected with 409 Conflict once the report is finalized.
Authorization:
- Required role:
adminor higher
Code Examples
const response = await fetch('https://api.royalti.io/reports/example-id/narrative', {
method: 'PATCH',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
"ref": "#/components/schemas/ReportNarrativeOverrides"
})
});
const data = await response.json();
console.log(data);
import requests
response = requests.patch(
'https://api.royalti.io/reports/example-id/narrative',
json={"ref":"#/components/schemas/ReportNarrativeOverrides"}
)
data = response.json()
print(data)
curl -X PATCH https://api.royalti.io/reports/example-id/narrative \
-H "Content-Type: application/json" \
-d '{"ref":"#/components/schemas/ReportNarrativeOverrides"}'
Authorizations
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Path Parameters
Body
application/json
Reports.narrative — one report's overrides on top of the tenant's
reporting defaults. A PATCH shallow-merges terminology and
sectionToggles key-by-key (existing entries not named in the patch
survive); blocks is whole-array replace-on-provided; scalars
overwrite when provided.
Keyed by the raw source label being relabeled.
Show child attributes
Show child attributes
Available options:
named, alias, omit Display text used when sourceDisclosure is alias.
Maximum string length:
120Boolean per section key: summary, monthly, byRelease, byTrack, byDSP, byTerritory, bySaleType, payments, reconciliation. Unset keys default to visible.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I