> 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 # DeleteCustomAdditionalFees # Package: orders # Namespace: DraftOrders # Method link: https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/draft-orders/delete-custom-additional-fees.md ## Permission Scopes: Manage eCommerce - all permissions: SCOPE.DC-ECOM-MEGA.MANAGE-ECOM ## Introduction Removes custom additional fees from a draft order. --- ## REST API ### Schema ``` Method: deleteCustomAdditionalFees Description: Removes custom additional fees from a draft order. URL: https://www.wixapis.com/ecom/v1/draft-orders/{draftOrderId}/delete-custom-additional-fees Method: POST # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: customAdditionalFees Method parameters: param name: customAdditionalFees | type: array | description: IDs of the additional fees to remove from the draft order. | required: true Return type: DeleteCustomAdditionalFeesResponse - name: calculatedDraftOrder | type: CalculatedDraftOrder | description: Draft order calculated with the latest changes. - name: draftOrder | type: DraftOrder | description: Draft order. - name: id | type: string | description: Draft order GUID. - name: orderId | type: string | description: GUID of the order this draft commits to. - name: lineItems | type: array | description: Line items. Includes details about changes when relevant. - ONE-OF: - name: added | type: boolean | description: Whether the line item was added as part of the draft. - name: changedDetails | type: ItemChangedDetails | description: Line item fields before the change. - name: quantityBeforeChange | type: integer | description: Line item quantity before change. - name: priceBeforeChange | type: Price | description: Line item price before change. - name: amount | type: string | description: Amount. - name: formattedAmount | type: string | description: Amount formatted with currency symbol. - name: priceDescriptionBeforeChange | type: PriceDescription | description: Line item price description before change. - name: original | type: string | description: __Required.__ Price description in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). - name: translated | type: string | description: Price description translated into the buyer's language. Default: Same as `original`. - name: modifierGroupsBeforeChange | type: array | description: Line item modifier groups before change. - name: id | type: string | description: Modifier group GUID. - name: name | type: TranslatableString | description: Modifier group name. - name: original | type: string | description: __Required.__ String in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). Min: 1 character. Max: 200 characters. - name: translated | type: string | description: String translated into the buyer's language. Min: 1 character. Max: 400 characters. Default: Same as `original`. - name: modifiers | type: array | description: List of modifiers in this group. - name: id | type: string | description: Modifier GUID. - name: quantity | type: integer | description: The quantity of this modifier. - name: label | type: TranslatableString | description: Primary display label for the modifier. - name: details | type: TranslatableString | description: Additional details. - name: price | type: Price | description: The price of the modifier. - name: removed | type: boolean | description: Whether the line item was removed as part of the draft. - name: lineItem | type: OrderLineItem | description: Line item details after applied changes. - name: id | type: string | description: Line item GUID. - name: productName | type: ProductName | description: Item name. + Stores - `product.name` + Bookings - `service.info.name` + Events - `ticket.name` - name: original | type: string | description: __Required.__ Item name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). Min: 1 character. Max: 200 characters. - name: translated | type: string | description: Item name translated into the buyer's language. Min: 1 character. Max: 400 characters. Default: Same as `original`. - name: catalogReference | type: CatalogReference | description: References to the line item's origin catalog. Empty for custom line items. - name: catalogItemId | type: string | description: GUID of the item within the catalog it belongs to. - name: appId | type: string | description: GUID of the app providing the catalog. You can get your app's GUID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/). For items from Wix catalogs, the following values always apply: + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"` + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"` - name: options | type: object | description: Additional item details in `key:value` pairs. Use this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items. For Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration.md) or [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration.md), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction.md). - name: quantity | type: integer | description: Line item quantity. - name: totalDiscount | type: Price | description: Total discount for this line item's entire quantity. - name: descriptionLines | type: array | description: Line item description lines. Used for display purposes for the cart, checkout and order. - ONE-OF: - name: plainText | type: PlainTextValue | description: Description line plain text value. - name: original | type: string | description: Description line plain text value in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). - name: translated | type: string | description: Description line plain text value translated into the buyer's language. Default: Same as `original`. - name: colorInfo | type: Color | description: Description line color value. - name: original | type: string | description: Description line color name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). - name: translated | type: string | description: Description line color name translated into the buyer's language. Default: Same as `original`. - name: code | type: string | description: HEX or RGB color code for display. - name: name | type: DescriptionLineName | description: Description line name. - name: original | type: string | description: Description line name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). - name: translated | type: string | description: Description line name translated into the buyer's language. Default: Same as `original`. - name: image | type: Image | description: Line item image. - name: id | type: string | description: WixMedia image GUID. - name: url | type: string | description: Image URL. - name: height | type: integer | description: Original image height. - name: width | type: integer | description: Original image width. - name: altText | type: string | description: Image alt text. - name: filename | type: string | description: Image filename. - name: physicalProperties | type: PhysicalProperties | description: Physical properties of the item. When relevant, contains information such as SKU and item weight. - name: weight | type: number | description: Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. - name: sku | type: string | description: Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). - name: shippable | type: boolean | description: Whether this line item is shippable. - name: itemType | type: ItemType | description: Item type. Either a preset type or custom. - ONE-OF: - name: preset | type: ItemTypePreset | description: Preset item type. - enum: UNRECOGNISED, PHYSICAL, DIGITAL, GIFT_CARD, SERVICE - name: custom | type: string | description: Custom item type. When none of the preset types are suitable, specifies the custom type. - name: fulfillerId | type: string | description: Fulfiller GUID. Field is empty when the line item is self-fulfilled. To get fulfillment information, pass the order GUID to [List Fulfillments For Single Order](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/order-fulfillments/list-fulfillments-for-single-order.md). - name: refundQuantity | type: integer | description: Number of items that were refunded. - name: restockQuantity | type: integer | description: Number of items restocked. For a per-location breakdown, see `restockLocations`. - name: price | type: Price | description: Line item price after line item discounts for display purposes. - name: priceBeforeDiscounts | type: Price | description: Line item price before line item discounts for display purposes. Defaults to `price` when not provided. - name: totalPriceBeforeTax | type: Price | description: Total price after discounts, and before tax. - name: totalPriceAfterTax | type: Price | description: Total price after all discounts and tax. - name: paymentOption | type: PaymentOptionType | description: Type of selected payment option for current item. Default: `FULL_PAYMENT_ONLINE` - enum: - FULL_PAYMENT_ONLINE: The entire payment for this item happens as part of the checkout. - FULL_PAYMENT_OFFLINE: The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. - MEMBERSHIP: Payment for this item is done by charging a membership. Any remaining amount not covered by the membership, such as item modifiers, is paid online. - DEPOSIT_ONLINE: Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. - MEMBERSHIP_OFFLINE: Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. - MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER: Item price is charged to online membership. Any remaining amount not covered by the membership, such as item modifiers, is paid offline. - name: taxInfo | type: LineItemTaxInfo | description: Represents all the relevant tax details for a specific line item. - name: taxAmount | type: Price | description: Calculated tax, based on `taxable_amount` and `tax_rate`. - name: taxableAmount | type: Price | description: Amount for which tax is calculated. - name: taxRate | type: string | description: Tax rate %, as a decimal point. - name: taxGroupId | type: string | description: Tax group GUID. - name: taxIncludedInPrice | type: boolean | description: Indicates whether the price already includes tax. - name: taxBreakdown | type: array | description: Tax information for a line item. - name: jurisdiction | type: string | description: Jurisdiction that taxes were calculated for. For example, "New York", or "Quebec". - name: rate | type: string | description: Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is 0.1000. - name: taxAmount | type: Price | description: Amount of tax calculated for this line item. - name: taxType | type: string | description: The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc. - name: taxName | type: string | description: The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc. This name should be explicit enough to allow the merchant to understand what tax was calculated. - name: jurisdictionType | type: JurisdictionType | description: Type of jurisdiction that taxes were calculated for. - enum: UNDEFINED, COUNTRY, STATE, COUNTY, CITY, SPECIAL - name: nonTaxableAmount | type: Price | description: Non-taxable amount of the line item price. - name: taxableAmount | type: Price | description: Taxable amount of the line item price. - name: digitalFile | type: DigitalFile | description: Digital file identifier, relevant only for items with type DIGITAL. - name: fileId | type: string | description: GUID of the secure file in media. - name: link | type: string | description: Link will exist after the digital links have been generated on the order. - name: expirationDate | type: string | description: Link expiration time and date. - name: subscriptionInfo | type: SubscriptionInfo | description: Subscription info. - name: id | type: string | description: Subscription GUID. - name: cycleNumber | type: integer | description: Subscription cycle. For example, if this order is for the 3rd cycle of a subscription, value will be `3`. - name: subscriptionSettings | type: SubscriptionSettings | description: Subscription detailed information. - name: frequency | type: SubscriptionFrequency | description: Frequency of recurring payment. - enum: UNDEFINED, DAY, WEEK, MONTH, YEAR - name: interval | type: integer | description: Number of frequency units in a billing cycle. For example, frequency `MONTH` with interval `3` means billing every 3 months. - name: autoRenewal | type: boolean | description: Whether subscription is renewed automatically at the end of each period. - name: billingCycles | type: integer | description: Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`. - name: enableCustomerCancellation | type: boolean | description: Whether to allow the customer to cancel the subscription. - name: freeTrialPeriod | type: FreeTrialPeriod | description: Period until first cycle starts. If None => no free trial - name: frequency | type: SubscriptionFrequency | description: Frequency of period. Values: DAY, WEEK, MONTH, YEAR - name: interval | type: integer | description: Number of frequency units in the free trial period. For example, frequency `MONTH` with interval `3` means a 3-month free trial. - name: chargesDescription | type: string | description: Description of the charges that will be applied for subscription. - name: priceDescription | type: PriceDescription | description: Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". - name: depositAmount | type: Price | description: Item's price amount to be charged during checkout. Relevant for items with a `paymentOption` value of `"DEPOSIT_ONLINE"`. - name: locations | type: array | description: Line item locations. The location's total quantity must not exceed the line item quantity. - name: id | type: string | description: Location id in the associated owner app. - name: quantity | type: integer | description: Quantity for specific location. - name: name | type: string | description: Location name. - name: lineItemPrice | type: Price | description: Total price **after** catalog discounts and line item discounts. - name: taxableAddress | type: TaxableAddress | description: Address used for tax calculation. - ONE-OF: - name: addressType | type: TaxableAddressType | description: taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. - enum: BUSINESS, BILLING, SHIPPING - name: priceUndetermined | type: boolean | description: Whether the price is not yet defined, and will be updated after the order is created. Default: `false` - name: extendedFields | type: ExtendedFields | description: Custom extended fields for the line item object. [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md) 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). - name: modifierGroups | type: array | description: Modifier groups that were added to the item. - name: shippingInfo | type: ShippingDetails | description: Shipping info. Includes details about changes when relevant. - ONE-OF: - name: added | type: boolean | description: Whether shipping info was added as part of the draft. - name: changedDetails | type: ShippingChangedDetails | description: Shipping info before the change. - name: shippingInfoBeforeChange | type: ShippingInformation | description: Shipping info before the change. - name: carrierId | type: string | description: App Def Id of external provider which was a source of shipping info - name: code | type: string | description: Unique code (or GUID) of selected shipping option. For example, `"usps_std_overnight"`. - name: title | type: string | description: Shipping option title. For example, `"USPS Standard Overnight Delivery"`, `"Standard"` or `"First-Class Package International"`. - name: logistics | type: DeliveryLogistics | description: Shipping logistics. - ONE-OF: - name: shippingDestination | type: AddressWithContact | description: Shipping destination address and contact details. For pickup orders, this contains the pickup location address, not the recipient's address. - name: address | type: Address | description: Address. - name: country | type: string | description: Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. - name: subdivision | type: string | description: Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. - name: city | type: string | description: City name. - name: postalCode | type: string | description: Postal or zip code. - name: streetAddress | type: StreetAddress | description: Street address. - name: number | type: string | description: Street number. - name: name | type: string | description: Street name. - name: addressLine | type: string | description: Main address line (usually street name and number). - name: addressLine2 | type: string | description: Free text providing more detailed address info. Usually contains apt, suite, floor. - name: geocode | type: AddressLocation | description: Geocode object containing latitude and longitude coordinates. - name: latitude | type: number | description: Address latitude. - name: longitude | type: number | description: Address longitude. - name: countryFullname | type: string | description: Country's full name. - name: subdivisionFullname | type: string | description: Subdivision full-name. - name: contactDetails | type: FullAddressContactDetails | description: Contact details. - name: firstName | type: string | description: First name. - name: lastName | type: string | description: Last name. - name: phone | type: string | description: Phone number. - name: company | type: string | description: Company name. - name: vatId | type: VatId | description: Tax information (for Brazil only). If GUID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. - name: id | type: string | description: Customer's tax GUID. - name: type | type: VatType | description: Tax type. Supported values: + `CPF`: for individual tax payers + `CNPJ`: for corporations - enum: - UNSPECIFIED: - CPF: CPF - for individual tax payers. - CNPJ: CNPJ - for corporations - name: pickupDetails | type: PickupDetails | description: Pickup details for store pickup or pickup point orders. - name: address | type: PickupAddress | description: Pickup address. - name: country | type: string | description: Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. - name: subdivision | type: string | description: Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. - name: city | type: string | description: City name. - name: postalCode | type: string | description: Postal or zip code. - name: streetAddress | type: StreetAddress | description: Street address object, with number, name, and apartment number in separate fields. - name: addressLine | type: string | description: Main address line (usually street name and number). - name: addressLine2 | type: string | description: Free text providing more detailed address info. Usually contains apt, suite, floor. - name: countryFullname | type: string | description: Country's full name. - name: subdivisionFullname | type: string | description: Subdivision full-name. - name: pickupMethod | type: PickupMethod | description: Pickup method - enum: STORE_PICKUP, PICKUP_POINT - name: deliveryTime | type: string | description: Expected delivery time in free text. For example, `"3-5 business days"`. - name: instructions | type: string | description: Instructions for the carrier. For example, `"Please knock on the door. If unanswered, please call contact number."`. - name: deliveryTimeSlot | type: DeliveryTimeSlot | description: Expected delivery time slot with start and end times. - name: from | type: string | description: Delivery slot starting time. - name: to | type: string | description: Delivery slot ending time. - name: cost | type: ShippingPrice | description: Shipping costs. - name: price | type: Price | description: Shipping price for display purposes. - name: totalPriceBeforeTax | type: Price | description: Total price of shipping after discounts (when relevant), and before tax. - name: totalPriceAfterTax | type: Price | description: Shipping price after all discounts (if any exist), and after tax. - name: taxInfo | type: LineItemTaxInfo | description: Represents all the relevant tax details for a shipping. - name: discount | type: Price | description: Shipping discount before tax. - name: region | type: ShippingRegion | description: Shipping region. - name: name | type: string | description: Name of shipping region. For example, `"Metropolitan London"`, or `"Outer Melbourne suburbs"`. - name: removed | type: boolean | description: Whether shipping info was removed as part of the draft. - name: shippingInfo | type: ShippingInformation | description: Selected shipping details. - name: additionalFees | type: array | description: Additional fees. Includes details about the source, and whether the additional fee is applied to the order. - name: additionalFee | type: AdditionalFee | description: Additional fee. - name: code | type: string | description: Additional fee's unique code for future processing. - name: name | type: string | description: Name of additional fee. - name: price | type: Price | description: Additional fee's price. - name: taxInfo | type: LineItemTaxInfo | description: Represents all the relevant tax details for additional fee. - name: providerAppId | type: string | description: SPI implementer's `appId`. - name: priceBeforeTax | type: Price | description: Additional fee's price before tax. - name: priceAfterTax | type: Price | description: Additional fee's price after tax. - name: id | type: string | description: Additional fee's id. - name: lineItemIds | type: array | description: Optional - Line items associated with this additional fee. If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order. - name: source | type: AdditionalFeeSource | description: Specifies the entity that added the additional fee. - enum: - SERVICE_PLUGIN: The additional fee was added by an additional fee service plugin. - ITEM: The additional fee was added to the item by a catalog or custom line item. - MANUAL: The additional fee was added manually on request. - SHIPPING: The additional fee was added by the shipping provider. - PLATFORM: The additional fee was added by the Wix eCommerce platform. - name: taxDetails | type: TaxDetails | description: Tax details related to the additional fee. - name: taxable | type: boolean | description: Whether the additional fee is taxable. - name: taxGroupId | type: string | description: Optional tax group GUID to use when calculating tax for this additional fee. - name: source | type: SourceType | description: Source of the additional fee. Supported values: + `ORIGINAL_ORDER`: This additional fee is part of the original order. + `AUTOMATIC`: User added a catalog item which is configured to have an additional fee. + `CUSTOM`: This additional fee was created by the Create Custom Additional Fees method. - enum: - ORIGINAL_ORDER: Part of the original order. - AUTOMATIC: Added automatically, as the result of recalculation caused by changes in draft order. - CUSTOM: Added manually to draft order. - name: applied | type: boolean | description: Whether this additional fee is applied to the order. - name: discounts | type: array | description: Discounts. Includes details about the source, and whether the discount is applied to the order. - name: discount | type: AppliedDiscount | description: Discount details. - ONE-OF: - name: coupon | type: Coupon | description: Coupon applied by the customer. - name: id | type: string | description: Coupon GUID. - name: code | type: string | description: Coupon code. - name: name | type: string | description: Coupon name. - name: amount | type: Price | description: Coupon value. - name: merchantDiscount | type: MerchantDiscount | description: Discount applied manually by the merchant. - ONE-OF: - name: discountReason | type: DiscountReason | description: Predefined discount reason. - enum: - UNSPECIFIED: Unknown discount reason. - EXCHANGED_ITEMS: Balance adjustment resulting from an item exchange. - BILLING_ADJUSTMENT: Proportional discount for a shortened subscription billing cycle. Applied when a subscription's billing date is moved earlier, reducing the cycle length. - name: description | type: string | description: Custom discount description as free text. - name: amount | type: Price | description: Discount amount. - name: discountRule | type: DiscountRule | description: Automatic discount applied by the system based on configured discount rules. - name: id | type: string | description: Discount rule GUID - name: name | type: DiscountRuleName | description: Discount rule name - name: original | type: string | description: Original discount rule name (in site's default language). - name: translated | type: string | description: Translated discount rule name according to buyer language. Defaults to `original` when not provided. - name: amount | type: Price | description: Discount value. - name: discountType | type: DiscountType | description: - enum: - GLOBAL: Discount applies to the entire order. - SPECIFIC_ITEMS: Discount applies to specific items. - SHIPPING: Discount applies to shipping. For example, free shipping. - name: id | type: string | description: Discount GUID. - name: lineItemDiscounts | type: array | description: Line items the discount applies to, including the discount amount for each. - name: id | type: string | description: Line item GUID. - name: totalDiscount | type: Price | description: Total discount amount for this line item. - name: source | type: SourceType | description: Source of the discount. Supported values: + `ORIGINAL_ORDER`: This discount is part of the original order. + `CUSTOM`: This discount was created by the Create Custom Discounts method. - name: applied | type: boolean | description: Whether this discount is applied to the order. - name: createdDate | type: string | description: Date and time the draft order was created. - name: updatedDate | type: string | description: Date and time the draft order was updated. - name: createdBy | type: CreatedBy | description: Identity of the draft order's initiator. - ONE-OF: - name: userId | type: string | description: User GUID. When the draft order was created by a Wix user. - name: appId | type: string | description: App GUID. When the draft order was created by an app. - name: status | type: EditingStatus | description: Draft order status. - enum: - DRAFT: Draft order is being edited. - COMMITTED: Draft order has been committed - No further modifications allowed. Draft orders with status 'COMMITTED' cannot be deleted. - name: weightUnit | type: WeightUnit | description: Weight measurement unit. Defaults to the site's weight unit. - enum: - UNSPECIFIED_WEIGHT_UNIT: Weight unit can't be classified due to an error. - KG: Kilograms. - LB: Pounds. - name: currency | type: string | description: Currency used for pricing. - name: priceSummary | type: PriceSummary | description: Price summary. - name: subtotal | type: Price | description: Subtotal of all line items, before discounts and before tax. - name: shipping | type: Price | description: Total shipping price, before discounts and before tax. - name: tax | type: Price | description: Total tax applied to the order. - name: discount | type: Price | description: Total discount amount applied to the order. - name: total | type: Price | description: Order's total price after discounts and tax. - name: totalAdditionalFees | type: Price | description: Total additional fees before tax. - name: balanceSummary | type: BalanceSummary | description: Balance summary. - name: balance | type: Balance | description: Amount left to pay for the order to be considered paid. - name: amount | type: string | description: Balance amount. A negative `amount` represents the amount to be refunded. This can happen due to overcharging or the order being modified after a payment has been made. - name: formattedAmount | type: string | description: Amount formatted with currency symbol. - name: paid | type: Price | description: Sum of all approved and successful payments. The value includes payments that have subsequently been fully or partially refunded. - name: refunded | type: Price | description: Sum of all successfully refunded payments. - name: authorized | type: Price | description: Sum of all authorized payments. - name: platformFees | type: Price | description: Total platform fees charged across all payments. This reflects amounts collected, which may differ from the expected fees in `draftOrder.platformFeeSummary`. - name: totalMinusPlatformFees | type: Price | description: Order total after deducting platform fees. Represents the net amount payable to the merchant. - name: commitSettings | type: DraftOrderCommitSettings | description: Side effects to perform on commit. - name: sendNotificationsToBuyer | type: boolean | description: Whether to send notifications to the buyer. Default: `true` - name: sendNotificationsToBusiness | type: boolean | description: Whether to send notifications to the business. Default: `true` - name: addActivitiesToOrder | type: boolean | description: Whether to add activities to the order. Default: `true` - name: sendNotificationsToCustomFulfillers | type: boolean | description: Whether to send email notifications to custom fulfillers when there is a change in the shippable items they fulfill. Default: `true` - name: updateInventory | type: array | description: Line item GUIDs for which to perform an inventory change. When not provided, inventory will not change. - name: lineItemId | type: string | description: Line item GUID. - name: memberId | type: string | description: Member GUID (if order created by a member). - name: purchaseFlowId | type: string | description: Persistent GUID that correlates between the various eCommerce elements: cart, checkout, and order. - name: recipientInfo | type: RecipientInfoDetails | description: Order recipient address and contact details. This field may differ from the address in `shippingInfo.logistics` when: + The chosen shipping option is pickup point or store pickup. + No shipping option is selected. - ONE-OF: - name: added | type: boolean | description: Indicates that recipient information was added during draft. - name: changedDetails | type: RecipientInfoChangedDetails | description: Indicates that recipient information was changed. Contains recipient information before draft. - name: recipientInfoBeforeChange | type: AddressWithContact | description: Order recipient address and contact details before draft. - name: removed | type: boolean | description: Indicates that recipient information was removed during draft. - name: recipientInfo | type: AddressWithContact | description: Order recipient address and contact details. - name: taxInfo | type: OrderTaxInfo | description: Tax information. - name: totalTax | type: Price | description: Calculated tax, added from line items. - name: taxBreakdown | type: array | description: The summary of the tax breakdown for all the line items. It will hold for each tax name, the aggregated tax amount paid for it and the tax rate. - name: taxName | type: string | description: The name of the tax against which this tax amount was calculated. - name: taxType | type: string | description: The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws. - name: jurisdiction | type: string | description: The name of the jurisdiction in which this tax detail applies. - name: jurisdictionType | type: JurisdictionType | description: The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). - name: rate | type: string | description: The rate at which this tax detail was calculated. - name: aggregatedTaxAmount | type: Price | description: The sum of all the tax from line items that calculated by the tax identifiers. - name: taxExempt | type: boolean | description: Whether the order is exempt from tax calculations. Default: `false` - name: extendedFields | type: ExtendedFields | description: Custom field data for the draft order object. [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls. - name: buyerDetails | type: BuyerDetails | description: Buyer information. Includes details about changes when relevant. - ONE-OF: - name: added | type: boolean | description: Indicates that buyer information was added during draft. - name: changedDetails | type: BuyerChangedDetails | description: Indicates that buyer information was changed. Contains buyer information before draft. - name: buyerInfoBeforeChange | type: BuyerInfo | description: Buyer information before draft. - ONE-OF: - name: visitorId | type: string | description: Visitor GUID. Returned when the buyer isn't a logged-in site member. - name: memberId | type: string | description: Member GUID. Returned when the buyer is a logged-in site member. - name: contactId | type: string | description: Contact GUID. Automatically created if one doesn't exist. For more information, see [Contacts API](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts/contact-v4/introduction.md). - name: email | type: string | description: Buyer's email address. - name: removed | type: boolean | description: Indicates that buyer information was removed during draft. - name: buyerInfo | type: BuyerInfo | description: Buyer information. - name: billingDetails | type: BillingDetails | description: Billing address and contact details. Includes details about changes when relevant. - ONE-OF: - name: added | type: boolean | description: Indicates that billing information was added during draft. - name: changedDetails | type: BillingChangedDetails | description: Indicates that billing information was changed. Contains billing information before draft. - name: billingInfoBeforeChange | type: AddressWithContact | description: Billing address and contact details before draft. - name: removed | type: boolean | description: Indicates that billing information was removed during draft. - name: billingInfo | type: AddressWithContact | description: Billing address and contact details. - name: businessLocationDetails | type: BusinessLocationDetails | description: Order business location. Includes details about changes when relevant. - ONE-OF: - name: added | type: boolean | description: Indicates that business location was added during draft. - name: changedDetails | type: BusinessLocationChangedDetails | description: Indicates that business location was changed. Contains business location before draft. - name: businessLocationBeforeChange | type: Location | description: Business location before draft. - name: id | type: string | description: Location GUID. Learn more about the [Wix Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction.md). - name: name | type: string | description: Location name. - name: removed | type: boolean | description: Indicates that business location was removed during draft. - name: businessLocation | type: Location | description: Business location. - name: platformFeeSummary | type: PlatformFeeSummary | description: Summary of platform fees for this draft order, including totals by charge type and a breakdown of individual fees. - name: total | type: Price | description: Total sum of all platform fees. - name: totalPassOn | type: Price | description: Total amount of platform fees with `PASS_ON` charge type. - name: totalAbsorbed | type: Price | description: Total amount of platform fees with `ABSORBED` charge type. - name: fees | type: array | description: Specific information about each platform fee. - name: name | type: TranslatableString | description: Platform fee name. - name: amount | type: Price | description: Platform fee amount. - name: lineItemId | type: string | description: GUID of the line item the platform fee applies to. - name: chargeType | type: ChargeType | description: Platform fee charge type. - enum: - PASS_ON: Platform fee passed on to buyer. This type increases the order total, and is visible to the buyer and merchant as an additional fee. - ABSORBED: Platform fee absorbed by merchant. This type does not increase the order total, and is only visible to the merchant. - name: percentageRate | type: string | description: Percentage rate charged as platform fee. The fee rate percentage expressed as a decimal fraction between 0 and 1. For example, `0.05` for 5%. - name: shippingOptions | type: array | description: Shipping options. - name: carrierId | type: string | description: Carrier GUID. - name: code | type: string | description: Unique code that acts as an GUID for a shipping rate. For example, `"usps_std_overnight"`. - name: title | type: string | description: Shipping rate title. For example, `"USPS Standard Overnight Delivery"`, `"Standard"`, or `"First-Class Package International"`. - name: logistics | type: DeliveryLogistics | description: Shipping logistics. - name: deliveryTime | type: string | description: Expected delivery time in free text. For example, `"3-5 business days"`. - name: instructions | type: string | description: Instructions for delivery. For example, "Please arrive during business hours." - name: pickupDetails | type: PickupDetails | description: Additional pickup details. - name: address | type: Address | description: Pickup address. - name: pickupMethod | type: PickupMethod | description: Pickup method. - enum: - STORE_PICKUP: Store pickup. - PICKUP_POINT: Pickup point. - name: deliveryTimeSlot | type: DeliveryTimeSlot | description: Expected delivery time slot. - name: from | type: string | description: Delivery time slot start time. - name: to | type: string | description: Delivery time slot end time. - name: cost | type: ShippingPrice | description: Shipping cost. - name: price | type: Price | description: Shipping price. Must align with the [currency's decimal separator](https://en.wikipedia.org/wiki/ISO_4217#Active_codes). - name: currency | type: string | description: Currency of the shipping price as a 3-letter [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217). Must align with the `currency` passed to the method. - name: calculationErrors | type: CalculationErrors | description: Errors that occurred during calculation. - ONE-OF: - name: generalShippingCalculationError | type: Details | description: General shipping calculation error. - ONE-OF: - name: applicationError | type: ApplicationError | description: - name: code | type: string | description: Error code. - name: description | type: string | description: Description of the error. - name: data | type: object | description: Data related to the error. - name: validationError | type: ValidationError | description: - name: fieldViolations | type: array | description: - name: field | type: string | description: - name: description | type: string | description: - name: violatedRule | type: RuleType | description: - enum: VALIDATION, OTHER, MAX, MIN, MAX_LENGTH, MIN_LENGTH, MAX_SIZE, MIN_SIZE, FORMAT, DECIMAL_LTE, DECIMAL_GTE, DECIMAL_LT, DECIMAL_GT, DECIMAL_MAX_SCALE, INVALID_ENUM_VALUE, REQUIRED_FIELD, FIELD_NOT_ALLOWED, ONE_OF_ALIGNMENT, EXACT_LENGTH, EXACT_SIZE, REQUIRED_ONE_OF_FIELD - name: ruleName | type: string | description: applicable when violated_rule=OTHER - name: data | type: object | description: - name: systemError | type: SystemError | description: - name: errorCode | type: string | description: Error code. - name: carrierErrors | type: CarrierErrors | description: Carrier errors. - name: errors | type: array | description: Carrier errors. - name: carrierId | type: string | description: Carrier GUID. - name: error | type: Details | description: Error details. - name: taxCalculationError | type: Details | description: Tax calculation error. - name: orderValidationErrors | type: array | description: Order validation errors. Possible Errors: HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: DRAFT_ORDER_DOES_NOT_EXIST | Description: Couldn't find the draft order. HTTP Code: 409 | Status Code: ALREADY_EXISTS | Application Code: DRAFT_ORDER_ALREADY_COMMITTED | Description: Draft order was already committed. HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: ADDITIONAL_FEE_REMOVE_NOT_SUPPORTED | Description: Can't remove additional fee because it wasn't added as part of the draft order. HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: ADDITIONAL_FEE_NOT_FOUND | Description: Couldn't find the additional fee. ``` ### Examples ### Delete Custom Additional Fees Delete custom additional fees from a draft order. ```curl curl -X POST \ 'https://www.wixapis.com/ecom/v1/draft-orders/517ccb7b-efcb-41da-9876-03c7b7cceb51/delete-custom-additional-fees' \ -H 'Authorization: ' \ -H 'Content-type: application/json' \ -d '{ "customAdditionalFees": [ "96526efc-a549-4ff9-8033-d40f68545edc" ] }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.orders.DraftOrders.deleteCustomAdditionalFees(draftOrderId, customAdditionalFees) Description: Removes custom additional fees from a draft order. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: draftOrderId, customAdditionalFees Method parameters: param name: customAdditionalFees | type: array | description: IDs of the additional fees to remove from the draft order. | required: true param name: draftOrderId | type: string | description: Draft order GUID. | required: true Return type: PROMISE - name: calculatedDraftOrder | type: CalculatedDraftOrder | description: Draft order calculated with the latest changes. - name: draftOrder | type: DraftOrder | description: Draft order. - name: _id | type: string | description: Draft order GUID. - name: orderId | type: string | description: GUID of the order this draft commits to. - name: lineItems | type: array | description: Line items. Includes details about changes when relevant. - ONE-OF: - name: added | type: boolean | description: Whether the line item was added as part of the draft. - name: changedDetails | type: ItemChangedDetails | description: Line item fields before the change. - name: quantityBeforeChange | type: integer | description: Line item quantity before change. - name: priceBeforeChange | type: Price | description: Line item price before change. - name: amount | type: string | description: Amount. - name: formattedAmount | type: string | description: Amount formatted with currency symbol. - name: priceDescriptionBeforeChange | type: PriceDescription | description: Line item price description before change. - name: original | type: string | description: __Required.__ Price description in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). - name: translated | type: string | description: Price description translated into the buyer's language. Default: Same as `original`. - name: modifierGroupsBeforeChange | type: array | description: Line item modifier groups before change. - name: _id | type: string | description: Modifier group GUID. - name: name | type: TranslatableString | description: Modifier group name. - name: original | type: string | description: __Required.__ String in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). Min: 1 character. Max: 200 characters. - name: translated | type: string | description: String translated into the buyer's language. Min: 1 character. Max: 400 characters. Default: Same as `original`. - name: modifiers | type: array | description: List of modifiers in this group. - name: _id | type: string | description: Modifier GUID. - name: quantity | type: integer | description: The quantity of this modifier. - name: label | type: TranslatableString | description: Primary display label for the modifier. - name: details | type: TranslatableString | description: Additional details. - name: price | type: Price | description: The price of the modifier. - name: removed | type: boolean | description: Whether the line item was removed as part of the draft. - name: lineItem | type: OrderLineItem | description: Line item details after applied changes. - name: _id | type: string | description: Line item GUID. - name: productName | type: ProductName | description: Item name. + Stores - `product.name` + Bookings - `service.info.name` + Events - `ticket.name` - name: original | type: string | description: __Required.__ Item name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). Min: 1 character. Max: 200 characters. - name: translated | type: string | description: Item name translated into the buyer's language. Min: 1 character. Max: 400 characters. Default: Same as `original`. - name: catalogReference | type: CatalogReference | description: References to the line item's origin catalog. Empty for custom line items. - name: catalogItemId | type: string | description: GUID of the item within the catalog it belongs to. - name: appId | type: string | description: GUID of the app providing the catalog. You can get your app's GUID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/). For items from Wix catalogs, the following values always apply: + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"` + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"` - name: options | type: object | description: Additional item details in `key:value` pairs. Use this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items. For Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration.md) or [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration.md), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction.md). - name: quantity | type: integer | description: Line item quantity. - name: totalDiscount | type: Price | description: Total discount for this line item's entire quantity. - name: descriptionLines | type: array | description: Line item description lines. Used for display purposes for the cart, checkout and order. - ONE-OF: - name: plainText | type: PlainTextValue | description: Description line plain text value. - name: original | type: string | description: Description line plain text value in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). - name: translated | type: string | description: Description line plain text value translated into the buyer's language. Default: Same as `original`. - name: colorInfo | type: Color | description: Description line color value. - name: original | type: string | description: Description line color name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). - name: translated | type: string | description: Description line color name translated into the buyer's language. Default: Same as `original`. - name: code | type: string | description: HEX or RGB color code for display. - name: name | type: DescriptionLineName | description: Description line name. - name: original | type: string | description: Description line name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). - name: translated | type: string | description: Description line name translated into the buyer's language. Default: Same as `original`. - name: image | type: string | description: Line item image. - name: physicalProperties | type: PhysicalProperties | description: Physical properties of the item. When relevant, contains information such as SKU and item weight. - name: weight | type: number | description: Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. - name: sku | type: string | description: Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). - name: shippable | type: boolean | description: Whether this line item is shippable. - name: itemType | type: ItemType | description: Item type. Either a preset type or custom. - ONE-OF: - name: preset | type: ItemTypePreset | description: Preset item type. - enum: UNRECOGNISED, PHYSICAL, DIGITAL, GIFT_CARD, SERVICE - name: custom | type: string | description: Custom item type. When none of the preset types are suitable, specifies the custom type. - name: fulfillerId | type: string | description: Fulfiller GUID. Field is empty when the line item is self-fulfilled. To get fulfillment information, pass the order GUID to [List Fulfillments For Single Order](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/order-fulfillments/list-fulfillments-for-single-order.md). - name: refundQuantity | type: integer | description: Number of items that were refunded. - name: restockQuantity | type: integer | description: Number of items restocked. For a per-location breakdown, see `restockLocations`. - name: price | type: Price | description: Line item price after line item discounts for display purposes. - name: priceBeforeDiscounts | type: Price | description: Line item price before line item discounts for display purposes. Defaults to `price` when not provided. - name: totalPriceBeforeTax | type: Price | description: Total price after discounts, and before tax. - name: totalPriceAfterTax | type: Price | description: Total price after all discounts and tax. - name: paymentOption | type: PaymentOptionType | description: Type of selected payment option for current item. Default: `FULL_PAYMENT_ONLINE` - enum: - FULL_PAYMENT_ONLINE: The entire payment for this item happens as part of the checkout. - FULL_PAYMENT_OFFLINE: The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. - MEMBERSHIP: Payment for this item is done by charging a membership. Any remaining amount not covered by the membership, such as item modifiers, is paid online. - DEPOSIT_ONLINE: Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. - MEMBERSHIP_OFFLINE: Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. - MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER: Item price is charged to online membership. Any remaining amount not covered by the membership, such as item modifiers, is paid offline. - name: taxInfo | type: LineItemTaxInfo | description: Represents all the relevant tax details for a specific line item. - name: taxAmount | type: Price | description: Calculated tax, based on `taxable_amount` and `tax_rate`. - name: taxableAmount | type: Price | description: Amount for which tax is calculated. - name: taxRate | type: string | description: Tax rate %, as a decimal point. - name: taxGroupId | type: string | description: Tax group GUID. - name: taxIncludedInPrice | type: boolean | description: Indicates whether the price already includes tax. - name: taxBreakdown | type: array | description: Tax information for a line item. - name: jurisdiction | type: string | description: Jurisdiction that taxes were calculated for. For example, "New York", or "Quebec". - name: rate | type: string | description: Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is 0.1000. - name: taxAmount | type: Price | description: Amount of tax calculated for this line item. - name: taxType | type: string | description: The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc. - name: taxName | type: string | description: The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc. This name should be explicit enough to allow the merchant to understand what tax was calculated. - name: jurisdictionType | type: JurisdictionType | description: Type of jurisdiction that taxes were calculated for. - enum: UNDEFINED, COUNTRY, STATE, COUNTY, CITY, SPECIAL - name: nonTaxableAmount | type: Price | description: Non-taxable amount of the line item price. - name: taxableAmount | type: Price | description: Taxable amount of the line item price. - name: digitalFile | type: DigitalFile | description: Digital file identifier, relevant only for items with type DIGITAL. - name: fileId | type: string | description: GUID of the secure file in media. - name: link | type: string | description: Link will exist after the digital links have been generated on the order. - name: expirationDate | type: Date | description: Link expiration time and date. - name: subscriptionInfo | type: SubscriptionInfo | description: Subscription info. - name: _id | type: string | description: Subscription GUID. - name: cycleNumber | type: integer | description: Subscription cycle. For example, if this order is for the 3rd cycle of a subscription, value will be `3`. - name: subscriptionSettings | type: SubscriptionSettings | description: Subscription detailed information. - name: frequency | type: SubscriptionFrequency | description: Frequency of recurring payment. - enum: UNDEFINED, DAY, WEEK, MONTH, YEAR - name: interval | type: integer | description: Number of frequency units in a billing cycle. For example, frequency `MONTH` with interval `3` means billing every 3 months. - name: autoRenewal | type: boolean | description: Whether subscription is renewed automatically at the end of each period. - name: billingCycles | type: integer | description: Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`. - name: enableCustomerCancellation | type: boolean | description: Whether to allow the customer to cancel the subscription. - name: freeTrialPeriod | type: FreeTrialPeriod | description: Period until first cycle starts. If None => no free trial - name: frequency | type: SubscriptionFrequency | description: Frequency of period. Values: DAY, WEEK, MONTH, YEAR - name: interval | type: integer | description: Number of frequency units in the free trial period. For example, frequency `MONTH` with interval `3` means a 3-month free trial. - name: chargesDescription | type: string | description: Description of the charges that will be applied for subscription. - name: priceDescription | type: PriceDescription | description: Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". - name: depositAmount | type: Price | description: Item's price amount to be charged during checkout. Relevant for items with a `paymentOption` value of `"DEPOSIT_ONLINE"`. - name: locations | type: array | description: Line item locations. The location's total quantity must not exceed the line item quantity. - name: _id | type: string | description: Location id in the associated owner app. - name: quantity | type: integer | description: Quantity for specific location. - name: name | type: string | description: Location name. - name: lineItemPrice | type: Price | description: Total price **after** catalog discounts and line item discounts. - name: taxableAddress | type: TaxableAddress | description: Address used for tax calculation. - ONE-OF: - name: addressType | type: TaxableAddressType | description: taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. - enum: BUSINESS, BILLING, SHIPPING - name: priceUndetermined | type: boolean | description: Whether the price is not yet defined, and will be updated after the order is created. Default: `false` - name: extendedFields | type: ExtendedFields | description: Custom extended fields for the line item object. [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md) 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). - name: modifierGroups | type: array | description: Modifier groups that were added to the item. - name: shippingInfo | type: ShippingDetails | description: Shipping info. Includes details about changes when relevant. - ONE-OF: - name: added | type: boolean | description: Whether shipping info was added as part of the draft. - name: changedDetails | type: ShippingChangedDetails | description: Shipping info before the change. - name: shippingInfoBeforeChange | type: ShippingInformation | description: Shipping info before the change. - name: carrierId | type: string | description: App Def Id of external provider which was a source of shipping info - name: code | type: string | description: Unique code (or GUID) of selected shipping option. For example, `"usps_std_overnight"`. - name: title | type: string | description: Shipping option title. For example, `"USPS Standard Overnight Delivery"`, `"Standard"` or `"First-Class Package International"`. - name: logistics | type: DeliveryLogistics | description: Shipping logistics. - ONE-OF: - name: shippingDestination | type: AddressWithContact | description: Shipping destination address and contact details. For pickup orders, this contains the pickup location address, not the recipient's address. - name: address | type: Address | description: Address. - name: streetAddress | type: StreetAddress | description: none - name: name | type: string | description: none - name: number | type: string | description: none - name: city | type: string | description: none - name: subdivision | type: string | description: none - name: country | type: string | description: none - name: postalCode | type: string | description: none - name: addressLine2 | type: string | description: none - name: contactDetails | type: FullAddressContactDetails | description: Contact details. - name: firstName | type: string | description: First name. - name: lastName | type: string | description: Last name. - name: phone | type: string | description: Phone number. - name: company | type: string | description: Company name. - name: vatId | type: VatId | description: Tax information (for Brazil only). If GUID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. - name: _id | type: string | description: Customer's tax GUID. - name: type | type: VatType | description: Tax type. Supported values: + `CPF`: for individual tax payers + `CNPJ`: for corporations - enum: - UNSPECIFIED: - CPF: CPF - for individual tax payers. - CNPJ: CNPJ - for corporations - name: pickupDetails | type: PickupDetails | description: Pickup details for store pickup or pickup point orders. - name: address | type: PickupAddress | description: Pickup address. - name: streetAddress | type: StreetAddress | description: none - name: city | type: string | description: none - name: subdivision | type: string | description: none - name: country | type: string | description: none - name: postalCode | type: string | description: none - name: addressLine2 | type: string | description: none - name: pickupMethod | type: PickupMethod | description: Pickup method - enum: STORE_PICKUP, PICKUP_POINT - name: deliveryTime | type: string | description: Expected delivery time in free text. For example, `"3-5 business days"`. - name: instructions | type: string | description: Instructions for the carrier. For example, `"Please knock on the door. If unanswered, please call contact number."`. - name: deliveryTimeSlot | type: DeliveryTimeSlot | description: Expected delivery time slot with start and end times. - name: from | type: Date | description: Delivery slot starting time. - name: to | type: Date | description: Delivery slot ending time. - name: cost | type: ShippingPrice | description: Shipping costs. - name: price | type: Price | description: Shipping price for display purposes. - name: totalPriceBeforeTax | type: Price | description: Total price of shipping after discounts (when relevant), and before tax. - name: totalPriceAfterTax | type: Price | description: Shipping price after all discounts (if any exist), and after tax. - name: taxInfo | type: LineItemTaxInfo | description: Represents all the relevant tax details for a shipping. - name: discount | type: Price | description: Shipping discount before tax. - name: region | type: ShippingRegion | description: Shipping region. - name: name | type: string | description: Name of shipping region. For example, `"Metropolitan London"`, or `"Outer Melbourne suburbs"`. - name: removed | type: boolean | description: Whether shipping info was removed as part of the draft. - name: shippingInfo | type: ShippingInformation | description: Selected shipping details. - name: additionalFees | type: array | description: Additional fees. Includes details about the source, and whether the additional fee is applied to the order. - name: additionalFee | type: AdditionalFee | description: Additional fee. - name: code | type: string | description: Additional fee's unique code for future processing. - name: name | type: string | description: Name of additional fee. - name: price | type: Price | description: Additional fee's price. - name: taxInfo | type: LineItemTaxInfo | description: Represents all the relevant tax details for additional fee. - name: providerAppId | type: string | description: SPI implementer's `appId`. - name: priceBeforeTax | type: Price | description: Additional fee's price before tax. - name: priceAfterTax | type: Price | description: Additional fee's price after tax. - name: _id | type: string | description: Additional fee's id. - name: lineItemIds | type: array | description: Optional - Line items associated with this additional fee. If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order. - name: source | type: AdditionalFeeSource | description: Specifies the entity that added the additional fee. - enum: - SERVICE_PLUGIN: The additional fee was added by an additional fee service plugin. - ITEM: The additional fee was added to the item by a catalog or custom line item. - MANUAL: The additional fee was added manually on request. - SHIPPING: The additional fee was added by the shipping provider. - PLATFORM: The additional fee was added by the Wix eCommerce platform. - name: taxDetails | type: TaxDetails | description: Tax details related to the additional fee. - name: taxable | type: boolean | description: Whether the additional fee is taxable. - name: taxGroupId | type: string | description: Optional tax group GUID to use when calculating tax for this additional fee. - name: source | type: SourceType | description: Source of the additional fee. Supported values: + `ORIGINAL_ORDER`: This additional fee is part of the original order. + `AUTOMATIC`: User added a catalog item which is configured to have an additional fee. + `CUSTOM`: This additional fee was created by the Create Custom Additional Fees method. - enum: - ORIGINAL_ORDER: Part of the original order. - AUTOMATIC: Added automatically, as the result of recalculation caused by changes in draft order. - CUSTOM: Added manually to draft order. - name: applied | type: boolean | description: Whether this additional fee is applied to the order. - name: discounts | type: array | description: Discounts. Includes details about the source, and whether the discount is applied to the order. - name: discount | type: AppliedDiscount | description: Discount details. - ONE-OF: - name: coupon | type: Coupon | description: Coupon applied by the customer. - name: _id | type: string | description: Coupon GUID. - name: code | type: string | description: Coupon code. - name: name | type: string | description: Coupon name. - name: amount | type: Price | description: Coupon value. - name: merchantDiscount | type: MerchantDiscount | description: Discount applied manually by the merchant. - ONE-OF: - name: discountReason | type: DiscountReason | description: Predefined discount reason. - enum: - UNSPECIFIED: Unknown discount reason. - EXCHANGED_ITEMS: Balance adjustment resulting from an item exchange. - BILLING_ADJUSTMENT: Proportional discount for a shortened subscription billing cycle. Applied when a subscription's billing date is moved earlier, reducing the cycle length. - name: description | type: string | description: Custom discount description as free text. - name: amount | type: Price | description: Discount amount. - name: discountRule | type: DiscountRule | description: Automatic discount applied by the system based on configured discount rules. - name: _id | type: string | description: Discount rule GUID - name: name | type: DiscountRuleName | description: Discount rule name - name: original | type: string | description: Original discount rule name (in site's default language). - name: translated | type: string | description: Translated discount rule name according to buyer language. Defaults to `original` when not provided. - name: amount | type: Price | description: Discount value. - name: discountType | type: DiscountType | description: - enum: - GLOBAL: Discount applies to the entire order. - SPECIFIC_ITEMS: Discount applies to specific items. - SHIPPING: Discount applies to shipping. For example, free shipping. - name: _id | type: string | description: Discount GUID. - name: lineItemDiscounts | type: array | description: Line items the discount applies to, including the discount amount for each. - name: _id | type: string | description: Line item GUID. - name: totalDiscount | type: Price | description: Total discount amount for this line item. - name: source | type: SourceType | description: Source of the discount. Supported values: + `ORIGINAL_ORDER`: This discount is part of the original order. + `CUSTOM`: This discount was created by the Create Custom Discounts method. - name: applied | type: boolean | description: Whether this discount is applied to the order. - name: _createdDate | type: Date | description: Date and time the draft order was created. - name: _updatedDate | type: Date | description: Date and time the draft order was updated. - name: createdBy | type: CreatedBy | description: Identity of the draft order's initiator. - ONE-OF: - name: userId | type: string | description: User GUID. When the draft order was created by a Wix user. - name: appId | type: string | description: App GUID. When the draft order was created by an app. - name: status | type: EditingStatus | description: Draft order status. - enum: - DRAFT: Draft order is being edited. - COMMITTED: Draft order has been committed - No further modifications allowed. Draft orders with status 'COMMITTED' cannot be deleted. - name: weightUnit | type: WeightUnit | description: Weight measurement unit. Defaults to the site's weight unit. - enum: - UNSPECIFIED_WEIGHT_UNIT: Weight unit can't be classified due to an error. - KG: Kilograms. - LB: Pounds. - name: currency | type: string | description: Currency used for pricing. - name: priceSummary | type: PriceSummary | description: Price summary. - name: subtotal | type: Price | description: Subtotal of all line items, before discounts and before tax. - name: shipping | type: Price | description: Total shipping price, before discounts and before tax. - name: tax | type: Price | description: Total tax applied to the order. - name: discount | type: Price | description: Total discount amount applied to the order. - name: total | type: Price | description: Order's total price after discounts and tax. - name: totalAdditionalFees | type: Price | description: Total additional fees before tax. - name: balanceSummary | type: BalanceSummary | description: Balance summary. - name: balance | type: Balance | description: Amount left to pay for the order to be considered paid. - name: amount | type: string | description: Balance amount. A negative `amount` represents the amount to be refunded. This can happen due to overcharging or the order being modified after a payment has been made. - name: formattedAmount | type: string | description: Amount formatted with currency symbol. - name: paid | type: Price | description: Sum of all approved and successful payments. The value includes payments that have subsequently been fully or partially refunded. - name: refunded | type: Price | description: Sum of all successfully refunded payments. - name: authorized | type: Price | description: Sum of all authorized payments. - name: platformFees | type: Price | description: Total platform fees charged across all payments. This reflects amounts collected, which may differ from the expected fees in `draftOrder.platformFeeSummary`. - name: totalMinusPlatformFees | type: Price | description: Order total after deducting platform fees. Represents the net amount payable to the merchant. - name: commitSettings | type: DraftOrderCommitSettings | description: Side effects to perform on commit. - name: sendNotificationsToBuyer | type: boolean | description: Whether to send notifications to the buyer. Default: `true` - name: sendNotificationsToBusiness | type: boolean | description: Whether to send notifications to the business. Default: `true` - name: addActivitiesToOrder | type: boolean | description: Whether to add activities to the order. Default: `true` - name: sendNotificationsToCustomFulfillers | type: boolean | description: Whether to send email notifications to custom fulfillers when there is a change in the shippable items they fulfill. Default: `true` - name: updateInventory | type: array | description: Line item GUIDs for which to perform an inventory change. When not provided, inventory will not change. - name: lineItemId | type: string | description: Line item GUID. - name: memberId | type: string | description: Member GUID (if order created by a member). - name: purchaseFlowId | type: string | description: Persistent GUID that correlates between the various eCommerce elements: cart, checkout, and order. - name: recipientInfo | type: RecipientInfoDetails | description: Order recipient address and contact details. This field may differ from the address in `shippingInfo.logistics` when: + The chosen shipping option is pickup point or store pickup. + No shipping option is selected. - ONE-OF: - name: added | type: boolean | description: Indicates that recipient information was added during draft. - name: changedDetails | type: RecipientInfoChangedDetails | description: Indicates that recipient information was changed. Contains recipient information before draft. - name: recipientInfoBeforeChange | type: AddressWithContact | description: Order recipient address and contact details before draft. - name: removed | type: boolean | description: Indicates that recipient information was removed during draft. - name: recipientInfo | type: AddressWithContact | description: Order recipient address and contact details. - name: taxInfo | type: OrderTaxInfo | description: Tax information. - name: totalTax | type: Price | description: Calculated tax, added from line items. - name: taxBreakdown | type: array | description: The summary of the tax breakdown for all the line items. It will hold for each tax name, the aggregated tax amount paid for it and the tax rate. - name: taxName | type: string | description: The name of the tax against which this tax amount was calculated. - name: taxType | type: string | description: The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws. - name: jurisdiction | type: string | description: The name of the jurisdiction in which this tax detail applies. - name: jurisdictionType | type: JurisdictionType | description: The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). - name: rate | type: string | description: The rate at which this tax detail was calculated. - name: aggregatedTaxAmount | type: Price | description: The sum of all the tax from line items that calculated by the tax identifiers. - name: taxExempt | type: boolean | description: Whether the order is exempt from tax calculations. Default: `false` - name: extendedFields | type: ExtendedFields | description: Custom field data for the draft order object. [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls. - name: buyerDetails | type: BuyerDetails | description: Buyer information. Includes details about changes when relevant. - ONE-OF: - name: added | type: boolean | description: Indicates that buyer information was added during draft. - name: changedDetails | type: BuyerChangedDetails | description: Indicates that buyer information was changed. Contains buyer information before draft. - name: buyerInfoBeforeChange | type: BuyerInfo | description: Buyer information before draft. - ONE-OF: - name: visitorId | type: string | description: Visitor GUID. Returned when the buyer isn't a logged-in site member. - name: memberId | type: string | description: Member GUID. Returned when the buyer is a logged-in site member. - name: contactId | type: string | description: Contact GUID. Automatically created if one doesn't exist. For more information, see [Contacts API](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts/contact-v4/introduction.md). - name: email | type: string | description: Buyer's email address. - name: removed | type: boolean | description: Indicates that buyer information was removed during draft. - name: buyerInfo | type: BuyerInfo | description: Buyer information. - name: billingDetails | type: BillingDetails | description: Billing address and contact details. Includes details about changes when relevant. - ONE-OF: - name: added | type: boolean | description: Indicates that billing information was added during draft. - name: changedDetails | type: BillingChangedDetails | description: Indicates that billing information was changed. Contains billing information before draft. - name: billingInfoBeforeChange | type: AddressWithContact | description: Billing address and contact details before draft. - name: removed | type: boolean | description: Indicates that billing information was removed during draft. - name: billingInfo | type: AddressWithContact | description: Billing address and contact details. - name: businessLocationDetails | type: BusinessLocationDetails | description: Order business location. Includes details about changes when relevant. - ONE-OF: - name: added | type: boolean | description: Indicates that business location was added during draft. - name: changedDetails | type: BusinessLocationChangedDetails | description: Indicates that business location was changed. Contains business location before draft. - name: businessLocationBeforeChange | type: Location | description: Business location before draft. - name: _id | type: string | description: Location GUID. Learn more about the [Wix Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction.md). - name: name | type: string | description: Location name. - name: removed | type: boolean | description: Indicates that business location was removed during draft. - name: businessLocation | type: Location | description: Business location. - name: platformFeeSummary | type: PlatformFeeSummary | description: Summary of platform fees for this draft order, including totals by charge type and a breakdown of individual fees. - name: total | type: Price | description: Total sum of all platform fees. - name: totalPassOn | type: Price | description: Total amount of platform fees with `PASS_ON` charge type. - name: totalAbsorbed | type: Price | description: Total amount of platform fees with `ABSORBED` charge type. - name: fees | type: array | description: Specific information about each platform fee. - name: name | type: TranslatableString | description: Platform fee name. - name: amount | type: Price | description: Platform fee amount. - name: lineItemId | type: string | description: GUID of the line item the platform fee applies to. - name: chargeType | type: ChargeType | description: Platform fee charge type. - enum: - PASS_ON: Platform fee passed on to buyer. This type increases the order total, and is visible to the buyer and merchant as an additional fee. - ABSORBED: Platform fee absorbed by merchant. This type does not increase the order total, and is only visible to the merchant. - name: percentageRate | type: string | description: Percentage rate charged as platform fee. The fee rate percentage expressed as a decimal fraction between 0 and 1. For example, `0.05` for 5%. - name: shippingOptions | type: array | description: Shipping options. - name: carrierId | type: string | description: Carrier GUID. - name: code | type: string | description: Unique code that acts as an GUID for a shipping rate. For example, `"usps_std_overnight"`. - name: title | type: string | description: Shipping rate title. For example, `"USPS Standard Overnight Delivery"`, `"Standard"`, or `"First-Class Package International"`. - name: logistics | type: DeliveryLogistics | description: Shipping logistics. - name: deliveryTime | type: string | description: Expected delivery time in free text. For example, `"3-5 business days"`. - name: instructions | type: string | description: Instructions for delivery. For example, "Please arrive during business hours." - name: pickupDetails | type: PickupDetails | description: Additional pickup details. - name: address | type: Address | description: Pickup address. - name: pickupMethod | type: PickupMethod | description: Pickup method. - enum: - STORE_PICKUP: Store pickup. - PICKUP_POINT: Pickup point. - name: deliveryTimeSlot | type: DeliveryTimeSlot | description: Expected delivery time slot. - name: from | type: Date | description: Delivery time slot start time. - name: to | type: Date | description: Delivery time slot end time. - name: cost | type: ShippingPrice | description: Shipping cost. - name: price | type: Price | description: Shipping price. Must align with the [currency's decimal separator](https://en.wikipedia.org/wiki/ISO_4217#Active_codes). - name: currency | type: string | description: Currency of the shipping price as a 3-letter [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217). Must align with the `currency` passed to the method. - name: calculationErrors | type: CalculationErrors | description: Errors that occurred during calculation. - ONE-OF: - name: generalShippingCalculationError | type: Details | description: General shipping calculation error. - ONE-OF: - name: applicationError | type: ApplicationError | description: - name: code | type: string | description: Error code. - name: description | type: string | description: Description of the error. - name: data | type: object | description: Data related to the error. - name: validationError | type: ValidationError | description: - name: fieldViolations | type: array | description: - name: field | type: string | description: - name: description | type: string | description: - name: violatedRule | type: RuleType | description: - enum: VALIDATION, OTHER, MAX, MIN, MAX_LENGTH, MIN_LENGTH, MAX_SIZE, MIN_SIZE, FORMAT, DECIMAL_LTE, DECIMAL_GTE, DECIMAL_LT, DECIMAL_GT, DECIMAL_MAX_SCALE, INVALID_ENUM_VALUE, REQUIRED_FIELD, FIELD_NOT_ALLOWED, ONE_OF_ALIGNMENT, EXACT_LENGTH, EXACT_SIZE, REQUIRED_ONE_OF_FIELD - name: ruleName | type: string | description: applicable when violated_rule=OTHER - name: data | type: object | description: - name: systemError | type: SystemError | description: - name: errorCode | type: string | description: Error code. - name: carrierErrors | type: CarrierErrors | description: Carrier errors. - name: errors | type: array | description: Carrier errors. - name: carrierId | type: string | description: Carrier GUID. - name: error | type: Details | description: Error details. - name: taxCalculationError | type: Details | description: Tax calculation error. - name: orderValidationErrors | type: array | description: Order validation errors. Possible Errors: HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: DRAFT_ORDER_DOES_NOT_EXIST | Description: Couldn't find the draft order. HTTP Code: 409 | Status Code: ALREADY_EXISTS | Application Code: DRAFT_ORDER_ALREADY_COMMITTED | Description: Draft order was already committed. HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: ADDITIONAL_FEE_REMOVE_NOT_SUPPORTED | Description: Can't remove additional fee because it wasn't added as part of the draft order. HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: ADDITIONAL_FEE_NOT_FOUND | Description: Couldn't find the additional fee. ``` ### Examples ### deleteCustomAdditionalFees ```javascript import { draftOrders } from '@wix/ecom'; async function deleteCustomAdditionalFees(draftOrderId,customAdditionalFees) { const response = await draftOrders.deleteCustomAdditionalFees(draftOrderId,customAdditionalFees); }; ``` ### deleteCustomAdditionalFees (with elevated permissions) ```javascript import { draftOrders } from '@wix/ecom'; import { auth } from '@wix/essentials'; async function myDeleteCustomAdditionalFeesMethod(draftOrderId,customAdditionalFees) { const elevatedDeleteCustomAdditionalFees = auth.elevate(draftOrders.deleteCustomAdditionalFees); const response = await elevatedDeleteCustomAdditionalFees(draftOrderId,customAdditionalFees); } ``` ### deleteCustomAdditionalFees (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 { draftOrders } from '@wix/ecom'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { draftOrders }, // Include the auth strategy and host as relevant }); async function deleteCustomAdditionalFees(draftOrderId,customAdditionalFees) { const response = await myWixClient.draftOrders.deleteCustomAdditionalFees(draftOrderId,customAdditionalFees); }; ``` ---