cURL
curl --request POST \ --url https://api.n-3.co.uk/projects/{projectId}/document-studio/reports \ --header 'Content-Type: application/json' \ --data '{ "reportName": "<string>", "content": { "blocks": [ { "type": "<string>", "content": "<string>", "properties": { "sectionId": "<string>", "title": "<string>", "required": true, "fontSize": "<string>", "textAlign": "<string>", "color": "<string>" }, "children": [ {} ] } ], "metadata": { "templateId": "<string>", "reportType": "<string>", "author": "<string>", "lastModified": "<string>" } } }'
{ "400": {}, "404": {}, "413": {}, "reportId": "<string>", "version": 123 }
Save or create a document studio report with rich content and automatic version control
Show content structure
Show block types
Show common properties
Show metadata
{ "reportName": "Q2 Progress Report", "content": { "blocks": [ { "type": "title", "content": "Quarterly Progress Report", "properties": { "fontSize": "24px", "textAlign": "center", "color": "#2c3e50" } }, { "type": "section", "properties": { "title": "Executive Summary" }, "children": [ { "type": "narrative", "properties": { "sectionId": "executive-summary", "title": "Project Overview", "required": true }, "content": "<p>The project has made significant progress during Q2 2024, with major milestones achieved in foundation work and structural development.</p>" } ] }, { "type": "data", "properties": { "title": "Financial Summary", "dataSource": "project.financials", "format": "currency" } }, { "type": "table", "properties": { "title": "Risk Assessment Summary", "dataSource": "project.riskAssessments", "columns": [ {"key": "category", "title": "Risk Category"}, {"key": "status", "title": "Current Status"}, {"key": "notes", "title": "Notes"} ] } }, { "type": "list", "properties": { "sectionId": "key-achievements", "title": "Key Achievements", "listType": "bullet" }, "content": "Foundation work completed ahead of schedule\nSteel frame installation commenced\nAll safety milestones met" } ], "metadata": { "templateId": "template-001", "reportType": "INTERIM", "author": "Project Surveyor", "lastModified": "2024-06-20T14:30:00.000Z" } } }
{ "reportId": "report-12345", "version": 3 }
{ "type": "title", "content": "Report Title", "properties": { "fontSize": "24px", "textAlign": "center", "color": "#333333" } }
{ "type": "narrative", "properties": { "sectionId": "unique-section-id", "title": "Section Title", "required": true }, "content": "<p>Rich HTML content with <strong>formatting</strong></p>" }
{ "type": "data", "properties": { "title": "Project Costs", "dataSource": "project.costs.total", "format": "currency", "calculation": "sum" } }
{ "type": "table", "properties": { "title": "Cost Breakdown", "dataSource": "project.facilities", "columns": [ {"key": "name", "title": "Facility"}, {"key": "budget", "title": "Budget", "format": "currency"}, {"key": "actual", "title": "Actual", "format": "currency"} ] } }
{ "type": "section", "properties": { "title": "Financial Analysis" }, "children": [ // Child blocks go here ] }
{ "type": "list", "properties": { "sectionId": "achievements", "title": "Key Achievements", "listType": "bullet" }, "content": "Item 1\nItem 2\nItem 3" }
{ "statusCode": 400, "message": "Invalid block structure", "error": "Bad Request" }
{ "statusCode": 404, "message": "Project not found", "error": "Not Found" }
{ "statusCode": 413, "message": "Report content too large", "error": "Payload Too Large" }