curl --request POST \
--url https://api.royalti.io/product/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"products": [
{
"upc": "<string>",
"title": "<string>",
"displayArtist": "<string>",
"mainArtist": [
"<string>"
],
"type": "<string>",
"format": "<string>",
"releaseDate": "2023-12-25",
"mainGenre": [
"<string>"
],
"artists": [
"<string>"
],
"split": [
{
"user": "<string>",
"share": 123
}
]
}
]
}
'{
"message": "Bulk product creation completed",
"createdProducts": [
"Product One",
"Product Two"
],
"processedCount": 3,
"errors": [
"Product Three UPC already exists"
]
}/product/bulk
curl --request POST \
--url https://api.royalti.io/product/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"products": [
{
"upc": "<string>",
"title": "<string>",
"displayArtist": "<string>",
"mainArtist": [
"<string>"
],
"type": "<string>",
"format": "<string>",
"releaseDate": "2023-12-25",
"mainGenre": [
"<string>"
],
"artists": [
"<string>"
],
"split": [
{
"user": "<string>",
"share": 123
}
]
}
]
}
'{
"message": "Bulk product creation completed",
"createdProducts": [
"Product One",
"Product Two"
],
"processedCount": 3,
"errors": [
"Product Three UPC already exists"
]
}/product/bulk endpoint allows the creation of multiple products simultaneously by providing an array of product objects.
Method:POST
Request Payload:
| Parameter | Type | Description |
|---|---|---|
| products | array | An array of product objects with their details. |
const response = await fetch('https://api.royalti.io/product/bulk', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"products": [
{
"upc": "sample-upc",
"title": "sample-title",
"displayArtist": "sample-displayArtist",
"mainArtist": [
{}
],
"type": "sample-type",
"format": "sample-format",
"releaseDate": "2024-01-21",
"mainGenre": [
{}
],
"artists": [
{}
],
"split": [
{
"user": "sample-user",
"share": 1
}
]
}
]
})
});
const data = await response.json();
console.log(data);