curl --request POST \
--url https://api.royalti.io/webhook/download/status-update/webhook \
--header 'Content-Type: application/json' \
--data '
{
"id": "d3f2c1b0-1234-5678-90ab-cdef12345678",
"status": "done",
"url": "https://storage.googleapis.com/downloads/export-2024-01-15.csv?signature=..."
}
'{
"message": "Download record status is marked as done"
}Receives status updates for download preparation operations from Google Cloud Functions.
curl --request POST \
--url https://api.royalti.io/webhook/download/status-update/webhook \
--header 'Content-Type: application/json' \
--data '
{
"id": "d3f2c1b0-1234-5678-90ab-cdef12345678",
"status": "done",
"url": "https://storage.googleapis.com/downloads/export-2024-01-15.csv?signature=..."
}
'{
"message": "Download record status is marked as done"
}royalti-x-hash header containing HMAC signature.
Workflow:
const response = await fetch('https://api.royalti.io/webhook/download/status-update/webhook', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"id": "d3f2c1b0-1234-5678-90ab-cdef12345678",
"status": "done",
"url": "https://storage.googleapis.com/downloads/export-2024-01-15.csv?signature=..."
})
});
const data = await response.json();
console.log(data);
Download record UUID
"d3f2c1b0-1234-5678-90ab-cdef12345678"
Current status of the download
preparing, done, failed, expired "done"
Google Cloud Storage signed URL for download
"https://storage.googleapis.com/downloads/export-2024-01-15.csv?signature=..."
Webhook processed successfully
"Download record status is marked as done"