> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # UpdateExtendedFields # Package: receipts # Namespace: ReceiptPresets # Method link: https://dev.wix.com/docs/api-reference/business-management/get-paid/receipts/receipt-presets/update-extended-fields.md ## Permission Scopes: Manage Receipts: SCOPE.RECEIPTS.MANAGE ## Introduction Updates the extended fields of a receipt preset, without incrementing revision. --- ## REST API ### Schema ``` Method: updateExtendedFields Description: Updates the extended fields of a receipt preset, without incrementing revision. URL: https://www.wixapis.com/receipts/v1/receipt-presets/{id}/update-extended-fields Method: POST # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: namespace, namespaceData Method parameters: param name: namespace | type: namespace | description: Identifier for the app whose extended fields are being updated. | required: true param name: namespaceData | type: namespaceData | description: Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md#json-schema-for-extended-fields) defined when the extended fields were configured. | required: true Return type: UpdateExtendedFieldsResponse - name: receiptPreset | type: ReceiptPreset | description: Updated receipt preset. - name: id | type: string | description: Receipt preset GUID. - name: revision | type: string | description: Revision number, which increments by 1 each time the receipt preset is updated. To prevent conflicting changes, the current revision must be passed when updating the receipt preset. - name: createdDate | type: string | description: Date and time the receipt preset was created. - name: updatedDate | type: string | description: Date and time the receipt preset was last updated. - name: name | type: string | description: Receipt preset name. - name: displaySettings | type: DisplaySettings | description: Display settings. - name: businessDisplayOptions | type: BusinessDisplayOptions | description: Business display options. - name: showBusinessEmail | type: boolean | description: Whether to display the business email in the receipt. - name: showBusinessPhoneNumber | type: boolean | description: Whether to display the business phone number in the receipt. - name: showBusinessAddress | type: boolean | description: Whether to display the business address in the receipt. - name: customerDisplayOptions | type: CustomerDisplayOptions | description: Customer display options. - name: showCustomerEmail | type: boolean | description: Whether to display the customer's email in the receipt. - name: showCustomerPhoneNumber | type: boolean | description: Whether to display the customer's phone number in the receipt. - name: showCustomerShippingAddress | type: boolean | description: Whether to display the customer's shipping address in the receipt. - name: showCustomerBillingAddress | type: boolean | description: Whether to display the customer's billing address in the receipt. - name: showCustomerVatId | type: boolean | description: Whether to display the customer's VAT GUID in the receipt. - name: showCustomerCompanyName | type: boolean | description: Whether to display the customer's company's name. - name: itemsDisplayOptions | type: ItemsDisplayOption | description: Item display options. - name: showItemsDescription | type: boolean | description: Whether to display item descriptions in the receipt. - name: showTax | type: boolean | description: Whether to display item taxes in the receipt. - name: totalsDisplayOptions | type: TotalsDisplayOption | description: Totals display options. - name: showTaxBreakdown | type: boolean | description: Whether to display the tax breakdown in the receipt. - name: showItemSubtotalPerTaxBreakdown | type: boolean | description: Whether to display the item subtotal per tax breakdown in the receipt. - name: customFields | type: CustomFields | description: Custom fields. Values appear on the receipt in the specified order. - name: headerCustomFields | type: array | description: Header custom fields. - name: title | type: string | description: Title. - name: value | type: string | description: Value. - name: businessCustomFields | type: array | description: Business custom fields. - name: customerCustomFields | type: array | description: Customer custom fields. - name: footerCustomFields | type: array | description: Footer custom fields. - name: title | type: string | description: Title. - name: value | type: string | description: Value. - name: default | type: boolean | description: Whether this is the default receipt preset. The default preset is used during receipt creation when a preset isn't specified or doesn't exist. - name: displayValues | type: DisplayValues | description: Display values. - name: titleOverride | type: string | description: Text override for receipt title. - name: extendedFields | type: ExtendedFields | description: Custom field data for the receipt preset. Extended fields must be configured in the app dashboard before they can be accessed with API calls. - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured. You can only access fields for which you have the appropriate permissions. Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md). ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.receipts.ReceiptPresets.updateExtendedFields(_id, namespace, options) Description: Updates the extended fields of a receipt preset, without incrementing revision. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: _id, namespace, options.namespaceData, options Method parameters: param name: _id | type: string | description: GUID of the entity to update. | required: true param name: namespace | type: string | description: Identifier for the app whose extended fields are being updated. | required: true param name: options | type: UpdateExtendedFieldsOptions none | required: true - name: namespaceData | type: object | description: Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md#json-schema-for-extended-fields) defined when the extended fields were configured. | required: true Return type: PROMISE - name: receiptPreset | type: ReceiptPreset | description: Updated receipt preset. - name: _id | type: string | description: Receipt preset GUID. - name: revision | type: string | description: Revision number, which increments by 1 each time the receipt preset is updated. To prevent conflicting changes, the current revision must be passed when updating the receipt preset. - name: _createdDate | type: Date | description: Date and time the receipt preset was created. - name: _updatedDate | type: Date | description: Date and time the receipt preset was last updated. - name: name | type: string | description: Receipt preset name. - name: displaySettings | type: DisplaySettings | description: Display settings. - name: businessDisplayOptions | type: BusinessDisplayOptions | description: Business display options. - name: showBusinessEmail | type: boolean | description: Whether to display the business email in the receipt. - name: showBusinessPhoneNumber | type: boolean | description: Whether to display the business phone number in the receipt. - name: showBusinessAddress | type: boolean | description: Whether to display the business address in the receipt. - name: customerDisplayOptions | type: CustomerDisplayOptions | description: Customer display options. - name: showCustomerEmail | type: boolean | description: Whether to display the customer's email in the receipt. - name: showCustomerPhoneNumber | type: boolean | description: Whether to display the customer's phone number in the receipt. - name: showCustomerShippingAddress | type: boolean | description: Whether to display the customer's shipping address in the receipt. - name: showCustomerBillingAddress | type: boolean | description: Whether to display the customer's billing address in the receipt. - name: showCustomerVatId | type: boolean | description: Whether to display the customer's VAT GUID in the receipt. - name: showCustomerCompanyName | type: boolean | description: Whether to display the customer's company's name. - name: itemsDisplayOptions | type: ItemsDisplayOption | description: Item display options. - name: showItemsDescription | type: boolean | description: Whether to display item descriptions in the receipt. - name: showTax | type: boolean | description: Whether to display item taxes in the receipt. - name: totalsDisplayOptions | type: TotalsDisplayOption | description: Totals display options. - name: showTaxBreakdown | type: boolean | description: Whether to display the tax breakdown in the receipt. - name: showItemSubtotalPerTaxBreakdown | type: boolean | description: Whether to display the item subtotal per tax breakdown in the receipt. - name: customFields | type: CustomFields | description: Custom fields. Values appear on the receipt in the specified order. - name: headerCustomFields | type: array | description: Header custom fields. - name: title | type: string | description: Title. - name: value | type: string | description: Value. - name: businessCustomFields | type: array | description: Business custom fields. - name: customerCustomFields | type: array | description: Customer custom fields. - name: footerCustomFields | type: array | description: Footer custom fields. - name: title | type: string | description: Title. - name: value | type: string | description: Value. - name: default | type: boolean | description: Whether this is the default receipt preset. The default preset is used during receipt creation when a preset isn't specified or doesn't exist. - name: displayValues | type: DisplayValues | description: Display values. - name: titleOverride | type: string | description: Text override for receipt title. - name: extendedFields | type: ExtendedFields | description: Custom field data for the receipt preset. Extended fields must be configured in the app dashboard before they can be accessed with API calls. - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured. You can only access fields for which you have the appropriate permissions. Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md). ``` ### Examples ### updateExtendedFields ```javascript import { receiptPresets } from '@wix/get-paid'; async function updateExtendedFields(_id,namespace,options) { const response = await receiptPresets.updateExtendedFields(_id,namespace,options); }; ``` ### updateExtendedFields (with elevated permissions) ```javascript import { receiptPresets } from '@wix/get-paid'; import { auth } from '@wix/essentials'; async function myUpdateExtendedFieldsMethod(_id,namespace,options) { const elevatedUpdateExtendedFields = auth.elevate(receiptPresets.updateExtendedFields); const response = await elevatedUpdateExtendedFields(_id,namespace,options); } ``` ### updateExtendedFields (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { receiptPresets } from '@wix/get-paid'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { receiptPresets }, // Include the auth strategy and host as relevant }); async function updateExtendedFields(_id,namespace,options) { const response = await myWixClient.receiptPresets.updateExtendedFields(_id,namespace,options); }; ``` ---