Developer Hub

Integrate SheetServe into your applications with our REST API.

Authentication

Secure your API requests using API keys. Manage your keys in the API Keys section.

Authorization: Bearer YOUR_API_KEY

API Endpoints

GET/api/documents

Retrieve all your documents.

GET/api/documents/:document_id

Retrieve the latest version of a specific document.

GET/api/documents/:document_id/versions

Retrieve all versions of a document.

GET/api/documents/:document_id/versions/:version_id

Retrieve a specific document version.

GET/api/documents/:document_id/versions/:version_id/sheets

Retrieve all sheets of a specific document version.

GET/api/documents/:document_id/versions/:version_id/sheets/:sheet_name

Retrieve the data from a single sheet.

Query Parameters

Customize your API requests with these query parameters:

limit

Number of results to return (default: 20, max: 100)

?limit=50

offset

Number of results to skip (for pagination)

?offset=20

sort

Field to sort by (prefix with '-' for descending)

?sort=-created_at

fields

Comma-separated list of fields to include

?fields=id,name,created_at

filter

Filter results based on field values

?filter[status]=active&filter[type]=spreadsheet

Code Examples

Fetch and filter document data using JavaScript:

const fetchDocumentData = async () => {
  const documentId = '12345';
  const apiKey = 'YOUR_API_KEY';
  const baseUrl = 'https://api.yourdomain.com';

  const response = await fetch(
    `${baseUrl}/api/documents/${documentId}/sheets/data?limit=50&sort=-updated_at`,
    {
      headers: {
        'Authorization': `Bearer ${apiKey}`,
        'Content-Type': 'application/json'
      }
    }
  );

  const data = await response.json();
  console.log('Document data:', data);
};

fetchDocumentData();