0

Reverse an other receipts object

by
Published Oct 17, 2025

Reverse an other receipts object to maintain an audit trail from the bank register. After you reverse an other receipts object, you cannot undo the reversal. However, you can create a new other receipts object to replace the original.

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
 * Reverse an other receipts object
7
 * Reverse an other receipts object to maintain an audit trail from the bank register. After you reverse an other receipts object, you cannot undo the reversal. However, you can create a new other receipts object to replace the original.
8
 */
9
export async function main(
10
	auth: SageIntacct,
11
	body: { key: string; reversedDate: string; notes?: string }
12
) {
13
	const url = new URL(
14
		`https://api.intacct.com/ia/api/v1/workflows/cash-management/other-receipt/reverse`
15
	)
16

17
	const response = await fetch(url, {
18
		method: 'POST',
19
		headers: {
20
			'Content-Type': 'application/json',
21
			Authorization: 'Bearer ' + auth.token
22
		},
23
		body: JSON.stringify(body)
24
	})
25
	if (!response.ok) {
26
		const text = await response.text()
27
		throw new Error(`${response.status} ${text}`)
28
	}
29
	return await response.json()
30
}
31