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
- **
NOT_FOUND**: the product or the integration does not belong to this company. - **
BAD_REQUEST**: a configured source is no longer valid for the field it feeds.
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.