Bulk delete catalog splits
curl --request DELETE \
--url https://api.royalti.io/split/bulk/catalog-splits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"d1c5b49e-95fa-4aed-930e-cf314c16a53d",
"e2d6c5af-96gb-5bed-a41f-df425d27b64e",
"f3e7d6bg-a7hc-6cfe-b52g-eg536e38c75f"
],
"type": "asset"
}
'import requests
url = "https://api.royalti.io/split/bulk/catalog-splits"
payload = {
"ids": ["d1c5b49e-95fa-4aed-930e-cf314c16a53d", "e2d6c5af-96gb-5bed-a41f-df425d27b64e", "f3e7d6bg-a7hc-6cfe-b52g-eg536e38c75f"],
"type": "asset"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ids: [
'd1c5b49e-95fa-4aed-930e-cf314c16a53d',
'e2d6c5af-96gb-5bed-a41f-df425d27b64e',
'f3e7d6bg-a7hc-6cfe-b52g-eg536e38c75f'
],
type: 'asset'
})
};
fetch('https://api.royalti.io/split/bulk/catalog-splits', 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/split/bulk/catalog-splits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'ids' => [
'd1c5b49e-95fa-4aed-930e-cf314c16a53d',
'e2d6c5af-96gb-5bed-a41f-df425d27b64e',
'f3e7d6bg-a7hc-6cfe-b52g-eg536e38c75f'
],
'type' => 'asset'
]),
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/split/bulk/catalog-splits"
payload := strings.NewReader("{\n \"ids\": [\n \"d1c5b49e-95fa-4aed-930e-cf314c16a53d\",\n \"e2d6c5af-96gb-5bed-a41f-df425d27b64e\",\n \"f3e7d6bg-a7hc-6cfe-b52g-eg536e38c75f\"\n ],\n \"type\": \"asset\"\n}")
req, _ := http.NewRequest("DELETE", 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.delete("https://api.royalti.io/split/bulk/catalog-splits")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"d1c5b49e-95fa-4aed-930e-cf314c16a53d\",\n \"e2d6c5af-96gb-5bed-a41f-df425d27b64e\",\n \"f3e7d6bg-a7hc-6cfe-b52g-eg536e38c75f\"\n ],\n \"type\": \"asset\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/split/bulk/catalog-splits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"d1c5b49e-95fa-4aed-930e-cf314c16a53d\",\n \"e2d6c5af-96gb-5bed-a41f-df425d27b64e\",\n \"f3e7d6bg-a7hc-6cfe-b52g-eg536e38c75f\"\n ],\n \"type\": \"asset\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Asset splits deletion completed.",
"totalProcessed": 3,
"totalSplitsDeleted": 7,
"failedDeletions": []
}{
"success": false,
"error": {
"code": "BAD_REQUEST",
"message": "Invalid type. Must be either \"product\" or \"asset\""
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"message": "Asset splits deletion completed.",
"totalProcessed": 2,
"totalSplitsDeleted": 3,
"failedDeletions": [
{
"id": "invalid-uuid",
"error": "No splits found for this asset"
}
]
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}Splits
Bulk delete catalog splits
Bulk Delete Catalog Splits
DELETE
/
split
/
bulk
/
catalog-splits
Bulk delete catalog splits
curl --request DELETE \
--url https://api.royalti.io/split/bulk/catalog-splits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"d1c5b49e-95fa-4aed-930e-cf314c16a53d",
"e2d6c5af-96gb-5bed-a41f-df425d27b64e",
"f3e7d6bg-a7hc-6cfe-b52g-eg536e38c75f"
],
"type": "asset"
}
'import requests
url = "https://api.royalti.io/split/bulk/catalog-splits"
payload = {
"ids": ["d1c5b49e-95fa-4aed-930e-cf314c16a53d", "e2d6c5af-96gb-5bed-a41f-df425d27b64e", "f3e7d6bg-a7hc-6cfe-b52g-eg536e38c75f"],
"type": "asset"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ids: [
'd1c5b49e-95fa-4aed-930e-cf314c16a53d',
'e2d6c5af-96gb-5bed-a41f-df425d27b64e',
'f3e7d6bg-a7hc-6cfe-b52g-eg536e38c75f'
],
type: 'asset'
})
};
fetch('https://api.royalti.io/split/bulk/catalog-splits', 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/split/bulk/catalog-splits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'ids' => [
'd1c5b49e-95fa-4aed-930e-cf314c16a53d',
'e2d6c5af-96gb-5bed-a41f-df425d27b64e',
'f3e7d6bg-a7hc-6cfe-b52g-eg536e38c75f'
],
'type' => 'asset'
]),
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/split/bulk/catalog-splits"
payload := strings.NewReader("{\n \"ids\": [\n \"d1c5b49e-95fa-4aed-930e-cf314c16a53d\",\n \"e2d6c5af-96gb-5bed-a41f-df425d27b64e\",\n \"f3e7d6bg-a7hc-6cfe-b52g-eg536e38c75f\"\n ],\n \"type\": \"asset\"\n}")
req, _ := http.NewRequest("DELETE", 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.delete("https://api.royalti.io/split/bulk/catalog-splits")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"d1c5b49e-95fa-4aed-930e-cf314c16a53d\",\n \"e2d6c5af-96gb-5bed-a41f-df425d27b64e\",\n \"f3e7d6bg-a7hc-6cfe-b52g-eg536e38c75f\"\n ],\n \"type\": \"asset\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/split/bulk/catalog-splits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"d1c5b49e-95fa-4aed-930e-cf314c16a53d\",\n \"e2d6c5af-96gb-5bed-a41f-df425d27b64e\",\n \"f3e7d6bg-a7hc-6cfe-b52g-eg536e38c75f\"\n ],\n \"type\": \"asset\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Asset splits deletion completed.",
"totalProcessed": 3,
"totalSplitsDeleted": 7,
"failedDeletions": []
}{
"success": false,
"error": {
"code": "BAD_REQUEST",
"message": "Invalid type. Must be either \"product\" or \"asset\""
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"message": "Asset splits deletion completed.",
"totalProcessed": 2,
"totalSplitsDeleted": 3,
"failedDeletions": [
{
"id": "invalid-uuid",
"error": "No splits found for this asset"
}
]
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}This endpoint requires authentication. Include your Bearer token in the Authorization header.
Description
Bulk Delete Catalog Splits The Bulk Delete Catalog Splits endpoint (/split/bulk/catalog-splits) allows users to delete all splits associated with specific assets or products in bulk.
Authorization:
- Required role:
owneronly
DELETE
Request Payload:
The request payload should be a JSON object with an array of asset or product IDs and the type specifying whether they are assets or products.
| Parameter | Type | Required | Description |
|---|---|---|---|
| ids | string[] | Yes | An array of asset or product IDs (UUIDs) |
| type | string | Yes | Either “asset” or “product” to specify the type of entities |
This request deletes all splits associated with the specified assets or products. For assets, only asset-level splits are deleted (where ProductId is null). For products, all splits associated with the product are deleted.
Code Examples
const response = await fetch('https://api.royalti.io/split/bulk/catalog-splits', {
method: 'DELETE',
headers: {
'Authorization': `Bearer ${token}`,
},
});
const data = await response.json();
console.log(data);
import requests
response = requests.delete(
'https://api.royalti.io/split/bulk/catalog-splits',
headers={
'Authorization': f'Bearer {token}'
},
)
data = response.json()
print(data)
curl -X DELETE https://api.royalti.io/split/bulk/catalog-splits \
-H "Authorization: Bearer YOUR_TOKEN" \
Authorizations
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Body
application/json
⌘I