Call APIEndpoints
Get Presentation
API endpoint to check the status of an async PPTX export task and retrieve the download URL. Includes polling strategies and response examples.
Endpoint
GET /v1/presentation/:id
Authorization: Bearer YOUR_API_KEYParameters
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | number | Yes | Task ID returned from the async export request |
Response
The response depends on the current status of the export task.
Success
The export completed successfully:
{
"id": 12345,
"status": "success",
"url": "https://storage.example.com/presentations/presentation-123456.pptx",
"filename": "presentation.pptx",
"fileSize": 1234567
}| Field | Type | Description |
|---|---|---|
id | number | Task ID |
status | string | "success" |
url | string | For PPTX/PDF: Direct download URL. For Google Slides: Edit URL of the file. |
filename | string | Generated filename |
fileSize | number | File size in bytes |
Processing
The export is still in progress:
{
"id": 12345,
"status": "processing",
"message": "Export is in progress"
}Failed
The export failed:
{
"id": 12345,
"status": "failed",
"message": "Export failed"
}Usage Patterns
Polling Strategy
When using async mode, poll this endpoint to check the export status:
async function waitForPresentation(taskId, maxAttempts = 30, intervalMs = 2000) {
for (let i = 0; i < maxAttempts; i++) {
const response = await fetch(
`https://api.pluslide.com/v1/presentation/${taskId}`,
{ headers: { Authorization: `Bearer ${API_KEY}` } }
);
// Handle HTTP errors (e.g., 401, 404)
if (!response.ok) {
const error = await response.json();
throw new Error(`${error.error}: ${error.message}`);
}
const result = await response.json();
if (result.status === 'success') {
return result.url;
}
if (result.status === 'failed') {
throw new Error(result.message);
}
// Still processing, wait and retry
await new Promise((resolve) => setTimeout(resolve, intervalMs));
}
throw new Error('Timeout waiting for presentation');
}Code Examples
cURL
curl -X GET "https://api.pluslide.com/v1/presentation/12345" \
-H "Authorization: Bearer YOUR_API_KEY"JavaScript
const response = await fetch(
'https://api.pluslide.com/v1/presentation/12345',
{
headers: {
Authorization: `Bearer ${API_KEY}`,
},
}
);
// Handle HTTP errors (4xx/5xx)
if (!response.ok) {
const error = await response.json();
throw new Error(`${error.error}: ${error.message} (requestId: ${error.requestId})`);
}
// Handle business status
const result = await response.json();
if (result.status === 'success') {
console.log('Download URL:', result.url);
} else if (result.status === 'processing') {
console.log('Still processing...');
} else if (result.status === 'failed') {
console.log('Export failed:', result.message);
}Error Responses
| Status | Code | Description |
|---|---|---|
400 | BAD_REQUEST | Invalid presentation ID |
401 | UNAUTHORIZED | Invalid or missing API key |
404 | NOT_FOUND | Task not found |
Generate Presentation
Generate presentations (PPTX, PDF, or Google Slides) using the Pluslide API. Supports both synchronous and asynchronous modes.
List Presentations
API endpoint to retrieve a paginated list of generated presentations. Includes filtering options, pagination parameters, and response examples.
