Skip to main content
GET
/
writer
/
writers
List writers
curl --request GET \
  --url https://api.royalti.io/writer/writers \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.royalti.io/writer/writers"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.royalti.io/writer/writers', 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/writer/writers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.royalti.io/writer/writers"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.royalti.io/writer/writers")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.royalti.io/writer/writers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "totalItems": 123,
  "Writers": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "tenantId": 123,
      "firstName": "<string>",
      "lastName": "<string>",
      "ipiNameNumber": "<string>",
      "ipiBaseNumber": "<string>",
      "affiliatedPRO": "<string>",
      "mrSociety": "<string>",
      "srSociety": "<string>",
      "generallyControlled": false,
      "canBeControlled": false,
      "publisherFee": 50,
      "saan": "<string>",
      "territories": [
        {
          "territoryCode": "WW",
          "prShare": 50,
          "mrShare": 50,
          "srShare": 50,
          "startDate": "2023-11-07T05:31:56Z",
          "endDate": "2023-11-07T05:31:56Z"
        }
      ],
      "settings": {},
      "tenantUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "userData": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "firstName": "<string>",
        "lastName": "<string>",
        "email": "jsmith@example.com",
        "ipi": "<string>"
      },
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "totalPages": 123,
  "currentPage": 123,
  "filteredItems": 123
}
{
"status": "error",
"message": "<string>",
"code": "<string>",
"details": {}
}
{
"status": "error",
"message": "<string>",
"code": "<string>",
"details": {}
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

GET /writer/writers Description: Server-side searchable, filterable, paginated writer listing (H-02). search (alias q) does an ILIKE match across firstName, lastName, and ipiNameNumber. Each writer includes its linked userData (TenantUser) when tenantUserId is set. Ordered by lastName, firstName ascending. Supports the generic ?export=csv query param (exportMiddleware) to stream the result set as a CSV attachment instead of JSON. Authorization:
  • Required role: user or higher
Method: GET

Code Examples

const response = await fetch('https://api.royalti.io/writer/writers', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${token}`,
  },
});

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

response = requests.get(
  'https://api.royalti.io/writer/writers',
  headers={
    'Authorization': f'Bearer {token}'
  },
)

data = response.json()
print(data)
curl -X GET https://api.royalti.io/writer/writers \
  -H "Authorization: Bearer YOUR_TOKEN" \

Authorizations

Authorization
string
header
required

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

Query Parameters

page
integer

1-indexed page number. Defaults to 1.

size
integer

Page size. Defaults to 20, capped at 100.

ILIKE search across firstName / lastName / ipiNameNumber. Alias q also accepted.

q
string

Alias for search.

affiliatedPRO
string

Exact-match facet filter.

writerRole
string

Exact-match facet filter.

export
enum<string>

When set to csv, streams a CSV attachment instead of the JSON envelope.

Available options:
csv

Response

Writers retrieved

Paginated envelope (H-02). Always returned in this shape — never a bare array.

totalItems
integer
Writers
object[]
totalPages
integer
currentPage
integer
filteredItems
integer

Row count on the current page.