Skip to main content
POST
/
catalog-import
/
apply
curl --request POST \
  --url https://api.royalti.io/catalog-import/apply \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "batchId": "metadata-import-8f14e45f-ceea-4d5e-8b3a-0a1b2c3d4e5f"
}
'
{
  "status": "success",
  "message": "Imported 12 item(s), 0 failed",
  "data": {
    "imported": 123,
    "failed": 123,
    "itemIds": [
      "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    ]
  }
}
{
"status": "error",
"message": "Provide batchId or itemIds[] to apply"
}
{
"status": "error",
"message": "<string>",
"code": "<string>",
"details": {}
}
{
"status": "error",
"message": "Insufficient permissions. Admin access required."
}
{
"status": "error",
"message": "Internal server error"
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

POST /catalog-import/apply Description: The ONLY tenant-catalog write path in the importer. Resolves the set of pending, metadata-engine-sourced staged items matching batchId and/or itemIds (scoped to the caller’s tenant), then creates/updates the corresponding Asset/Product rows one item at a time, each in its own transaction. Every successfully processed item is marked imported (or failed, with importError set) and stamped with reviewedBy/reviewedAt. Idempotency: unique indexes on the tenant’s ISRC/UPC roster plus the fact that only status: pending rows are ever touched mean re-calling apply for an already-applied batch is a safe no-op (imported: 0, failed: 0) rather than creating duplicates. Authorization:
  • Required role: admin or higher
Method: POST

Code Examples

const response = await fetch('https://api.royalti.io/catalog-import/apply', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "ref": "#/components/schemas/ApplyOrRejectRequest"
  })
});

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

response = requests.post(
  'https://api.royalti.io/catalog-import/apply',
  headers={
    'Authorization': f'Bearer {token}'
  },
  json={"ref":"#/components/schemas/ApplyOrRejectRequest"}
)

data = response.json()
print(data)
curl -X POST https://api.royalti.io/catalog-import/apply \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ref":"#/components/schemas/ApplyOrRejectRequest"}'

Authorizations

Authorization
string
header
required

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

Body

application/json

One of batchId or a non-empty itemIds array is required. Only rows with status pending and belonging to the caller's tenant are affected.

batchId
string
Example:

"metadata-import-8f14e45f-ceea-4d5e-8b3a-0a1b2c3d4e5f"

itemIds
string<uuid>[]

Response

Apply attempted (per-item outcomes reflected in imported/failed)

status
string
Example:

"success"

message
string
Example:

"Imported 12 item(s), 0 failed"

data
object