Pluslide LogoPluslide
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_KEY

Parameters

Path Parameters

ParameterTypeRequiredDescription
idnumberYesTask 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
}
FieldTypeDescription
idnumberTask ID
statusstring"success"
urlstringFor PPTX/PDF: Direct download URL. For Google Slides: Edit URL of the file.
filenamestringGenerated filename
fileSizenumberFile 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

StatusCodeDescription
400BAD_REQUESTInvalid presentation ID
401UNAUTHORIZEDInvalid or missing API key
404NOT_FOUNDTask not found

On this page