Set Product Cover Art
curl --request PATCH \
--url https://api.royalti.io/product/{id}/cover-art \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mediaKey": "19_TENANT/202607/Product/Artwork/731851492811/cover.jpg"
}
'import requests
url = "https://api.royalti.io/product/{id}/cover-art"
payload = { "mediaKey": "19_TENANT/202607/Product/Artwork/731851492811/cover.jpg" }
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({mediaKey: '19_TENANT/202607/Product/Artwork/731851492811/cover.jpg'})
};
fetch('https://api.royalti.io/product/{id}/cover-art', 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/product/{id}/cover-art",
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([
'mediaKey' => '19_TENANT/202607/Product/Artwork/731851492811/cover.jpg'
]),
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/product/{id}/cover-art"
payload := strings.NewReader("{\n \"mediaKey\": \"19_TENANT/202607/Product/Artwork/731851492811/cover.jpg\"\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/product/{id}/cover-art")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mediaKey\": \"19_TENANT/202607/Product/Artwork/731851492811/cover.jpg\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/product/{id}/cover-art")
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 \"mediaKey\": \"19_TENANT/202607/Product/Artwork/731851492811/cover.jpg\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Cover art updated",
"data": {
"selectedKey": "<string>",
"candidates": [
{
"key": "<string>",
"name": "<string>",
"width": 123,
"height": 123,
"meetsFloor": true,
"deliverable": true,
"isSelected": true,
"isOverride": true
}
]
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}Product
Set Product Cover Art
/product//cover-art
PATCH
/
product
/
{id}
/
cover-art
Set Product Cover Art
curl --request PATCH \
--url https://api.royalti.io/product/{id}/cover-art \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mediaKey": "19_TENANT/202607/Product/Artwork/731851492811/cover.jpg"
}
'import requests
url = "https://api.royalti.io/product/{id}/cover-art"
payload = { "mediaKey": "19_TENANT/202607/Product/Artwork/731851492811/cover.jpg" }
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({mediaKey: '19_TENANT/202607/Product/Artwork/731851492811/cover.jpg'})
};
fetch('https://api.royalti.io/product/{id}/cover-art', 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/product/{id}/cover-art",
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([
'mediaKey' => '19_TENANT/202607/Product/Artwork/731851492811/cover.jpg'
]),
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/product/{id}/cover-art"
payload := strings.NewReader("{\n \"mediaKey\": \"19_TENANT/202607/Product/Artwork/731851492811/cover.jpg\"\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/product/{id}/cover-art")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mediaKey\": \"19_TENANT/202607/Product/Artwork/731851492811/cover.jpg\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/product/{id}/cover-art")
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 \"mediaKey\": \"19_TENANT/202607/Product/Artwork/731851492811/cover.jpg\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Cover art updated",
"data": {
"selectedKey": "<string>",
"candidates": [
{
"key": "<string>",
"name": "<string>",
"width": 123,
"height": 123,
"meetsFloor": true,
"deliverable": true,
"isSelected": true,
"isOverride": true
}
]
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}This endpoint requires authentication. Include your Bearer token in the Authorization header.
Description
/product//cover-art Description: Pins which image on a product is used as the delivery cover art. A product’smedia array often holds several images (for example a
low-resolution thumbnail created by a release-to-product transfer
alongside the real high-resolution cover). By default the server selects
the cover automatically — the largest deliverable image at or above the
1000x1000 enhance floor. This endpoint is the manual override for when
that automatic choice is wrong.
Pass a mediaKey taken from checks.artwork.candidates[].key in
GET /product/delivery-readiness. Pass null to clear the override and
return to automatic selection.
The flag is exclusive: setting one image clears it on all others.
Method:
PATCH
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
| id | string | The unique identifier of the product. |
Code Examples
const response = await fetch('https://api.royalti.io/product/example-id/cover-art', {
method: 'PATCH',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"mediaKey": "19_TENANT/202607/Product/Artwork/731851492811/cover.jpg"
})
});
const data = await response.json();
console.log(data);
import requests
response = requests.patch(
'https://api.royalti.io/product/example-id/cover-art',
headers={
'Authorization': f'Bearer {token}'
},
json={"mediaKey":"19_TENANT/202607/Product/Artwork/731851492811/cover.jpg"}
)
data = response.json()
print(data)
curl -X PATCH https://api.royalti.io/product/example-id/cover-art \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"mediaKey":"19_TENANT/202607/Product/Artwork/731851492811/cover.jpg"}'
Authorizations
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Path Parameters
Product ID
Body
application/json
Key of the image to deliver, from checks.artwork.candidates[].key. Null clears the override.
Example:
"19_TENANT/202607/Product/Artwork/731851492811/cover.jpg"
⌘I