@wix/auto_sdk_ecom_draft-orders 1.0.22 → 1.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.http.d.ts +42 -26
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.http.js +42 -26
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.http.js.map +1 -1
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.public.d.ts +47 -33
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.public.js.map +1 -1
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.types.d.ts +140 -84
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.types.js +9 -7
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.types.js.map +1 -1
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.universal.d.ts +222 -130
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.universal.js +56 -40
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.universal.js.map +1 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.http.d.ts +42 -26
- package/build/es/src/ecom-v1-draft-order-draft-orders.http.js +42 -26
- package/build/es/src/ecom-v1-draft-order-draft-orders.http.js.map +1 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.public.d.ts +47 -33
- package/build/es/src/ecom-v1-draft-order-draft-orders.public.js.map +1 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.types.d.ts +140 -84
- package/build/es/src/ecom-v1-draft-order-draft-orders.types.js +9 -7
- package/build/es/src/ecom-v1-draft-order-draft-orders.types.js.map +1 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.universal.d.ts +222 -130
- package/build/es/src/ecom-v1-draft-order-draft-orders.universal.js +56 -40
- package/build/es/src/ecom-v1-draft-order-draft-orders.universal.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.http.d.ts +42 -26
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.http.js +42 -26
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.http.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.public.d.ts +47 -33
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.public.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.types.d.ts +140 -84
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.types.js +9 -7
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.types.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.universal.d.ts +221 -134
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.universal.js +56 -40
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.universal.js.map +1 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.http.d.ts +42 -26
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.http.js +42 -26
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.http.js.map +1 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.public.d.ts +47 -33
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.public.js.map +1 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.types.d.ts +140 -84
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.types.js +9 -7
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.types.js.map +1 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.universal.d.ts +221 -134
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.universal.js +56 -40
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.universal.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
|
-
/**
|
|
2
|
+
/** Draft Orders main entity. */
|
|
3
3
|
export interface DraftOrder {
|
|
4
4
|
/**
|
|
5
5
|
* Draft order ID.
|
|
@@ -40,12 +40,14 @@ export interface DraftOrder {
|
|
|
40
40
|
billingInfo?: AddressWithContact;
|
|
41
41
|
/**
|
|
42
42
|
* Additional fees.
|
|
43
|
+
*
|
|
43
44
|
* Includes details about the source, and whether the additional fee is applied to the order.
|
|
44
45
|
* @maxSize 100
|
|
45
46
|
*/
|
|
46
47
|
additionalFees?: AdditionalFeeDetails[];
|
|
47
48
|
/**
|
|
48
49
|
* Discounts.
|
|
50
|
+
*
|
|
49
51
|
* Includes details about the source, and whether the discount is applied to the order.
|
|
50
52
|
* @maxSize 320
|
|
51
53
|
*/
|
|
@@ -123,11 +125,13 @@ export interface DraftOrder {
|
|
|
123
125
|
taxInfo?: OrderTaxInfo;
|
|
124
126
|
/**
|
|
125
127
|
* Custom field data for the draft order object.
|
|
128
|
+
*
|
|
126
129
|
* [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls.
|
|
127
130
|
*/
|
|
128
131
|
extendedFields?: ExtendedFields;
|
|
129
132
|
/**
|
|
130
133
|
* Buyer information.
|
|
134
|
+
*
|
|
131
135
|
* Includes details about changes when relevant.
|
|
132
136
|
*/
|
|
133
137
|
buyerDetails?: BuyerDetails;
|
|
@@ -137,7 +141,8 @@ export interface DraftOrder {
|
|
|
137
141
|
*/
|
|
138
142
|
billingDetails?: BillingDetails;
|
|
139
143
|
/**
|
|
140
|
-
* Order business location
|
|
144
|
+
* Order business location.
|
|
145
|
+
*
|
|
141
146
|
* Includes details about changes when relevant.
|
|
142
147
|
*/
|
|
143
148
|
businessLocationDetails?: BusinessLocationDetails;
|
|
@@ -299,10 +304,7 @@ export interface OrderLineItem {
|
|
|
299
304
|
* @maxSize 5
|
|
300
305
|
*/
|
|
301
306
|
locations?: LocationAndQuantity[];
|
|
302
|
-
/**
|
|
303
|
-
* Address used for tax calculation.
|
|
304
|
-
* @internal
|
|
305
|
-
*/
|
|
307
|
+
/** Address used for tax calculation. */
|
|
306
308
|
taxableAddress?: TaxableAddress;
|
|
307
309
|
/**
|
|
308
310
|
* ID of the app managing the inventory.
|
|
@@ -1185,10 +1187,10 @@ export interface AdditionalFee {
|
|
|
1185
1187
|
subscriptionCycles?: number | null;
|
|
1186
1188
|
}
|
|
1187
1189
|
export interface TaxDetails {
|
|
1188
|
-
/**
|
|
1190
|
+
/** Whether the additional fee is taxable. */
|
|
1189
1191
|
taxable?: boolean;
|
|
1190
1192
|
/**
|
|
1191
|
-
* Optional tax group ID to use when calculating tax for this additional fee
|
|
1193
|
+
* Optional tax group ID to use when calculating tax for this additional fee.
|
|
1192
1194
|
* @format GUID
|
|
1193
1195
|
*/
|
|
1194
1196
|
taxGroupId?: string | null;
|
|
@@ -1379,9 +1381,13 @@ export interface CreatedByStringOneOf {
|
|
|
1379
1381
|
appId?: string;
|
|
1380
1382
|
}
|
|
1381
1383
|
export declare enum EditingStatus {
|
|
1382
|
-
/** Draft order
|
|
1384
|
+
/** Draft order is being edited. */
|
|
1383
1385
|
DRAFT = "DRAFT",
|
|
1384
|
-
/**
|
|
1386
|
+
/**
|
|
1387
|
+
* Draft order has been committed - No further modifications allowed.
|
|
1388
|
+
*
|
|
1389
|
+
* Draft orders with status 'COMMITTED' cannot be deleted.
|
|
1390
|
+
*/
|
|
1385
1391
|
COMMITTED = "COMMITTED"
|
|
1386
1392
|
}
|
|
1387
1393
|
export declare enum WeightUnit {
|
|
@@ -1415,7 +1421,7 @@ export interface TaxSummary {
|
|
|
1415
1421
|
}
|
|
1416
1422
|
export interface BalanceSummary {
|
|
1417
1423
|
/**
|
|
1418
|
-
* Amount left to pay for order to be considered paid.
|
|
1424
|
+
* Amount left to pay for the order to be considered paid.
|
|
1419
1425
|
* @readonly
|
|
1420
1426
|
*/
|
|
1421
1427
|
balance?: Balance;
|
|
@@ -1655,31 +1661,33 @@ export interface BusinessLocationChangedDetails {
|
|
|
1655
1661
|
}
|
|
1656
1662
|
export interface CreateDraftOrderRequest {
|
|
1657
1663
|
/**
|
|
1658
|
-
*
|
|
1664
|
+
* ID of the order to create a draft for.
|
|
1659
1665
|
* @format GUID
|
|
1660
1666
|
*/
|
|
1661
1667
|
orderId: string | null;
|
|
1662
1668
|
}
|
|
1663
1669
|
export interface CreateDraftOrderResponse {
|
|
1664
|
-
/** Draft order
|
|
1670
|
+
/** Draft order calculated with the latest changes. */
|
|
1665
1671
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1666
1672
|
/**
|
|
1667
|
-
*
|
|
1668
|
-
*
|
|
1673
|
+
* Whether the response contains a draft order that existed before request.
|
|
1674
|
+
*
|
|
1675
|
+
* `true`: The draft order already exists and is updated.
|
|
1676
|
+
* `false`: A new draft order is created.
|
|
1669
1677
|
*/
|
|
1670
1678
|
preexistingDraftOrder?: boolean | null;
|
|
1671
1679
|
}
|
|
1672
1680
|
export interface CalculatedDraftOrder {
|
|
1673
|
-
/** Draft order
|
|
1681
|
+
/** Draft order. */
|
|
1674
1682
|
draftOrder?: DraftOrder;
|
|
1675
|
-
/**
|
|
1683
|
+
/** Shipping options. */
|
|
1676
1684
|
shippingOptions?: ShippingOption[];
|
|
1677
1685
|
/** Errors that occurred during calculation. */
|
|
1678
1686
|
calculationErrors?: CalculationErrors;
|
|
1679
1687
|
}
|
|
1680
1688
|
export interface ShippingOption {
|
|
1681
1689
|
/**
|
|
1682
|
-
*
|
|
1690
|
+
* Carrier ID.
|
|
1683
1691
|
* @format GUID
|
|
1684
1692
|
*/
|
|
1685
1693
|
carrierId?: string | null;
|
|
@@ -1695,37 +1703,39 @@ export interface ShippingOption {
|
|
|
1695
1703
|
export interface DeliveryLogistics {
|
|
1696
1704
|
/** When the item is expected to be delivered in free text, e.g "3-5 business days" */
|
|
1697
1705
|
deliveryTime?: string | null;
|
|
1698
|
-
/**
|
|
1706
|
+
/**
|
|
1707
|
+
* Instructions for delivery.
|
|
1708
|
+
*
|
|
1709
|
+
* For example, "Please arrive during business hours."
|
|
1710
|
+
*/
|
|
1699
1711
|
instructions?: string | null;
|
|
1700
|
-
/** Additional pickup details
|
|
1712
|
+
/** Additional pickup details. */
|
|
1701
1713
|
pickupDetails?: PickupDetails;
|
|
1702
|
-
/** Expected delivery time slot
|
|
1714
|
+
/** Expected delivery time slot. */
|
|
1703
1715
|
deliveryTimeSlot?: DeliveryTimeSlot;
|
|
1704
1716
|
}
|
|
1705
1717
|
export interface PickupDetails {
|
|
1706
|
-
/** Pickup address */
|
|
1718
|
+
/** Pickup address. */
|
|
1707
1719
|
address?: Address;
|
|
1708
1720
|
/** Pickup method. */
|
|
1709
1721
|
pickupMethod?: PickupMethod;
|
|
1710
1722
|
}
|
|
1711
1723
|
export declare enum PickupMethod {
|
|
1712
1724
|
UNKNOWN_METHOD = "UNKNOWN_METHOD",
|
|
1713
|
-
/** Pickup is from the merchant's brick and mortar store. */
|
|
1714
1725
|
STORE_PICKUP = "STORE_PICKUP",
|
|
1715
|
-
/** Item is shipped to a specified pickup point. */
|
|
1716
1726
|
PICKUP_POINT = "PICKUP_POINT"
|
|
1717
1727
|
}
|
|
1718
1728
|
export interface DeliveryTimeSlot {
|
|
1719
|
-
/**
|
|
1729
|
+
/** Delivery time slot start time. */
|
|
1720
1730
|
from?: Date | null;
|
|
1721
|
-
/**
|
|
1731
|
+
/** Delivery time slot end time. */
|
|
1722
1732
|
to?: Date | null;
|
|
1723
1733
|
}
|
|
1724
1734
|
export interface ShippingPrice {
|
|
1725
|
-
/**
|
|
1735
|
+
/** Shipping price. Must align with the [currency's decimal separator](https://en.wikipedia.org/wiki/ISO_4217#Active_codes). */
|
|
1726
1736
|
price?: Price;
|
|
1727
1737
|
/**
|
|
1728
|
-
* Currency of the shipping
|
|
1738
|
+
* 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.
|
|
1729
1739
|
* @format CURRENCY
|
|
1730
1740
|
*/
|
|
1731
1741
|
currency?: string;
|
|
@@ -1854,7 +1864,7 @@ export interface CarrierError {
|
|
|
1854
1864
|
export interface CreateEmptyDraftOrderRequest {
|
|
1855
1865
|
}
|
|
1856
1866
|
export interface CreateEmptyDraftOrderResponse {
|
|
1857
|
-
/** Draft order
|
|
1867
|
+
/** Draft order calculated with the latest changes. */
|
|
1858
1868
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1859
1869
|
}
|
|
1860
1870
|
export interface AddLineItemsToDraftOrderRequest {
|
|
@@ -1869,7 +1879,9 @@ export interface AddLineItemsToDraftOrderRequest {
|
|
|
1869
1879
|
*/
|
|
1870
1880
|
catalogLineItems?: CatalogReferenceLineItem[];
|
|
1871
1881
|
/**
|
|
1872
|
-
* Custom line items to add to draft order.
|
|
1882
|
+
* Custom line items to add to draft order.
|
|
1883
|
+
*
|
|
1884
|
+
* Custom line items do not trigger the Catalog Service Plugin.
|
|
1873
1885
|
* @maxSize 300
|
|
1874
1886
|
*/
|
|
1875
1887
|
customLineItems?: CustomLineItem[];
|
|
@@ -1918,7 +1930,9 @@ export interface CustomLineItem {
|
|
|
1918
1930
|
*/
|
|
1919
1931
|
quantity?: number;
|
|
1920
1932
|
/**
|
|
1921
|
-
* Catalog and item reference.
|
|
1933
|
+
* Catalog and item reference.
|
|
1934
|
+
*
|
|
1935
|
+
* Includes IDs for the item and the catalog it came from, as well as further optional info.
|
|
1922
1936
|
* Optional for custom line items, which don't trigger the Catalog service plugin.
|
|
1923
1937
|
*/
|
|
1924
1938
|
catalogReference?: CatalogReference;
|
|
@@ -1987,7 +2001,7 @@ export declare enum FileType {
|
|
|
1987
2001
|
SECURE_ARCHIVE = "SECURE_ARCHIVE"
|
|
1988
2002
|
}
|
|
1989
2003
|
export interface AddLineItemsToDraftOrderResponse {
|
|
1990
|
-
/** Draft order
|
|
2004
|
+
/** Draft order calculated with the latest changes. */
|
|
1991
2005
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1992
2006
|
}
|
|
1993
2007
|
export interface UpdateLineItemsRequest {
|
|
@@ -2010,20 +2024,26 @@ export interface LineItemChangeDetails {
|
|
|
2010
2024
|
*/
|
|
2011
2025
|
lineItemId?: string;
|
|
2012
2026
|
/**
|
|
2013
|
-
* The
|
|
2027
|
+
* The line item's new quantity.
|
|
2028
|
+
*
|
|
2029
|
+
* > **Note:** Passing `0` will remove the line item.
|
|
2014
2030
|
* @max 1000000
|
|
2015
2031
|
*/
|
|
2016
2032
|
newQuantity?: number | null;
|
|
2017
2033
|
/**
|
|
2018
|
-
*
|
|
2034
|
+
* New price for 1 unit of the line item.
|
|
2019
2035
|
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
2020
2036
|
*/
|
|
2021
2037
|
newPrice?: string | null;
|
|
2022
|
-
/**
|
|
2038
|
+
/**
|
|
2039
|
+
* New description for the price.
|
|
2040
|
+
*
|
|
2041
|
+
* For example, when price is `0` but additional details about the actual price are needed - `"Starts at $67"`.
|
|
2042
|
+
*/
|
|
2023
2043
|
newPriceDescription?: PriceDescription;
|
|
2024
2044
|
}
|
|
2025
2045
|
export interface UpdateLineItemsResponse {
|
|
2026
|
-
/** Draft order
|
|
2046
|
+
/** Draft order calculated with the latest changes. */
|
|
2027
2047
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2028
2048
|
}
|
|
2029
2049
|
export interface SetDiscountsRequest {
|
|
@@ -2033,8 +2053,9 @@ export interface SetDiscountsRequest {
|
|
|
2033
2053
|
*/
|
|
2034
2054
|
draftOrderId: string;
|
|
2035
2055
|
/**
|
|
2036
|
-
*
|
|
2037
|
-
*
|
|
2056
|
+
* Discounts to set on the draft order.
|
|
2057
|
+
*
|
|
2058
|
+
* Any existing discounts that are not passed will not change.
|
|
2038
2059
|
* @minSize 1
|
|
2039
2060
|
* @maxSize 320
|
|
2040
2061
|
*/
|
|
@@ -2042,15 +2063,17 @@ export interface SetDiscountsRequest {
|
|
|
2042
2063
|
}
|
|
2043
2064
|
export interface IdAndApplied {
|
|
2044
2065
|
/**
|
|
2045
|
-
* Entity ID.
|
|
2066
|
+
* Entity ID.
|
|
2067
|
+
*
|
|
2068
|
+
* Depending on the context, the value is either a discount ID or an additional fee ID.
|
|
2046
2069
|
* @format GUID
|
|
2047
2070
|
*/
|
|
2048
2071
|
_id?: string;
|
|
2049
|
-
/**
|
|
2072
|
+
/** Whether the discount or additional fee should be applied to the draft order. */
|
|
2050
2073
|
applied?: boolean;
|
|
2051
2074
|
}
|
|
2052
2075
|
export interface SetDiscountsResponse {
|
|
2053
|
-
/** Draft order
|
|
2076
|
+
/** Draft order calculated with the latest changes. */
|
|
2054
2077
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2055
2078
|
}
|
|
2056
2079
|
export interface CreateCustomDiscountsRequest {
|
|
@@ -2060,17 +2083,19 @@ export interface CreateCustomDiscountsRequest {
|
|
|
2060
2083
|
*/
|
|
2061
2084
|
draftOrderId: string;
|
|
2062
2085
|
/**
|
|
2063
|
-
*
|
|
2086
|
+
* Custom discounts to create.
|
|
2087
|
+
*
|
|
2088
|
+
* Created discounts are not applied by default.
|
|
2064
2089
|
* @minSize 1
|
|
2065
2090
|
* @maxSize 100
|
|
2066
2091
|
*/
|
|
2067
2092
|
discounts?: DiscountOption[];
|
|
2068
2093
|
}
|
|
2069
2094
|
export interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
|
|
2070
|
-
/**
|
|
2095
|
+
/** Amount to discount from the line item price. */
|
|
2071
2096
|
priceAmount?: Price;
|
|
2072
2097
|
/**
|
|
2073
|
-
*
|
|
2098
|
+
* Percentage to discount from the line item price.
|
|
2074
2099
|
* @format DECIMAL_VALUE
|
|
2075
2100
|
* @decimalValue options { gte:0, lte:100, maxScale:2 }
|
|
2076
2101
|
*/
|
|
@@ -2098,8 +2123,9 @@ export interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
|
|
|
2098
2123
|
*/
|
|
2099
2124
|
description?: string | null;
|
|
2100
2125
|
/**
|
|
2101
|
-
*
|
|
2102
|
-
*
|
|
2126
|
+
* Whether to apply the discount to the draft order.
|
|
2127
|
+
*
|
|
2128
|
+
* Default: `false`
|
|
2103
2129
|
*/
|
|
2104
2130
|
applyToDraftOrder?: boolean | null;
|
|
2105
2131
|
/**
|
|
@@ -2110,10 +2136,10 @@ export interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
|
|
|
2110
2136
|
}
|
|
2111
2137
|
/** @oneof */
|
|
2112
2138
|
export interface DiscountOptionDiscountAmountOneOf {
|
|
2113
|
-
/**
|
|
2139
|
+
/** Amount to discount from the line item price. */
|
|
2114
2140
|
priceAmount?: Price;
|
|
2115
2141
|
/**
|
|
2116
|
-
*
|
|
2142
|
+
* Percentage to discount from the line item price.
|
|
2117
2143
|
* @format DECIMAL_VALUE
|
|
2118
2144
|
* @decimalValue options { gte:0, lte:100, maxScale:2 }
|
|
2119
2145
|
*/
|
|
@@ -2121,15 +2147,15 @@ export interface DiscountOptionDiscountAmountOneOf {
|
|
|
2121
2147
|
}
|
|
2122
2148
|
export declare enum DiscountType {
|
|
2123
2149
|
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
2124
|
-
/** Discount applies to entire order. */
|
|
2150
|
+
/** Discount applies to the entire order. */
|
|
2125
2151
|
GLOBAL = "GLOBAL",
|
|
2126
|
-
/** Discount applies to specific
|
|
2152
|
+
/** Discount applies to a specific item. */
|
|
2127
2153
|
SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
|
|
2128
|
-
/** Discount applies to shipping
|
|
2154
|
+
/** Discount applies to shipping fee. */
|
|
2129
2155
|
SHIPPING = "SHIPPING"
|
|
2130
2156
|
}
|
|
2131
2157
|
export interface CreateCustomDiscountsResponse {
|
|
2132
|
-
/** Draft order
|
|
2158
|
+
/** Draft order calculated with the latest changes. */
|
|
2133
2159
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2134
2160
|
}
|
|
2135
2161
|
export interface DeleteCustomDiscountsRequest {
|
|
@@ -2139,7 +2165,7 @@ export interface DeleteCustomDiscountsRequest {
|
|
|
2139
2165
|
*/
|
|
2140
2166
|
draftOrderId: string;
|
|
2141
2167
|
/**
|
|
2142
|
-
*
|
|
2168
|
+
* IDs of the discounts to remove from the draft order.
|
|
2143
2169
|
* @format GUID
|
|
2144
2170
|
* @minSize 1
|
|
2145
2171
|
* @maxSize 100
|
|
@@ -2147,7 +2173,7 @@ export interface DeleteCustomDiscountsRequest {
|
|
|
2147
2173
|
discountIds: string[];
|
|
2148
2174
|
}
|
|
2149
2175
|
export interface DeleteCustomDiscountsResponse {
|
|
2150
|
-
/** Draft order
|
|
2176
|
+
/** Draft order calculated with the latest changes. */
|
|
2151
2177
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2152
2178
|
}
|
|
2153
2179
|
export interface SetAdditionalFeesRequest {
|
|
@@ -2157,15 +2183,16 @@ export interface SetAdditionalFeesRequest {
|
|
|
2157
2183
|
*/
|
|
2158
2184
|
draftOrderId: string;
|
|
2159
2185
|
/**
|
|
2160
|
-
* Additional
|
|
2161
|
-
*
|
|
2186
|
+
* Additional fees to set on the draft order.
|
|
2187
|
+
*
|
|
2188
|
+
* Any existing additional fees that are not passed will not change.
|
|
2162
2189
|
* @minSize 1
|
|
2163
2190
|
* @maxSize 100
|
|
2164
2191
|
*/
|
|
2165
2192
|
additionalFees: IdAndApplied[];
|
|
2166
2193
|
}
|
|
2167
2194
|
export interface SetAdditionalFeesResponse {
|
|
2168
|
-
/** Draft order
|
|
2195
|
+
/** Draft order calculated with the latest changes. */
|
|
2169
2196
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2170
2197
|
}
|
|
2171
2198
|
export interface CreateCustomAdditionalFeesRequest {
|
|
@@ -2175,7 +2202,9 @@ export interface CreateCustomAdditionalFeesRequest {
|
|
|
2175
2202
|
*/
|
|
2176
2203
|
draftOrderId: string;
|
|
2177
2204
|
/**
|
|
2178
|
-
*
|
|
2205
|
+
* Custom additional fees to create.
|
|
2206
|
+
*
|
|
2207
|
+
* Created additional fees are not applied by default.
|
|
2179
2208
|
* @minSize 1
|
|
2180
2209
|
* @maxSize 100
|
|
2181
2210
|
*/
|
|
@@ -2183,28 +2212,30 @@ export interface CreateCustomAdditionalFeesRequest {
|
|
|
2183
2212
|
}
|
|
2184
2213
|
export interface AdditionalFeeOption {
|
|
2185
2214
|
/**
|
|
2186
|
-
*
|
|
2215
|
+
* Name of the additional fee.
|
|
2187
2216
|
* @minLength 1
|
|
2188
2217
|
* @maxLength 50
|
|
2189
2218
|
*/
|
|
2190
2219
|
name?: string;
|
|
2191
|
-
/**
|
|
2220
|
+
/** Price of the additional fee. */
|
|
2192
2221
|
price?: Price;
|
|
2193
|
-
/** Tax calculation details */
|
|
2222
|
+
/** Tax calculation details. */
|
|
2194
2223
|
taxDetails?: TaxDetails;
|
|
2195
2224
|
/**
|
|
2196
|
-
*
|
|
2197
|
-
*
|
|
2225
|
+
* Whether to apply the additional fee to the draft order.
|
|
2226
|
+
*
|
|
2227
|
+
* Default: `false`
|
|
2198
2228
|
*/
|
|
2199
2229
|
applyToDraftOrder?: boolean | null;
|
|
2200
2230
|
/**
|
|
2201
|
-
* Additional fee
|
|
2231
|
+
* Additional fee unique code (or ID) for future processing.
|
|
2202
2232
|
* @minLength 1
|
|
2203
2233
|
* @maxLength 100
|
|
2204
2234
|
*/
|
|
2205
2235
|
code?: string | null;
|
|
2206
2236
|
/**
|
|
2207
|
-
*
|
|
2237
|
+
* IDs of the line items associated with this additional fee.
|
|
2238
|
+
*
|
|
2208
2239
|
* If no `lineItemIds` are provided, the fee will be associated with the whole order.
|
|
2209
2240
|
* @format GUID
|
|
2210
2241
|
* @maxSize 300
|
|
@@ -2212,7 +2243,7 @@ export interface AdditionalFeeOption {
|
|
|
2212
2243
|
lineItemIds?: string[];
|
|
2213
2244
|
}
|
|
2214
2245
|
export interface CreateCustomAdditionalFeesResponse {
|
|
2215
|
-
/** Draft order
|
|
2246
|
+
/** Draft order calculated with the latest changes. */
|
|
2216
2247
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2217
2248
|
}
|
|
2218
2249
|
export interface DeleteCustomAdditionalFeesRequest {
|
|
@@ -2222,7 +2253,7 @@ export interface DeleteCustomAdditionalFeesRequest {
|
|
|
2222
2253
|
*/
|
|
2223
2254
|
draftOrderId: string;
|
|
2224
2255
|
/**
|
|
2225
|
-
*
|
|
2256
|
+
* IDs of the additional fees to remove from the draft order.
|
|
2226
2257
|
* @format GUID
|
|
2227
2258
|
* @minSize 1
|
|
2228
2259
|
* @maxSize 100
|
|
@@ -2230,7 +2261,7 @@ export interface DeleteCustomAdditionalFeesRequest {
|
|
|
2230
2261
|
customAdditionalFees: string[];
|
|
2231
2262
|
}
|
|
2232
2263
|
export interface DeleteCustomAdditionalFeesResponse {
|
|
2233
|
-
/** Draft order
|
|
2264
|
+
/** Draft order calculated with the latest changes. */
|
|
2234
2265
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2235
2266
|
}
|
|
2236
2267
|
export interface SetShippingInfoRequest {
|
|
@@ -2239,11 +2270,15 @@ export interface SetShippingInfoRequest {
|
|
|
2239
2270
|
* @format GUID
|
|
2240
2271
|
*/
|
|
2241
2272
|
draftOrderId: string;
|
|
2242
|
-
/**
|
|
2273
|
+
/**
|
|
2274
|
+
* Shipping info to set on the draft order.
|
|
2275
|
+
*
|
|
2276
|
+
* > **Note:** Passing an empty object will remove the existing shipping info.
|
|
2277
|
+
*/
|
|
2243
2278
|
shippingInfo?: V1ShippingInformation;
|
|
2244
2279
|
}
|
|
2245
2280
|
export interface SetShippingInfoResponse {
|
|
2246
|
-
/** Draft order
|
|
2281
|
+
/** Draft order calculated with the latest changes. */
|
|
2247
2282
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2248
2283
|
}
|
|
2249
2284
|
export interface SetBuyerInfoRequest {
|
|
@@ -2252,11 +2287,15 @@ export interface SetBuyerInfoRequest {
|
|
|
2252
2287
|
* @format GUID
|
|
2253
2288
|
*/
|
|
2254
2289
|
draftOrderId: string;
|
|
2255
|
-
/**
|
|
2290
|
+
/**
|
|
2291
|
+
* Shipping info to set on the draft order.
|
|
2292
|
+
*
|
|
2293
|
+
* > **Note:** Passing an empty object will remove the existing shipping info.
|
|
2294
|
+
*/
|
|
2256
2295
|
buyerInfo?: BuyerInfo;
|
|
2257
2296
|
}
|
|
2258
2297
|
export interface SetBuyerInfoResponse {
|
|
2259
|
-
/** Draft order
|
|
2298
|
+
/** Draft order calculated with the latest changes. */
|
|
2260
2299
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2261
2300
|
}
|
|
2262
2301
|
export interface SetRecipientInfoRequest {
|
|
@@ -2265,11 +2304,15 @@ export interface SetRecipientInfoRequest {
|
|
|
2265
2304
|
* @format GUID
|
|
2266
2305
|
*/
|
|
2267
2306
|
draftOrderId: string;
|
|
2268
|
-
/**
|
|
2307
|
+
/**
|
|
2308
|
+
* Recipient address and contact details.
|
|
2309
|
+
*
|
|
2310
|
+
* > **Note:** Passing an empty object will remove the existing recipient info.
|
|
2311
|
+
*/
|
|
2269
2312
|
recipientInfo?: AddressWithContact;
|
|
2270
2313
|
}
|
|
2271
2314
|
export interface SetRecipientInfoResponse {
|
|
2272
|
-
/** Draft order
|
|
2315
|
+
/** Draft order calculated with the latest changes. */
|
|
2273
2316
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2274
2317
|
}
|
|
2275
2318
|
export interface SetBillingInfoRequest {
|
|
@@ -2278,11 +2321,15 @@ export interface SetBillingInfoRequest {
|
|
|
2278
2321
|
* @format GUID
|
|
2279
2322
|
*/
|
|
2280
2323
|
draftOrderId: string;
|
|
2281
|
-
/**
|
|
2324
|
+
/**
|
|
2325
|
+
* Billing address and contact details.
|
|
2326
|
+
*
|
|
2327
|
+
* > **Note:** Passing an empty object will remove the existing billing info.
|
|
2328
|
+
*/
|
|
2282
2329
|
billingInfo?: AddressWithContact;
|
|
2283
2330
|
}
|
|
2284
2331
|
export interface SetBillingInfoResponse {
|
|
2285
|
-
/** Draft order
|
|
2332
|
+
/** Draft order calculated with the latest changes. */
|
|
2286
2333
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2287
2334
|
}
|
|
2288
2335
|
/** Deprecated */
|
|
@@ -2297,7 +2344,7 @@ export interface UpdateShippingInfoRequest {
|
|
|
2297
2344
|
}
|
|
2298
2345
|
/** Deprecated */
|
|
2299
2346
|
export interface UpdateShippingInfoResponse {
|
|
2300
|
-
/** Draft order
|
|
2347
|
+
/** Draft order calculated with the latest changes. */
|
|
2301
2348
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2302
2349
|
}
|
|
2303
2350
|
export interface GetDraftOrderRequest {
|
|
@@ -2308,26 +2355,30 @@ export interface GetDraftOrderRequest {
|
|
|
2308
2355
|
draftOrderId: string;
|
|
2309
2356
|
}
|
|
2310
2357
|
export interface GetDraftOrderResponse {
|
|
2311
|
-
/** Draft order
|
|
2358
|
+
/** Draft order calculated with the latest changes. */
|
|
2312
2359
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2313
2360
|
}
|
|
2314
2361
|
export interface GetOrderDraftabilityStatusRequest {
|
|
2315
2362
|
/**
|
|
2316
|
-
* Order
|
|
2363
|
+
* Order ID.
|
|
2317
2364
|
* @format GUID
|
|
2318
2365
|
*/
|
|
2319
2366
|
orderId: string;
|
|
2320
2367
|
}
|
|
2321
2368
|
export interface GetOrderDraftabilityStatusResponse {
|
|
2322
2369
|
/**
|
|
2323
|
-
* Order
|
|
2370
|
+
* Order ID.
|
|
2324
2371
|
* @format GUID
|
|
2325
2372
|
*/
|
|
2326
2373
|
orderId?: string;
|
|
2327
|
-
/**
|
|
2374
|
+
/**
|
|
2375
|
+
* Whether a draft can be created based on the order.
|
|
2376
|
+
*
|
|
2377
|
+
* Default: `false`
|
|
2378
|
+
*/
|
|
2328
2379
|
orderDraftable?: boolean;
|
|
2329
2380
|
/**
|
|
2330
|
-
* Reasons why
|
|
2381
|
+
* Reasons why a draft order cannot be created from the order.
|
|
2331
2382
|
* @maxSize 5
|
|
2332
2383
|
*/
|
|
2333
2384
|
nonDraftableReasons?: NonDraftableReason[];
|
|
@@ -2364,7 +2415,7 @@ export interface CommitDraftOrderRequest {
|
|
|
2364
2415
|
/** Optional side effects to trigger. */
|
|
2365
2416
|
commitSettings?: DraftOrderCommitSettings;
|
|
2366
2417
|
/**
|
|
2367
|
-
* Reason for edit,
|
|
2418
|
+
* Reason for edit, provided by user (optional).
|
|
2368
2419
|
* @maxLength 200
|
|
2369
2420
|
*/
|
|
2370
2421
|
reason?: string | null;
|
|
@@ -3555,7 +3606,7 @@ export interface CreateOrderFromDraftRequest {
|
|
|
3555
3606
|
/** Optional side effects to trigger. */
|
|
3556
3607
|
createSettings?: OrderCreateSettings;
|
|
3557
3608
|
/**
|
|
3558
|
-
* Reason for order creation,
|
|
3609
|
+
* Reason for order creation, provided by user (optional).
|
|
3559
3610
|
* @maxLength 200
|
|
3560
3611
|
*/
|
|
3561
3612
|
reason?: string | null;
|
|
@@ -3581,7 +3632,7 @@ export interface OrderCreateNotifications {
|
|
|
3581
3632
|
sendNotificationsToBusiness?: boolean | null;
|
|
3582
3633
|
}
|
|
3583
3634
|
export interface CreateOrderFromDraftResponse {
|
|
3584
|
-
/**
|
|
3635
|
+
/** Draft order after commit. */
|
|
3585
3636
|
committedDraftOrder?: DraftOrder;
|
|
3586
3637
|
/** Created order. */
|
|
3587
3638
|
createdOrder?: Order;
|
|
@@ -3707,14 +3758,14 @@ export interface SetTaxExemptionRequest {
|
|
|
3707
3758
|
*/
|
|
3708
3759
|
draftOrderId: string;
|
|
3709
3760
|
/**
|
|
3710
|
-
*
|
|
3761
|
+
* Whether the draft order is exempt from tax calculations.
|
|
3711
3762
|
*
|
|
3712
3763
|
* Default: `false`
|
|
3713
3764
|
*/
|
|
3714
3765
|
taxExempt: boolean | null;
|
|
3715
3766
|
}
|
|
3716
3767
|
export interface SetTaxExemptionResponse {
|
|
3717
|
-
/** Draft order
|
|
3768
|
+
/** Draft order calculated with the latest changes. */
|
|
3718
3769
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
3719
3770
|
}
|
|
3720
3771
|
export interface SetBusinessLocationRequest {
|
|
@@ -3727,7 +3778,7 @@ export interface SetBusinessLocationRequest {
|
|
|
3727
3778
|
businessLocation?: Location;
|
|
3728
3779
|
}
|
|
3729
3780
|
export interface SetBusinessLocationResponse {
|
|
3730
|
-
/** Draft order
|
|
3781
|
+
/** Draft order calculated with the latest changes. */
|
|
3731
3782
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
3732
3783
|
}
|
|
3733
3784
|
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
@@ -3870,13 +3921,13 @@ export declare enum WebhookIdentityType {
|
|
|
3870
3921
|
WIX_USER = "WIX_USER",
|
|
3871
3922
|
APP = "APP"
|
|
3872
3923
|
}
|
|
3873
|
-
type DraftOrderNonNullablePaths = `lineItems` | `lineItems.${number}.added` | `lineItems.${number}.changedDetails.priceBeforeChange.amount` | `lineItems.${number}.changedDetails.priceBeforeChange.formattedAmount` | `lineItems.${number}.changedDetails.priceDescriptionBeforeChange.original` | `lineItems.${number}.removed` | `lineItems.${number}.lineItem._id` | `lineItems.${number}.lineItem.productName.original` | `lineItems.${number}.lineItem.catalogReference.catalogItemId` | `lineItems.${number}.lineItem.catalogReference.appId` | `lineItems.${number}.lineItem.quantity` | `lineItems.${number}.lineItem.physicalProperties.shippable` | `lineItems.${number}.lineItem.itemType.preset` | `lineItems.${number}.lineItem.itemType.custom` | `lineItems.${number}.lineItem.paymentOption` | `lineItems.${number}.lineItem.taxDetails.taxRate` | `lineItems.${number}.lineItem.taxInfo.taxIncludedInPrice` | `lineItems.${number}.lineItem.digitalFile.fileId` | `lineItems.${number}.lineItem.subscriptionInfo.cycleNumber` | `lineItems.${number}.lineItem.subscriptionInfo.subscriptionOptionTitle` | `lineItems.${number}.lineItem.subscriptionInfo.subscriptionSettings.frequency` | `lineItems.${number}.lineItem.subscriptionInfo.subscriptionSettings.autoRenewal` | `shippingInfo.added` | `shippingInfo.changedDetails.shippingInfoBeforeChange.title` | `shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address.streetAddress.number` | `shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address.streetAddress.name` | `shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.contactDetails.vatId._id` | `shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.contactDetails.vatId.type` | `shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.pickupDetails.pickupMethod` | `shippingInfo.changedDetails.shippingInfoBeforeChange.cost.price.amount` | `shippingInfo.changedDetails.shippingInfoBeforeChange.cost.price.formattedAmount` | `shippingInfo.changedDetails.shippingInfoBeforeChange.cost.taxDetails.taxRate` | `shippingInfo.removed` | `buyerInfo.visitorId` | `buyerInfo.memberId` | `billingInfo.address.streetAddress.number` | `billingInfo.address.streetAddress.name` | `billingInfo.contactDetails.vatId._id` | `billingInfo.contactDetails.vatId.type` | `additionalFees` | `additionalFees.${number}.additionalFee.name` | `additionalFees.${number}.additionalFee.price.amount` | `additionalFees.${number}.additionalFee.price.formattedAmount` | `additionalFees.${number}.additionalFee.taxDetails.taxRate` | `additionalFees.${number}.additionalFee._id` | `additionalFees.${number}.taxDetails.taxable` | `additionalFees.${number}.source` | `additionalFees.${number}.applied` | `discounts` | `discounts.${number}.discount.coupon._id` | `discounts.${number}.discount.coupon.code` | `discounts.${number}.discount.coupon.name` | `discounts.${number}.discount.coupon.amount.amount` | `discounts.${number}.discount.coupon.amount.formattedAmount` | `discounts.${number}.discount.merchantDiscount.discountReason` | `discounts.${number}.discount.discountRule._id` | `discounts.${number}.discount.discountRule.name.original` | `discounts.${number}.discount.discountType` | `discounts.${number}.source` | `discounts.${number}.applied` | `createdBy.userId` | `createdBy.appId` | `status` | `weightUnit` | `priceSummary.subtotal.amount` | `priceSummary.subtotal.formattedAmount` | `taxSummary.totalTax.amount` | `taxSummary.totalTax.formattedAmount` | `balanceSummary.balance.amount` | `balanceSummary.balance.formattedAmount` | `balanceSummary.paid.amount` | `balanceSummary.paid.formattedAmount` | `commitSettings.updateInventory` | `commitSettings.updateInventory.${number}.lineItemId` | `recipientInfo.added` | `recipientInfo.changedDetails.recipientInfoBeforeChange.address.streetAddress.number` | `recipientInfo.changedDetails.recipientInfoBeforeChange.address.streetAddress.name` | `recipientInfo.changedDetails.recipientInfoBeforeChange.contactDetails.vatId._id` | `recipientInfo.changedDetails.recipientInfoBeforeChange.contactDetails.vatId.type` | `recipientInfo.removed` | `taxInfo.totalTax.amount` | `taxInfo.totalTax.formattedAmount` | `taxInfo.taxBreakdown` | `taxInfo.taxBreakdown.${number}.taxName` | `taxInfo.taxBreakdown.${number}.taxType` | `taxInfo.taxBreakdown.${number}.jurisdiction` | `taxInfo.taxBreakdown.${number}.jurisdictionType` | `taxInfo.taxBreakdown.${number}.rate` | `buyerDetails.added` | `buyerDetails.changedDetails.buyerInfoBeforeChange.visitorId` | `buyerDetails.changedDetails.buyerInfoBeforeChange.memberId` | `buyerDetails.removed` | `billingDetails.added` | `billingDetails.changedDetails.billingInfoBeforeChange.address.streetAddress.number` | `billingDetails.changedDetails.billingInfoBeforeChange.address.streetAddress.name` | `billingDetails.changedDetails.billingInfoBeforeChange.contactDetails.vatId._id` | `billingDetails.changedDetails.billingInfoBeforeChange.contactDetails.vatId.type` | `billingDetails.removed` | `businessLocationDetails.added` | `businessLocationDetails.changedDetails.businessLocationBeforeChange._id` | `businessLocationDetails.changedDetails.businessLocationBeforeChange.name` | `businessLocationDetails.removed`;
|
|
3924
|
+
type DraftOrderNonNullablePaths = `lineItems` | `lineItems.${number}.added` | `lineItems.${number}.changedDetails.priceBeforeChange.amount` | `lineItems.${number}.changedDetails.priceBeforeChange.formattedAmount` | `lineItems.${number}.changedDetails.priceDescriptionBeforeChange.original` | `lineItems.${number}.removed` | `lineItems.${number}.lineItem._id` | `lineItems.${number}.lineItem.productName.original` | `lineItems.${number}.lineItem.catalogReference.catalogItemId` | `lineItems.${number}.lineItem.catalogReference.appId` | `lineItems.${number}.lineItem.quantity` | `lineItems.${number}.lineItem.physicalProperties.shippable` | `lineItems.${number}.lineItem.itemType.preset` | `lineItems.${number}.lineItem.itemType.custom` | `lineItems.${number}.lineItem.paymentOption` | `lineItems.${number}.lineItem.taxDetails.taxRate` | `lineItems.${number}.lineItem.taxInfo.taxIncludedInPrice` | `lineItems.${number}.lineItem.digitalFile.fileId` | `lineItems.${number}.lineItem.subscriptionInfo.cycleNumber` | `lineItems.${number}.lineItem.subscriptionInfo.subscriptionOptionTitle` | `lineItems.${number}.lineItem.subscriptionInfo.subscriptionSettings.frequency` | `lineItems.${number}.lineItem.subscriptionInfo.subscriptionSettings.autoRenewal` | `lineItems.${number}.lineItem.taxableAddress.addressType` | `shippingInfo.added` | `shippingInfo.changedDetails.shippingInfoBeforeChange.title` | `shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address.streetAddress.number` | `shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address.streetAddress.name` | `shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.contactDetails.vatId._id` | `shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.contactDetails.vatId.type` | `shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.pickupDetails.pickupMethod` | `shippingInfo.changedDetails.shippingInfoBeforeChange.cost.price.amount` | `shippingInfo.changedDetails.shippingInfoBeforeChange.cost.price.formattedAmount` | `shippingInfo.changedDetails.shippingInfoBeforeChange.cost.taxDetails.taxRate` | `shippingInfo.removed` | `buyerInfo.visitorId` | `buyerInfo.memberId` | `billingInfo.address.streetAddress.number` | `billingInfo.address.streetAddress.name` | `billingInfo.contactDetails.vatId._id` | `billingInfo.contactDetails.vatId.type` | `additionalFees` | `additionalFees.${number}.additionalFee.name` | `additionalFees.${number}.additionalFee.price.amount` | `additionalFees.${number}.additionalFee.price.formattedAmount` | `additionalFees.${number}.additionalFee.taxDetails.taxRate` | `additionalFees.${number}.additionalFee._id` | `additionalFees.${number}.taxDetails.taxable` | `additionalFees.${number}.source` | `additionalFees.${number}.applied` | `discounts` | `discounts.${number}.discount.coupon._id` | `discounts.${number}.discount.coupon.code` | `discounts.${number}.discount.coupon.name` | `discounts.${number}.discount.coupon.amount.amount` | `discounts.${number}.discount.coupon.amount.formattedAmount` | `discounts.${number}.discount.merchantDiscount.discountReason` | `discounts.${number}.discount.discountRule._id` | `discounts.${number}.discount.discountRule.name.original` | `discounts.${number}.discount.discountType` | `discounts.${number}.source` | `discounts.${number}.applied` | `createdBy.userId` | `createdBy.appId` | `status` | `weightUnit` | `priceSummary.subtotal.amount` | `priceSummary.subtotal.formattedAmount` | `taxSummary.totalTax.amount` | `taxSummary.totalTax.formattedAmount` | `balanceSummary.balance.amount` | `balanceSummary.balance.formattedAmount` | `balanceSummary.paid.amount` | `balanceSummary.paid.formattedAmount` | `commitSettings.updateInventory` | `commitSettings.updateInventory.${number}.lineItemId` | `recipientInfo.added` | `recipientInfo.changedDetails.recipientInfoBeforeChange.address.streetAddress.number` | `recipientInfo.changedDetails.recipientInfoBeforeChange.address.streetAddress.name` | `recipientInfo.changedDetails.recipientInfoBeforeChange.contactDetails.vatId._id` | `recipientInfo.changedDetails.recipientInfoBeforeChange.contactDetails.vatId.type` | `recipientInfo.removed` | `taxInfo.totalTax.amount` | `taxInfo.totalTax.formattedAmount` | `taxInfo.taxBreakdown` | `taxInfo.taxBreakdown.${number}.taxName` | `taxInfo.taxBreakdown.${number}.taxType` | `taxInfo.taxBreakdown.${number}.jurisdiction` | `taxInfo.taxBreakdown.${number}.jurisdictionType` | `taxInfo.taxBreakdown.${number}.rate` | `buyerDetails.added` | `buyerDetails.changedDetails.buyerInfoBeforeChange.visitorId` | `buyerDetails.changedDetails.buyerInfoBeforeChange.memberId` | `buyerDetails.removed` | `billingDetails.added` | `billingDetails.changedDetails.billingInfoBeforeChange.address.streetAddress.number` | `billingDetails.changedDetails.billingInfoBeforeChange.address.streetAddress.name` | `billingDetails.changedDetails.billingInfoBeforeChange.contactDetails.vatId._id` | `billingDetails.changedDetails.billingInfoBeforeChange.contactDetails.vatId.type` | `billingDetails.removed` | `businessLocationDetails.added` | `businessLocationDetails.changedDetails.businessLocationBeforeChange._id` | `businessLocationDetails.changedDetails.businessLocationBeforeChange.name` | `businessLocationDetails.removed`;
|
|
3874
3925
|
/**
|
|
3875
3926
|
* Creates or gets a draft order.
|
|
3876
3927
|
*
|
|
3877
3928
|
* When passing the ID of an order that is already in draft, the existing draft order will be returned.
|
|
3878
3929
|
* To complete a draft and update the order, call Commit Draft Order([REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/draft-orders/commit-draft-order) | [SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/draft-orders/commit-draft-order)).
|
|
3879
|
-
* @param orderId -
|
|
3930
|
+
* @param orderId - ID of the order to create a draft for.
|
|
3880
3931
|
* @public
|
|
3881
3932
|
* @documentationMaturity preview
|
|
3882
3933
|
* @requiredField orderId
|
|
@@ -3915,7 +3966,7 @@ export declare function createEmptyDraftOrder(): Promise<NonNullablePaths<Create
|
|
|
3915
3966
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
3916
3967
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
3917
3968
|
/**
|
|
3918
|
-
* Adds line items to a draft order.
|
|
3969
|
+
* Adds catalog or custom line items to a draft order.
|
|
3919
3970
|
* @param draftOrderId - Draft order ID.
|
|
3920
3971
|
* @public
|
|
3921
3972
|
* @documentationMaturity preview
|
|
@@ -3941,7 +3992,9 @@ export interface AddLineItemsToDraftOrderOptions {
|
|
|
3941
3992
|
*/
|
|
3942
3993
|
catalogLineItems?: CatalogReferenceLineItem[];
|
|
3943
3994
|
/**
|
|
3944
|
-
* Custom line items to add to draft order.
|
|
3995
|
+
* Custom line items to add to draft order.
|
|
3996
|
+
*
|
|
3997
|
+
* Custom line items do not trigger the Catalog Service Plugin.
|
|
3945
3998
|
* @maxSize 300
|
|
3946
3999
|
*/
|
|
3947
4000
|
customLineItems?: CustomLineItem[];
|
|
@@ -3953,7 +4006,7 @@ export interface AddLineItemsToDraftOrderOptions {
|
|
|
3953
4006
|
* > **Notes:**
|
|
3954
4007
|
* > + Passing a quantity of `0` will remove the line item.
|
|
3955
4008
|
* > + Price cannot be updated for line items with `paymentOption: MEMBERSHIP`.
|
|
3956
|
-
* > + Quantity cannot be decreased fulfilled line items. To
|
|
4009
|
+
* > + Quantity cannot be decreased fulfilled line items. To retrive fulfillment information, pass the order ID to [List Fulfillments For Single Order](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/order-fulfillments/list-fulfillments-for-single-order).
|
|
3957
4010
|
* @param draftOrderId - Draft order ID.
|
|
3958
4011
|
* @param lineItemChanges - Details of changes to apply per line item.
|
|
3959
4012
|
* @public
|
|
@@ -3977,11 +4030,12 @@ export declare function updateLineItems(draftOrderId: string, lineItemChanges: N
|
|
|
3977
4030
|
/**
|
|
3978
4031
|
* Applies or unapplies discounts on a draft order.
|
|
3979
4032
|
*
|
|
3980
|
-
* Unapplied discounts are still part of draft order, but do not affect balance.
|
|
3981
|
-
* Existing discounts
|
|
4033
|
+
* Unapplied discounts are still part of the draft order, but do not affect balance.
|
|
4034
|
+
* Existing discounts that are not passed in the request will keep their current state.
|
|
3982
4035
|
* @param draftOrderId - Draft order ID.
|
|
3983
|
-
* @param discounts -
|
|
3984
|
-
*
|
|
4036
|
+
* @param discounts - Discounts to set on the draft order.
|
|
4037
|
+
*
|
|
4038
|
+
* Any existing discounts that are not passed will not change.
|
|
3985
4039
|
* @public
|
|
3986
4040
|
* @documentationMaturity preview
|
|
3987
4041
|
* @requiredField discounts
|
|
@@ -4002,9 +4056,9 @@ export declare function setDiscounts(draftOrderId: string, discounts: NonNullabl
|
|
|
4002
4056
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4003
4057
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4004
4058
|
/**
|
|
4005
|
-
*
|
|
4059
|
+
* Creates custom discounts.
|
|
4006
4060
|
*
|
|
4007
|
-
* Newly
|
|
4061
|
+
* Newly created discounts are unapplied by default.
|
|
4008
4062
|
* To apply them, use Set Discounts ([REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/draft-orders/set-discounts) | [SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/draft-orders/set-discounts)).
|
|
4009
4063
|
* @param draftOrderId - Draft order ID.
|
|
4010
4064
|
* @public
|
|
@@ -4028,16 +4082,18 @@ export declare function createCustomDiscounts(draftOrderId: string, options?: No
|
|
|
4028
4082
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4029
4083
|
export interface CreateCustomDiscountsOptions {
|
|
4030
4084
|
/**
|
|
4031
|
-
*
|
|
4085
|
+
* Custom discounts to create.
|
|
4086
|
+
*
|
|
4087
|
+
* Created discounts are not applied by default.
|
|
4032
4088
|
* @minSize 1
|
|
4033
4089
|
* @maxSize 100
|
|
4034
4090
|
*/
|
|
4035
4091
|
discounts?: DiscountOption[];
|
|
4036
4092
|
}
|
|
4037
4093
|
/**
|
|
4038
|
-
*
|
|
4094
|
+
* Removes custom discounts from a draft order.
|
|
4039
4095
|
* @param draftOrderId - Draft order ID.
|
|
4040
|
-
* @param discountIds -
|
|
4096
|
+
* @param discountIds - IDs of the discounts to remove from the draft order.
|
|
4041
4097
|
* @public
|
|
4042
4098
|
* @documentationMaturity preview
|
|
4043
4099
|
* @requiredField discountIds
|
|
@@ -4058,11 +4114,12 @@ export declare function deleteCustomDiscounts(draftOrderId: string, discountIds:
|
|
|
4058
4114
|
/**
|
|
4059
4115
|
* Applies or unapplies additional fees on a draft order.
|
|
4060
4116
|
*
|
|
4061
|
-
*
|
|
4062
|
-
* Existing additional fees
|
|
4117
|
+
* Additional fees that are not applied are still part of the draft order, but do not affect balance.
|
|
4118
|
+
* Existing additional fees that are not passed in the request will keep their current state.
|
|
4063
4119
|
* @param draftOrderId - Draft order ID.
|
|
4064
|
-
* @param additionalFees - Additional
|
|
4065
|
-
*
|
|
4120
|
+
* @param additionalFees - Additional fees to set on the draft order.
|
|
4121
|
+
*
|
|
4122
|
+
* Any existing additional fees that are not passed will not change.
|
|
4066
4123
|
* @public
|
|
4067
4124
|
* @documentationMaturity preview
|
|
4068
4125
|
* @requiredField additionalFees
|
|
@@ -4085,7 +4142,7 @@ export declare function setAdditionalFees(draftOrderId: string, additionalFees:
|
|
|
4085
4142
|
/**
|
|
4086
4143
|
* Creates custom additional fees on a draft order.
|
|
4087
4144
|
*
|
|
4088
|
-
* Newly
|
|
4145
|
+
* Newly created additional fees are not applied by default.
|
|
4089
4146
|
* To apply them, use Set Additional Fees ([REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/draft-orders/set-additional-fees) | [SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/draft-orders/set-additional-fees)).
|
|
4090
4147
|
* @param draftOrderId - Draft order ID.
|
|
4091
4148
|
* @public
|
|
@@ -4109,16 +4166,18 @@ export declare function createCustomAdditionalFees(draftOrderId: string, options
|
|
|
4109
4166
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4110
4167
|
export interface CreateCustomAdditionalFeesOptions {
|
|
4111
4168
|
/**
|
|
4112
|
-
*
|
|
4169
|
+
* Custom additional fees to create.
|
|
4170
|
+
*
|
|
4171
|
+
* Created additional fees are not applied by default.
|
|
4113
4172
|
* @minSize 1
|
|
4114
4173
|
* @maxSize 100
|
|
4115
4174
|
*/
|
|
4116
4175
|
customAdditionalFees?: AdditionalFeeOption[];
|
|
4117
4176
|
}
|
|
4118
4177
|
/**
|
|
4119
|
-
*
|
|
4178
|
+
* Removes custom additional fees from a draft order.
|
|
4120
4179
|
* @param draftOrderId - Draft order ID.
|
|
4121
|
-
* @param customAdditionalFees -
|
|
4180
|
+
* @param customAdditionalFees - IDs of the additional fees to remove from the draft order.
|
|
4122
4181
|
* @public
|
|
4123
4182
|
* @documentationMaturity preview
|
|
4124
4183
|
* @requiredField customAdditionalFees
|
|
@@ -4156,7 +4215,11 @@ export declare function setShippingInfo(draftOrderId: string, options?: SetShipp
|
|
|
4156
4215
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4157
4216
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4158
4217
|
export interface SetShippingInfoOptions {
|
|
4159
|
-
/**
|
|
4218
|
+
/**
|
|
4219
|
+
* Shipping info to set on the draft order.
|
|
4220
|
+
*
|
|
4221
|
+
* > **Note:** Passing an empty object will remove the existing shipping info.
|
|
4222
|
+
*/
|
|
4160
4223
|
shippingInfo?: V1ShippingInformation;
|
|
4161
4224
|
}
|
|
4162
4225
|
/**
|
|
@@ -4179,7 +4242,11 @@ export declare function setBuyerInfo(draftOrderId: string, options?: SetBuyerInf
|
|
|
4179
4242
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4180
4243
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4181
4244
|
export interface SetBuyerInfoOptions {
|
|
4182
|
-
/**
|
|
4245
|
+
/**
|
|
4246
|
+
* Shipping info to set on the draft order.
|
|
4247
|
+
*
|
|
4248
|
+
* > **Note:** Passing an empty object will remove the existing shipping info.
|
|
4249
|
+
*/
|
|
4183
4250
|
buyerInfo?: BuyerInfo;
|
|
4184
4251
|
}
|
|
4185
4252
|
/**
|
|
@@ -4202,7 +4269,11 @@ export declare function setRecipientInfo(draftOrderId: string, options?: SetReci
|
|
|
4202
4269
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4203
4270
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4204
4271
|
export interface SetRecipientInfoOptions {
|
|
4205
|
-
/**
|
|
4272
|
+
/**
|
|
4273
|
+
* Recipient address and contact details.
|
|
4274
|
+
*
|
|
4275
|
+
* > **Note:** Passing an empty object will remove the existing recipient info.
|
|
4276
|
+
*/
|
|
4206
4277
|
recipientInfo?: AddressWithContact;
|
|
4207
4278
|
}
|
|
4208
4279
|
/**
|
|
@@ -4225,16 +4296,22 @@ export declare function setBillingInfo(draftOrderId: string, options?: SetBillin
|
|
|
4225
4296
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4226
4297
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4227
4298
|
export interface SetBillingInfoOptions {
|
|
4228
|
-
/**
|
|
4299
|
+
/**
|
|
4300
|
+
* Billing address and contact details.
|
|
4301
|
+
*
|
|
4302
|
+
* > **Note:** Passing an empty object will remove the existing billing info.
|
|
4303
|
+
*/
|
|
4229
4304
|
billingInfo?: AddressWithContact;
|
|
4230
4305
|
}
|
|
4231
4306
|
/**
|
|
4232
|
-
*
|
|
4307
|
+
* Retrieves a draft order.
|
|
4233
4308
|
*
|
|
4234
|
-
*
|
|
4235
|
-
*
|
|
4236
|
-
*
|
|
4237
|
-
*
|
|
4309
|
+
* The retrieved draft order contains the latest calculations:
|
|
4310
|
+
* + Line items, shipping details, and buyer information.
|
|
4311
|
+
* + Tax details and price totals.
|
|
4312
|
+
* + Automatic discounts and automatic additional fees, along with updated eligibility.
|
|
4313
|
+
*
|
|
4314
|
+
* > **Note:** When retrieving a committed draft order, it **is not recalculated**.
|
|
4238
4315
|
* @param draftOrderId - Draft order ID.
|
|
4239
4316
|
* @public
|
|
4240
4317
|
* @documentationMaturity preview
|
|
@@ -4254,8 +4331,8 @@ export declare function getDraftOrder(draftOrderId: string): Promise<NonNullable
|
|
|
4254
4331
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4255
4332
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4256
4333
|
/**
|
|
4257
|
-
* Checks whether a draft can be created for
|
|
4258
|
-
* @param orderId - Order
|
|
4334
|
+
* Checks whether a draft can be created for an order.
|
|
4335
|
+
* @param orderId - Order ID.
|
|
4259
4336
|
* @public
|
|
4260
4337
|
* @documentationMaturity preview
|
|
4261
4338
|
* @requiredField orderId
|
|
@@ -4271,10 +4348,13 @@ export declare function getDraftOrder(draftOrderId: string): Promise<NonNullable
|
|
|
4271
4348
|
*/
|
|
4272
4349
|
export declare function getOrderDraftabilityStatus(orderId: string): Promise<NonNullablePaths<GetOrderDraftabilityStatusResponse, `orderId` | `orderDraftable` | `nonDraftableReasons`>>;
|
|
4273
4350
|
/**
|
|
4274
|
-
*
|
|
4351
|
+
* Finalizes a draft order and applies its modifications to the associated order.
|
|
4352
|
+
* You can also control which side-effects are executed on commit.
|
|
4275
4353
|
*
|
|
4276
|
-
*
|
|
4277
|
-
*
|
|
4354
|
+
* > **Notes:**
|
|
4355
|
+
* > + The draft order's status is set to `COMMITTED`.
|
|
4356
|
+
* > + Commiting a draft order cannot be undone or reverted.
|
|
4357
|
+
* > + A committed draft order does not allow for further modifications. However, it is kept for reference and can be retrieved.
|
|
4278
4358
|
* @param draftOrderId - Draft order ID.
|
|
4279
4359
|
* @public
|
|
4280
4360
|
* @documentationMaturity preview
|
|
@@ -4292,21 +4372,23 @@ export declare function getOrderDraftabilityStatus(orderId: string): Promise<Non
|
|
|
4292
4372
|
*/
|
|
4293
4373
|
export declare function commitDraftOrder(draftOrderId: string, options?: CommitDraftOrderOptions): Promise<NonNullablePaths<CommitDraftOrderResponse, {
|
|
4294
4374
|
[P in DraftOrderNonNullablePaths]: `committedDraftOrder.${P}`;
|
|
4295
|
-
}[DraftOrderNonNullablePaths] | `orderAfterCommit.number` | `orderAfterCommit.lineItems` | `orderAfterCommit.lineItems.${number}._id` | `orderAfterCommit.lineItems.${number}.productName.original` | `orderAfterCommit.lineItems.${number}.catalogReference.catalogItemId` | `orderAfterCommit.lineItems.${number}.catalogReference.appId` | `orderAfterCommit.lineItems.${number}.quantity` | `orderAfterCommit.lineItems.${number}.totalDiscount.amount` | `orderAfterCommit.lineItems.${number}.totalDiscount.formattedAmount` | `orderAfterCommit.lineItems.${number}.physicalProperties.shippable` | `orderAfterCommit.lineItems.${number}.itemType.preset` | `orderAfterCommit.lineItems.${number}.itemType.custom` | `orderAfterCommit.lineItems.${number}.paymentOption` | `orderAfterCommit.lineItems.${number}.taxDetails.taxRate` | `orderAfterCommit.lineItems.${number}.taxInfo.taxIncludedInPrice` | `orderAfterCommit.lineItems.${number}.digitalFile.fileId` | `orderAfterCommit.lineItems.${number}.subscriptionInfo.cycleNumber` | `orderAfterCommit.lineItems.${number}.subscriptionInfo.subscriptionOptionTitle` | `orderAfterCommit.lineItems.${number}.subscriptionInfo.subscriptionSettings.frequency` | `orderAfterCommit.lineItems.${number}.subscriptionInfo.subscriptionSettings.autoRenewal` | `orderAfterCommit.lineItems.${number}.priceDescription.original` | `orderAfterCommit.buyerInfo.visitorId` | `orderAfterCommit.buyerInfo.memberId` | `orderAfterCommit.paymentStatus` | `orderAfterCommit.fulfillmentStatus` | `orderAfterCommit.weightUnit` | `orderAfterCommit.taxIncludedInPrices` | `orderAfterCommit.billingInfo.address.streetAddress.number` | `orderAfterCommit.billingInfo.address.streetAddress.name` | `orderAfterCommit.billingInfo.contactDetails.vatId._id` | `orderAfterCommit.billingInfo.contactDetails.vatId.type` | `orderAfterCommit.shippingInfo.title` | `orderAfterCommit.shippingInfo.logistics.pickupDetails.pickupMethod` | `orderAfterCommit.status` | `orderAfterCommit.taxInfo.taxBreakdown` | `orderAfterCommit.taxInfo.taxBreakdown.${number}.taxName` | `orderAfterCommit.taxInfo.taxBreakdown.${number}.taxType` | `orderAfterCommit.taxInfo.taxBreakdown.${number}.jurisdiction` | `orderAfterCommit.taxInfo.taxBreakdown.${number}.jurisdictionType` | `orderAfterCommit.taxInfo.taxBreakdown.${number}.rate` | `orderAfterCommit.appliedDiscounts` | `orderAfterCommit.appliedDiscounts.${number}.coupon._id` | `orderAfterCommit.appliedDiscounts.${number}.coupon.code` | `orderAfterCommit.appliedDiscounts.${number}.coupon.name` | `orderAfterCommit.appliedDiscounts.${number}.merchantDiscount.discountReason` | `orderAfterCommit.appliedDiscounts.${number}.discountRule._id` | `orderAfterCommit.appliedDiscounts.${number}.discountRule.name.original` | `orderAfterCommit.appliedDiscounts.${number}.discountType` | `orderAfterCommit.activities` | `orderAfterCommit.activities.${number}.customActivity.appId` | `orderAfterCommit.activities.${number}.customActivity.type` | `orderAfterCommit.activities.${number}.merchantComment.message` | `orderAfterCommit.activities.${number}.orderRefunded.manual` | `orderAfterCommit.activities.${number}.orderRefunded.reason` | `orderAfterCommit.activities.${number}.type` | `orderAfterCommit.attributionSource` | `orderAfterCommit.createdBy.userId` | `orderAfterCommit.createdBy.memberId` | `orderAfterCommit.createdBy.visitorId` | `orderAfterCommit.createdBy.appId` | `orderAfterCommit.channelInfo.type` | `orderAfterCommit.customFields` | `orderAfterCommit.customFields.${number}.title` | `orderAfterCommit.balanceSummary.balance.amount` | `orderAfterCommit.balanceSummary.balance.formattedAmount` | `orderAfterCommit.additionalFees` | `orderAfterCommit.additionalFees.${number}.name` | `orderAfterCommit.additionalFees.${number}._id` | `orderAfterCommit.tags.privateTags.tagIds` | `orderAfterCommit.businessLocation._id` | `orderAfterCommit.businessLocation.name`>>;
|
|
4375
|
+
}[DraftOrderNonNullablePaths] | `orderAfterCommit.number` | `orderAfterCommit.lineItems` | `orderAfterCommit.lineItems.${number}._id` | `orderAfterCommit.lineItems.${number}.productName.original` | `orderAfterCommit.lineItems.${number}.catalogReference.catalogItemId` | `orderAfterCommit.lineItems.${number}.catalogReference.appId` | `orderAfterCommit.lineItems.${number}.quantity` | `orderAfterCommit.lineItems.${number}.totalDiscount.amount` | `orderAfterCommit.lineItems.${number}.totalDiscount.formattedAmount` | `orderAfterCommit.lineItems.${number}.physicalProperties.shippable` | `orderAfterCommit.lineItems.${number}.itemType.preset` | `orderAfterCommit.lineItems.${number}.itemType.custom` | `orderAfterCommit.lineItems.${number}.paymentOption` | `orderAfterCommit.lineItems.${number}.taxDetails.taxRate` | `orderAfterCommit.lineItems.${number}.taxInfo.taxIncludedInPrice` | `orderAfterCommit.lineItems.${number}.digitalFile.fileId` | `orderAfterCommit.lineItems.${number}.subscriptionInfo.cycleNumber` | `orderAfterCommit.lineItems.${number}.subscriptionInfo.subscriptionOptionTitle` | `orderAfterCommit.lineItems.${number}.subscriptionInfo.subscriptionSettings.frequency` | `orderAfterCommit.lineItems.${number}.subscriptionInfo.subscriptionSettings.autoRenewal` | `orderAfterCommit.lineItems.${number}.priceDescription.original` | `orderAfterCommit.lineItems.${number}.taxableAddress.addressType` | `orderAfterCommit.buyerInfo.visitorId` | `orderAfterCommit.buyerInfo.memberId` | `orderAfterCommit.paymentStatus` | `orderAfterCommit.fulfillmentStatus` | `orderAfterCommit.weightUnit` | `orderAfterCommit.taxIncludedInPrices` | `orderAfterCommit.billingInfo.address.streetAddress.number` | `orderAfterCommit.billingInfo.address.streetAddress.name` | `orderAfterCommit.billingInfo.contactDetails.vatId._id` | `orderAfterCommit.billingInfo.contactDetails.vatId.type` | `orderAfterCommit.shippingInfo.title` | `orderAfterCommit.shippingInfo.logistics.pickupDetails.pickupMethod` | `orderAfterCommit.status` | `orderAfterCommit.taxInfo.taxBreakdown` | `orderAfterCommit.taxInfo.taxBreakdown.${number}.taxName` | `orderAfterCommit.taxInfo.taxBreakdown.${number}.taxType` | `orderAfterCommit.taxInfo.taxBreakdown.${number}.jurisdiction` | `orderAfterCommit.taxInfo.taxBreakdown.${number}.jurisdictionType` | `orderAfterCommit.taxInfo.taxBreakdown.${number}.rate` | `orderAfterCommit.appliedDiscounts` | `orderAfterCommit.appliedDiscounts.${number}.coupon._id` | `orderAfterCommit.appliedDiscounts.${number}.coupon.code` | `orderAfterCommit.appliedDiscounts.${number}.coupon.name` | `orderAfterCommit.appliedDiscounts.${number}.merchantDiscount.discountReason` | `orderAfterCommit.appliedDiscounts.${number}.discountRule._id` | `orderAfterCommit.appliedDiscounts.${number}.discountRule.name.original` | `orderAfterCommit.appliedDiscounts.${number}.discountType` | `orderAfterCommit.activities` | `orderAfterCommit.activities.${number}.customActivity.appId` | `orderAfterCommit.activities.${number}.customActivity.type` | `orderAfterCommit.activities.${number}.merchantComment.message` | `orderAfterCommit.activities.${number}.orderRefunded.manual` | `orderAfterCommit.activities.${number}.orderRefunded.reason` | `orderAfterCommit.activities.${number}.type` | `orderAfterCommit.attributionSource` | `orderAfterCommit.createdBy.userId` | `orderAfterCommit.createdBy.memberId` | `orderAfterCommit.createdBy.visitorId` | `orderAfterCommit.createdBy.appId` | `orderAfterCommit.channelInfo.type` | `orderAfterCommit.customFields` | `orderAfterCommit.customFields.${number}.title` | `orderAfterCommit.balanceSummary.balance.amount` | `orderAfterCommit.balanceSummary.balance.formattedAmount` | `orderAfterCommit.additionalFees` | `orderAfterCommit.additionalFees.${number}.name` | `orderAfterCommit.additionalFees.${number}._id` | `orderAfterCommit.tags.privateTags.tagIds` | `orderAfterCommit.businessLocation._id` | `orderAfterCommit.businessLocation.name`>>;
|
|
4296
4376
|
export interface CommitDraftOrderOptions {
|
|
4297
4377
|
/** Optional side effects to trigger. */
|
|
4298
4378
|
commitSettings?: DraftOrderCommitSettings;
|
|
4299
4379
|
/**
|
|
4300
|
-
* Reason for edit,
|
|
4380
|
+
* Reason for edit, provided by user (optional).
|
|
4301
4381
|
* @maxLength 200
|
|
4302
4382
|
*/
|
|
4303
4383
|
reason?: string | null;
|
|
4304
4384
|
}
|
|
4305
4385
|
/**
|
|
4306
|
-
* Creates a new order while specifying which side-effects are executed.
|
|
4386
|
+
* Creates a new order from a draft, while specifying which side-effects are executed.
|
|
4307
4387
|
*
|
|
4308
|
-
*
|
|
4309
|
-
*
|
|
4388
|
+
* > **Notes:**
|
|
4389
|
+
* > + The draft order's status is set to `COMMITTED`.
|
|
4390
|
+
* > + Commiting a draft order cannot be undone or reverted.
|
|
4391
|
+
* > + A committed draft order does not allow for further modifications. However, it is kept for reference and can be retrieved.
|
|
4310
4392
|
* @param draftOrderId - Draft order ID.
|
|
4311
4393
|
* @public
|
|
4312
4394
|
* @documentationMaturity preview
|
|
@@ -4324,12 +4406,12 @@ export interface CommitDraftOrderOptions {
|
|
|
4324
4406
|
*/
|
|
4325
4407
|
export declare function createOrderFromDraft(draftOrderId: string, options?: CreateOrderFromDraftOptions): Promise<NonNullablePaths<CreateOrderFromDraftResponse, {
|
|
4326
4408
|
[P in DraftOrderNonNullablePaths]: `committedDraftOrder.${P}`;
|
|
4327
|
-
}[DraftOrderNonNullablePaths] | `createdOrder.number` | `createdOrder.lineItems` | `createdOrder.lineItems.${number}._id` | `createdOrder.lineItems.${number}.productName.original` | `createdOrder.lineItems.${number}.catalogReference.catalogItemId` | `createdOrder.lineItems.${number}.catalogReference.appId` | `createdOrder.lineItems.${number}.quantity` | `createdOrder.lineItems.${number}.totalDiscount.amount` | `createdOrder.lineItems.${number}.totalDiscount.formattedAmount` | `createdOrder.lineItems.${number}.physicalProperties.shippable` | `createdOrder.lineItems.${number}.itemType.preset` | `createdOrder.lineItems.${number}.itemType.custom` | `createdOrder.lineItems.${number}.paymentOption` | `createdOrder.lineItems.${number}.taxDetails.taxRate` | `createdOrder.lineItems.${number}.taxInfo.taxIncludedInPrice` | `createdOrder.lineItems.${number}.digitalFile.fileId` | `createdOrder.lineItems.${number}.subscriptionInfo.cycleNumber` | `createdOrder.lineItems.${number}.subscriptionInfo.subscriptionOptionTitle` | `createdOrder.lineItems.${number}.subscriptionInfo.subscriptionSettings.frequency` | `createdOrder.lineItems.${number}.subscriptionInfo.subscriptionSettings.autoRenewal` | `createdOrder.lineItems.${number}.priceDescription.original` | `createdOrder.buyerInfo.visitorId` | `createdOrder.buyerInfo.memberId` | `createdOrder.paymentStatus` | `createdOrder.fulfillmentStatus` | `createdOrder.weightUnit` | `createdOrder.taxIncludedInPrices` | `createdOrder.billingInfo.address.streetAddress.number` | `createdOrder.billingInfo.address.streetAddress.name` | `createdOrder.billingInfo.contactDetails.vatId._id` | `createdOrder.billingInfo.contactDetails.vatId.type` | `createdOrder.shippingInfo.title` | `createdOrder.shippingInfo.logistics.pickupDetails.pickupMethod` | `createdOrder.status` | `createdOrder.taxInfo.taxBreakdown` | `createdOrder.taxInfo.taxBreakdown.${number}.taxName` | `createdOrder.taxInfo.taxBreakdown.${number}.taxType` | `createdOrder.taxInfo.taxBreakdown.${number}.jurisdiction` | `createdOrder.taxInfo.taxBreakdown.${number}.jurisdictionType` | `createdOrder.taxInfo.taxBreakdown.${number}.rate` | `createdOrder.appliedDiscounts` | `createdOrder.appliedDiscounts.${number}.coupon._id` | `createdOrder.appliedDiscounts.${number}.coupon.code` | `createdOrder.appliedDiscounts.${number}.coupon.name` | `createdOrder.appliedDiscounts.${number}.merchantDiscount.discountReason` | `createdOrder.appliedDiscounts.${number}.discountRule._id` | `createdOrder.appliedDiscounts.${number}.discountRule.name.original` | `createdOrder.appliedDiscounts.${number}.discountType` | `createdOrder.activities` | `createdOrder.activities.${number}.customActivity.appId` | `createdOrder.activities.${number}.customActivity.type` | `createdOrder.activities.${number}.merchantComment.message` | `createdOrder.activities.${number}.orderRefunded.manual` | `createdOrder.activities.${number}.orderRefunded.reason` | `createdOrder.activities.${number}.type` | `createdOrder.attributionSource` | `createdOrder.createdBy.userId` | `createdOrder.createdBy.memberId` | `createdOrder.createdBy.visitorId` | `createdOrder.createdBy.appId` | `createdOrder.channelInfo.type` | `createdOrder.customFields` | `createdOrder.customFields.${number}.title` | `createdOrder.balanceSummary.balance.amount` | `createdOrder.balanceSummary.balance.formattedAmount` | `createdOrder.additionalFees` | `createdOrder.additionalFees.${number}.name` | `createdOrder.additionalFees.${number}._id` | `createdOrder.tags.privateTags.tagIds` | `createdOrder.businessLocation._id` | `createdOrder.businessLocation.name`>>;
|
|
4409
|
+
}[DraftOrderNonNullablePaths] | `createdOrder.number` | `createdOrder.lineItems` | `createdOrder.lineItems.${number}._id` | `createdOrder.lineItems.${number}.productName.original` | `createdOrder.lineItems.${number}.catalogReference.catalogItemId` | `createdOrder.lineItems.${number}.catalogReference.appId` | `createdOrder.lineItems.${number}.quantity` | `createdOrder.lineItems.${number}.totalDiscount.amount` | `createdOrder.lineItems.${number}.totalDiscount.formattedAmount` | `createdOrder.lineItems.${number}.physicalProperties.shippable` | `createdOrder.lineItems.${number}.itemType.preset` | `createdOrder.lineItems.${number}.itemType.custom` | `createdOrder.lineItems.${number}.paymentOption` | `createdOrder.lineItems.${number}.taxDetails.taxRate` | `createdOrder.lineItems.${number}.taxInfo.taxIncludedInPrice` | `createdOrder.lineItems.${number}.digitalFile.fileId` | `createdOrder.lineItems.${number}.subscriptionInfo.cycleNumber` | `createdOrder.lineItems.${number}.subscriptionInfo.subscriptionOptionTitle` | `createdOrder.lineItems.${number}.subscriptionInfo.subscriptionSettings.frequency` | `createdOrder.lineItems.${number}.subscriptionInfo.subscriptionSettings.autoRenewal` | `createdOrder.lineItems.${number}.priceDescription.original` | `createdOrder.lineItems.${number}.taxableAddress.addressType` | `createdOrder.buyerInfo.visitorId` | `createdOrder.buyerInfo.memberId` | `createdOrder.paymentStatus` | `createdOrder.fulfillmentStatus` | `createdOrder.weightUnit` | `createdOrder.taxIncludedInPrices` | `createdOrder.billingInfo.address.streetAddress.number` | `createdOrder.billingInfo.address.streetAddress.name` | `createdOrder.billingInfo.contactDetails.vatId._id` | `createdOrder.billingInfo.contactDetails.vatId.type` | `createdOrder.shippingInfo.title` | `createdOrder.shippingInfo.logistics.pickupDetails.pickupMethod` | `createdOrder.status` | `createdOrder.taxInfo.taxBreakdown` | `createdOrder.taxInfo.taxBreakdown.${number}.taxName` | `createdOrder.taxInfo.taxBreakdown.${number}.taxType` | `createdOrder.taxInfo.taxBreakdown.${number}.jurisdiction` | `createdOrder.taxInfo.taxBreakdown.${number}.jurisdictionType` | `createdOrder.taxInfo.taxBreakdown.${number}.rate` | `createdOrder.appliedDiscounts` | `createdOrder.appliedDiscounts.${number}.coupon._id` | `createdOrder.appliedDiscounts.${number}.coupon.code` | `createdOrder.appliedDiscounts.${number}.coupon.name` | `createdOrder.appliedDiscounts.${number}.merchantDiscount.discountReason` | `createdOrder.appliedDiscounts.${number}.discountRule._id` | `createdOrder.appliedDiscounts.${number}.discountRule.name.original` | `createdOrder.appliedDiscounts.${number}.discountType` | `createdOrder.activities` | `createdOrder.activities.${number}.customActivity.appId` | `createdOrder.activities.${number}.customActivity.type` | `createdOrder.activities.${number}.merchantComment.message` | `createdOrder.activities.${number}.orderRefunded.manual` | `createdOrder.activities.${number}.orderRefunded.reason` | `createdOrder.activities.${number}.type` | `createdOrder.attributionSource` | `createdOrder.createdBy.userId` | `createdOrder.createdBy.memberId` | `createdOrder.createdBy.visitorId` | `createdOrder.createdBy.appId` | `createdOrder.channelInfo.type` | `createdOrder.customFields` | `createdOrder.customFields.${number}.title` | `createdOrder.balanceSummary.balance.amount` | `createdOrder.balanceSummary.balance.formattedAmount` | `createdOrder.additionalFees` | `createdOrder.additionalFees.${number}.name` | `createdOrder.additionalFees.${number}._id` | `createdOrder.tags.privateTags.tagIds` | `createdOrder.businessLocation._id` | `createdOrder.businessLocation.name`>>;
|
|
4328
4410
|
export interface CreateOrderFromDraftOptions {
|
|
4329
4411
|
/** Optional side effects to trigger. */
|
|
4330
4412
|
createSettings?: OrderCreateSettings;
|
|
4331
4413
|
/**
|
|
4332
|
-
* Reason for order creation,
|
|
4414
|
+
* Reason for order creation, provided by user (optional).
|
|
4333
4415
|
* @maxLength 200
|
|
4334
4416
|
*/
|
|
4335
4417
|
reason?: string | null;
|
|
@@ -4339,7 +4421,7 @@ export interface CreateOrderFromDraftOptions {
|
|
|
4339
4421
|
/**
|
|
4340
4422
|
* Deletes a draft order along with all its pending changes.
|
|
4341
4423
|
*
|
|
4342
|
-
* Draft orders
|
|
4424
|
+
* Draft orders with status 'COMMITTED' cannot be deleted.
|
|
4343
4425
|
* @param draftOrderId - Draft order ID.
|
|
4344
4426
|
* @public
|
|
4345
4427
|
* @documentationMaturity preview
|
|
@@ -4366,6 +4448,7 @@ export declare function deleteDraftOrder(draftOrderId: string): Promise<void>;
|
|
|
4366
4448
|
* | `_updatedDate` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()`, `lt()`, `le()`, `gt()`, `ge()` | Sortable |
|
|
4367
4449
|
* | `status` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()` | Sortable |
|
|
4368
4450
|
* | `orderId` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()`, `startsWith()` | |
|
|
4451
|
+
*
|
|
4369
4452
|
* To learn how to query draft orders, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
4370
4453
|
* @public
|
|
4371
4454
|
* @documentationMaturity preview
|
|
@@ -4494,7 +4577,9 @@ export interface UpdateExtendedFieldsOptions {
|
|
|
4494
4577
|
namespaceData: Record<string, any> | null;
|
|
4495
4578
|
}
|
|
4496
4579
|
/**
|
|
4497
|
-
* Sets
|
|
4580
|
+
* Sets whether a draft order is tax-exempt.
|
|
4581
|
+
*
|
|
4582
|
+
* A tax exempted draft order ignores taxes during calculation. Tax information will return empty.
|
|
4498
4583
|
* @param draftOrderId - Draft order ID.
|
|
4499
4584
|
* @public
|
|
4500
4585
|
* @documentationMaturity preview
|
|
@@ -4516,7 +4601,7 @@ export declare function setTaxExemption(draftOrderId: string, options: NonNullab
|
|
|
4516
4601
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4517
4602
|
export interface SetTaxExemptionOptions {
|
|
4518
4603
|
/**
|
|
4519
|
-
*
|
|
4604
|
+
* Whether the draft order is exempt from tax calculations.
|
|
4520
4605
|
*
|
|
4521
4606
|
* Default: `false`
|
|
4522
4607
|
*/
|
|
@@ -4524,6 +4609,8 @@ export interface SetTaxExemptionOptions {
|
|
|
4524
4609
|
}
|
|
4525
4610
|
/**
|
|
4526
4611
|
* Sets business location on a draft order.
|
|
4612
|
+
*
|
|
4613
|
+
* When committed, the order will become associated to a specific business location. This affects who can see and manage this order, and how it is calculated in reports.
|
|
4527
4614
|
* @param draftOrderId - Draft order ID.
|
|
4528
4615
|
* @public
|
|
4529
4616
|
* @documentationMaturity preview
|