We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Below is a script got updating Tracking Category options.
The call to update requires the updated option as well as a second arg that contains the TrackingCategotyID and the OptionID
import { AccountingAPIClient } from '../AccountingAPIClient'; import { getPrivateConfig } from './helpers/integration.helpers'; import { InvoicesResponse } from '../AccountingAPI-responses'; (async () => { let xero: AccountingAPIClient; const config = getPrivateConfig(); xero = new AccountingAPIClient(config); const allCats = await xero.trackingCategories.get(); const firstCat = allCats.TrackingCategories[0]; const updatedOption = allCats.TrackingCategories[0].Options[0]; updatedOption.Name = 'New Name'; const updateRes = await xero.trackingCategories.trackingOptions.update(updatedOption, { TrackingCategoryID: firstCat.TrackingCategoryID, TrackingOptionID: updatedOption.TrackingOptionID, }); console.log('updateRes: ', updateRes); })();