applyAccountingItemDefaults
Fills a product's accounting item from the integration's configured defaults.
Writes the same values accountingItemDefaults previews for the given item type. Pass
fields to apply only some of them, which is how a single field can be reset to its
default without disturbing the others.
Business Rules
- Existing values on the accounting item are overwritten by the defaults that apply.
- The accounting item is created if the product does not have one yet.
- Which accounts and enablement flags apply depends on
itemType, so it is required. - Applying no fields is not an error; it simply writes nothing.
Error Scenarios
- **
BAD_REQUEST**: the product or integration does not belong to this company, or a configured source is no longer valid for the field it feeds. - **
NOT_FOUND**: the integration does not exist.
Permissions Required
accounting:configure_product_accountingpermission.
applyAccountingItemDefaults(
input: ApplyAccountingItemDefaultsInput!
): ApplyAccountingItemDefaultsPayload
Arguments
applyAccountingItemDefaults.input ● ApplyAccountingItemDefaultsInput! non-null input common
Parameters for ApplyAccountingItemDefaults
Type
ApplyAccountingItemDefaultsPayload object common
Autogenerated return type of ApplyAccountingItemDefaults.