Skip to main content
PUT
/
merlin
/
import
/
config
Update import configuration
curl --request PUT \
  --url https://api.royalti.io/merlin/import/config \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "autoImportEnabled": true,
  "importSchedule": "0 6 * * *",
  "importPath": "<string>",
  "autoApproveHighConfidence": true,
  "confidenceThreshold": 123,
  "scheduleTime": "<string>",
  "timezone": "<string>",
  "dayOfWeek": 123,
  "dayOfMonth": 123,
  "blackoutWindows": [
    {}
  ]
}
'
import requests

url = "https://api.royalti.io/merlin/import/config"

payload = {
"autoImportEnabled": True,
"importSchedule": "0 6 * * *",
"importPath": "<string>",
"autoApproveHighConfidence": True,
"confidenceThreshold": 123,
"scheduleTime": "<string>",
"timezone": "<string>",
"dayOfWeek": 123,
"dayOfMonth": 123,
"blackoutWindows": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
autoImportEnabled: true,
importSchedule: '0 6 * * *',
importPath: '<string>',
autoApproveHighConfidence: true,
confidenceThreshold: 123,
scheduleTime: '<string>',
timezone: '<string>',
dayOfWeek: 123,
dayOfMonth: 123,
blackoutWindows: [{}]
})
};

fetch('https://api.royalti.io/merlin/import/config', 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/merlin/import/config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'autoImportEnabled' => true,
'importSchedule' => '0 6 * * *',
'importPath' => '<string>',
'autoApproveHighConfidence' => true,
'confidenceThreshold' => 123,
'scheduleTime' => '<string>',
'timezone' => '<string>',
'dayOfWeek' => 123,
'dayOfMonth' => 123,
'blackoutWindows' => [
[

]
]
]),
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/merlin/import/config"

payload := strings.NewReader("{\n \"autoImportEnabled\": true,\n \"importSchedule\": \"0 6 * * *\",\n \"importPath\": \"<string>\",\n \"autoApproveHighConfidence\": true,\n \"confidenceThreshold\": 123,\n \"scheduleTime\": \"<string>\",\n \"timezone\": \"<string>\",\n \"dayOfWeek\": 123,\n \"dayOfMonth\": 123,\n \"blackoutWindows\": [\n {}\n ]\n}")

req, _ := http.NewRequest("PUT", 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.put("https://api.royalti.io/merlin/import/config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"autoImportEnabled\": true,\n \"importSchedule\": \"0 6 * * *\",\n \"importPath\": \"<string>\",\n \"autoApproveHighConfidence\": true,\n \"confidenceThreshold\": 123,\n \"scheduleTime\": \"<string>\",\n \"timezone\": \"<string>\",\n \"dayOfWeek\": 123,\n \"dayOfMonth\": 123,\n \"blackoutWindows\": [\n {}\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.royalti.io/merlin/import/config")

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

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"autoImportEnabled\": true,\n \"importSchedule\": \"0 6 * * *\",\n \"importPath\": \"<string>\",\n \"autoApproveHighConfidence\": true,\n \"confidenceThreshold\": 123,\n \"scheduleTime\": \"<string>\",\n \"timezone\": \"<string>\",\n \"dayOfWeek\": 123,\n \"dayOfMonth\": 123,\n \"blackoutWindows\": [\n {}\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "data": {
    "autoImportEnabled": true,
    "importSchedule": "0 6 * * *",
    "importPath": "/royalties",
    "royaltySourceId": 123,
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "royaltySourceName": "<string>",
    "autoApproveHighConfidence": false,
    "confidenceThreshold": 0.75,
    "scheduleTime": "06:00",
    "timezone": "America/New_York",
    "dayOfWeek": 3,
    "dayOfMonth": 16,
    "blackoutWindows": [
      {
        "startTime": "<string>",
        "endTime": "<string>"
      }
    ],
    "lastImportAt": "2023-11-07T05:31:56Z",
    "nextScheduledImport": "2023-11-07T05:31:56Z",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}
{
"status": "error",
"message": "Invalid request parameters"
}
{
"status": "error",
"message": "Unauthorized"
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Code Examples

const response = await fetch('https://api.royalti.io/merlin/import/config', {
  method: 'PUT',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "autoImportEnabled": true,
    "importSchedule": "0 6 * * *",
    "importPath": "sample-importPath",
    "autoApproveHighConfidence": true,
    "confidenceThreshold": 1,
    "scheduleType": "sample-scheduleType",
    "scheduleTime": "sample-scheduleTime",
    "timezone": "sample-timezone",
    "dayOfWeek": 1,
    "dayOfMonth": 1,
    "blackoutWindows": [
      {}
    ]
  })
});

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

response = requests.put(
  'https://api.royalti.io/merlin/import/config',
  headers={
    'Authorization': f'Bearer {token}'
  },
  json={"autoImportEnabled":true,"importSchedule":"0 6 * * *","importPath":"sample-importPath","autoApproveHighConfidence":true,"confidenceThreshold":1,"scheduleType":"sample-scheduleType","scheduleTime":"sample-scheduleTime","timezone":"sample-timezone","dayOfWeek":1,"dayOfMonth":1,"blackoutWindows":[{}]}
)

data = response.json()
print(data)
curl -X PUT https://api.royalti.io/merlin/import/config \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"autoImportEnabled":true,"importSchedule":"0 6 * * *","importPath":"sample-importPath","autoApproveHighConfidence":true,"confidenceThreshold":1,"scheduleType":"sample-scheduleType","scheduleTime":"sample-scheduleTime","timezone":"sample-timezone","dayOfWeek":1,"dayOfMonth":1,"blackoutWindows":[{}]}'

Authorizations

Authorization
string
header
required

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

Body

application/json
autoImportEnabled
boolean
importSchedule
string
Example:

"0 6 * * *"

importPath
string
autoApproveHighConfidence
boolean
confidenceThreshold
number<float>
scheduleType
enum<string>
Available options:
daily,
weekly,
monthly,
custom
scheduleTime
string
timezone
string
dayOfWeek
integer
dayOfMonth
integer
blackoutWindows
object[]

Response

Configuration updated successfully

success
boolean
data
object