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/documentsRetrieve all your documents.
GET
/api/documents/:document_idRetrieve the latest version of a specific document.
GET
/api/documents/:document_id/versionsRetrieve all versions of a document.
GET
/api/documents/:document_id/versions/:version_idRetrieve a specific document version.
GET
/api/documents/:document_id/versions/:version_id/sheetsRetrieve all sheets of a specific document version.
GET
/api/documents/:document_id/versions/:version_id/sheets/:sheet_nameRetrieve 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=50offset
Number of results to skip (for pagination)
?offset=20sort
Field to sort by (prefix with '-' for descending)
?sort=-created_atfields
Comma-separated list of fields to include
?fields=id,name,created_atfilter
Filter results based on field values
?filter[status]=active&filter[type]=spreadsheetCode 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();