0

Resume contract schedules

by
Published Oct 17, 2025

Resumes a contract schedule releases the hold effective as of the resume date and allows the open periods to be available for posting or invoicing.

Script sage_intacct Verified

The script

Submitted by hugo697 Bun
Verified 235 days ago
1
//native
2
type SageIntacct = {
3
	token: string
4
}
5
/**
6
 * Resume contract schedules
7
 * Resumes a contract schedule releases the hold effective as of the resume date and allows the open periods to be available for posting or invoicing.
8
 */
9
export async function main(
10
	auth: SageIntacct,
11
	body: {
12
		key: string
13
		contractLineKeys: string
14
		asOfDate: string
15
		memo: string
16
		resumeBilling: false | true
17
		resumeRevenue: false | true
18
		resumeExpense: false | true
19
		revenueAdjustmentType?: 'template' | 'oneTime' | 'distributed' | 'walkForward'
20
	}
21
) {
22
	const url = new URL(
23
		`https://api.intacct.com/ia/api/v1/workflows/contracts/contract/resume-schedules`
24
	)
25

26
	const response = await fetch(url, {
27
		method: 'POST',
28
		headers: {
29
			'Content-Type': 'application/json',
30
			Authorization: 'Bearer ' + auth.token
31
		},
32
		body: JSON.stringify(body)
33
	})
34
	if (!response.ok) {
35
		const text = await response.text()
36
		throw new Error(`${response.status} ${text}`)
37
	}
38
	return await response.json()
39
}
40