const url = 'https://api.sureshake.com/v2/reporter/reporting-intents/custom';
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
entityId: '156e622c-6cdf-4c27-9bc9-2f2db69919f5',
id: 'string',
name: 'string',
description: 'string',
category: 'string',
version: '1.0.0',
schema: {
schemaVersion: 'string',
baseReporterIntentKey: 'string',
sourceType: 'string',
compatibleProviders: [],
periodDefaults: {period: 'current_month', timezone: 'UTC'},
sections: [
{
id: 'string',
name: 'string',
description: 'string',
order: 0,
required: true,
documentRole: 'string',
providerReportName: 'string',
removable: false,
includedByDefault: true,
sourceLabel: 'string'
}
],
lineItemMappings: [
{
id: 'string',
sectionId: 'string',
label: 'string',
sourceLineItem: 'string',
aggregation: 'sum',
required: true
}
],
outputPreferences: {formats: ['summary'], includeComparatives: false, includeSourceCitations: true},
disclosures: {
includeManagementNotes: true,
includeAccountingPolicies: false,
notes: 'string'
},
goldenDocuments: []
}
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));