@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,6 +304,8 @@ export interface OrderLineItem {
|
|
|
299
304
|
* @maxSize 5
|
|
300
305
|
*/
|
|
301
306
|
locations?: LocationAndQuantity[];
|
|
307
|
+
/** Address used for tax calculation. */
|
|
308
|
+
taxableAddress?: TaxableAddress;
|
|
302
309
|
/**
|
|
303
310
|
* Custom extended fields for the line item object.
|
|
304
311
|
*
|
|
@@ -1130,10 +1137,10 @@ export interface AdditionalFee {
|
|
|
1130
1137
|
lineItemIds?: string[];
|
|
1131
1138
|
}
|
|
1132
1139
|
export interface TaxDetails {
|
|
1133
|
-
/**
|
|
1140
|
+
/** Whether the additional fee is taxable. */
|
|
1134
1141
|
taxable?: boolean;
|
|
1135
1142
|
/**
|
|
1136
|
-
* Optional tax group ID to use when calculating tax for this additional fee
|
|
1143
|
+
* Optional tax group ID to use when calculating tax for this additional fee.
|
|
1137
1144
|
* @format GUID
|
|
1138
1145
|
*/
|
|
1139
1146
|
taxGroupId?: string | null;
|
|
@@ -1309,9 +1316,13 @@ export interface CreatedByStringOneOf {
|
|
|
1309
1316
|
appId?: string;
|
|
1310
1317
|
}
|
|
1311
1318
|
export declare enum EditingStatus {
|
|
1312
|
-
/** Draft order
|
|
1319
|
+
/** Draft order is being edited. */
|
|
1313
1320
|
DRAFT = "DRAFT",
|
|
1314
|
-
/**
|
|
1321
|
+
/**
|
|
1322
|
+
* Draft order has been committed - No further modifications allowed.
|
|
1323
|
+
*
|
|
1324
|
+
* Draft orders with status 'COMMITTED' cannot be deleted.
|
|
1325
|
+
*/
|
|
1315
1326
|
COMMITTED = "COMMITTED"
|
|
1316
1327
|
}
|
|
1317
1328
|
export declare enum WeightUnit {
|
|
@@ -1345,7 +1356,7 @@ export interface TaxSummary {
|
|
|
1345
1356
|
}
|
|
1346
1357
|
export interface BalanceSummary {
|
|
1347
1358
|
/**
|
|
1348
|
-
* Amount left to pay for order to be considered paid.
|
|
1359
|
+
* Amount left to pay for the order to be considered paid.
|
|
1349
1360
|
* @readonly
|
|
1350
1361
|
*/
|
|
1351
1362
|
balance?: Balance;
|
|
@@ -1585,31 +1596,33 @@ export interface BusinessLocationChangedDetails {
|
|
|
1585
1596
|
}
|
|
1586
1597
|
export interface CreateDraftOrderRequest {
|
|
1587
1598
|
/**
|
|
1588
|
-
*
|
|
1599
|
+
* ID of the order to create a draft for.
|
|
1589
1600
|
* @format GUID
|
|
1590
1601
|
*/
|
|
1591
1602
|
orderId: string | null;
|
|
1592
1603
|
}
|
|
1593
1604
|
export interface CreateDraftOrderResponse {
|
|
1594
|
-
/** Draft order
|
|
1605
|
+
/** Draft order calculated with the latest changes. */
|
|
1595
1606
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1596
1607
|
/**
|
|
1597
|
-
*
|
|
1598
|
-
*
|
|
1608
|
+
* Whether the response contains a draft order that existed before request.
|
|
1609
|
+
*
|
|
1610
|
+
* `true`: The draft order already exists and is updated.
|
|
1611
|
+
* `false`: A new draft order is created.
|
|
1599
1612
|
*/
|
|
1600
1613
|
preexistingDraftOrder?: boolean | null;
|
|
1601
1614
|
}
|
|
1602
1615
|
export interface CalculatedDraftOrder {
|
|
1603
|
-
/** Draft order
|
|
1616
|
+
/** Draft order. */
|
|
1604
1617
|
draftOrder?: DraftOrder;
|
|
1605
|
-
/**
|
|
1618
|
+
/** Shipping options. */
|
|
1606
1619
|
shippingOptions?: ShippingOption[];
|
|
1607
1620
|
/** Errors that occurred during calculation. */
|
|
1608
1621
|
calculationErrors?: CalculationErrors;
|
|
1609
1622
|
}
|
|
1610
1623
|
export interface ShippingOption {
|
|
1611
1624
|
/**
|
|
1612
|
-
*
|
|
1625
|
+
* Carrier ID.
|
|
1613
1626
|
* @format GUID
|
|
1614
1627
|
*/
|
|
1615
1628
|
carrierId?: string | null;
|
|
@@ -1625,37 +1638,39 @@ export interface ShippingOption {
|
|
|
1625
1638
|
export interface DeliveryLogistics {
|
|
1626
1639
|
/** When the item is expected to be delivered in free text, e.g "3-5 business days" */
|
|
1627
1640
|
deliveryTime?: string | null;
|
|
1628
|
-
/**
|
|
1641
|
+
/**
|
|
1642
|
+
* Instructions for delivery.
|
|
1643
|
+
*
|
|
1644
|
+
* For example, "Please arrive during business hours."
|
|
1645
|
+
*/
|
|
1629
1646
|
instructions?: string | null;
|
|
1630
|
-
/** Additional pickup details
|
|
1647
|
+
/** Additional pickup details. */
|
|
1631
1648
|
pickupDetails?: PickupDetails;
|
|
1632
|
-
/** Expected delivery time slot
|
|
1649
|
+
/** Expected delivery time slot. */
|
|
1633
1650
|
deliveryTimeSlot?: DeliveryTimeSlot;
|
|
1634
1651
|
}
|
|
1635
1652
|
export interface PickupDetails {
|
|
1636
|
-
/** Pickup address */
|
|
1653
|
+
/** Pickup address. */
|
|
1637
1654
|
address?: Address;
|
|
1638
1655
|
/** Pickup method. */
|
|
1639
1656
|
pickupMethod?: PickupMethod;
|
|
1640
1657
|
}
|
|
1641
1658
|
export declare enum PickupMethod {
|
|
1642
1659
|
UNKNOWN_METHOD = "UNKNOWN_METHOD",
|
|
1643
|
-
/** Pickup is from the merchant's brick and mortar store. */
|
|
1644
1660
|
STORE_PICKUP = "STORE_PICKUP",
|
|
1645
|
-
/** Item is shipped to a specified pickup point. */
|
|
1646
1661
|
PICKUP_POINT = "PICKUP_POINT"
|
|
1647
1662
|
}
|
|
1648
1663
|
export interface DeliveryTimeSlot {
|
|
1649
|
-
/**
|
|
1664
|
+
/** Delivery time slot start time. */
|
|
1650
1665
|
from?: Date | null;
|
|
1651
|
-
/**
|
|
1666
|
+
/** Delivery time slot end time. */
|
|
1652
1667
|
to?: Date | null;
|
|
1653
1668
|
}
|
|
1654
1669
|
export interface ShippingPrice {
|
|
1655
|
-
/**
|
|
1670
|
+
/** Shipping price. Must align with the [currency's decimal separator](https://en.wikipedia.org/wiki/ISO_4217#Active_codes). */
|
|
1656
1671
|
price?: Price;
|
|
1657
1672
|
/**
|
|
1658
|
-
* Currency of the shipping
|
|
1673
|
+
* 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.
|
|
1659
1674
|
* @format CURRENCY
|
|
1660
1675
|
*/
|
|
1661
1676
|
currency?: string;
|
|
@@ -1784,7 +1799,7 @@ export interface CarrierError {
|
|
|
1784
1799
|
export interface CreateEmptyDraftOrderRequest {
|
|
1785
1800
|
}
|
|
1786
1801
|
export interface CreateEmptyDraftOrderResponse {
|
|
1787
|
-
/** Draft order
|
|
1802
|
+
/** Draft order calculated with the latest changes. */
|
|
1788
1803
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1789
1804
|
}
|
|
1790
1805
|
export interface AddLineItemsToDraftOrderRequest {
|
|
@@ -1799,7 +1814,9 @@ export interface AddLineItemsToDraftOrderRequest {
|
|
|
1799
1814
|
*/
|
|
1800
1815
|
catalogLineItems?: CatalogReferenceLineItem[];
|
|
1801
1816
|
/**
|
|
1802
|
-
* Custom line items to add to draft order.
|
|
1817
|
+
* Custom line items to add to draft order.
|
|
1818
|
+
*
|
|
1819
|
+
* Custom line items do not trigger the Catalog Service Plugin.
|
|
1803
1820
|
* @maxSize 300
|
|
1804
1821
|
*/
|
|
1805
1822
|
customLineItems?: CustomLineItem[];
|
|
@@ -1848,7 +1865,9 @@ export interface CustomLineItem {
|
|
|
1848
1865
|
*/
|
|
1849
1866
|
quantity?: number;
|
|
1850
1867
|
/**
|
|
1851
|
-
* Catalog and item reference.
|
|
1868
|
+
* Catalog and item reference.
|
|
1869
|
+
*
|
|
1870
|
+
* Includes IDs for the item and the catalog it came from, as well as further optional info.
|
|
1852
1871
|
* Optional for custom line items, which don't trigger the Catalog service plugin.
|
|
1853
1872
|
*/
|
|
1854
1873
|
catalogReference?: CatalogReference;
|
|
@@ -1917,7 +1936,7 @@ export declare enum FileType {
|
|
|
1917
1936
|
SECURE_ARCHIVE = "SECURE_ARCHIVE"
|
|
1918
1937
|
}
|
|
1919
1938
|
export interface AddLineItemsToDraftOrderResponse {
|
|
1920
|
-
/** Draft order
|
|
1939
|
+
/** Draft order calculated with the latest changes. */
|
|
1921
1940
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1922
1941
|
}
|
|
1923
1942
|
export interface UpdateLineItemsRequest {
|
|
@@ -1940,20 +1959,26 @@ export interface LineItemChangeDetails {
|
|
|
1940
1959
|
*/
|
|
1941
1960
|
lineItemId?: string;
|
|
1942
1961
|
/**
|
|
1943
|
-
* The
|
|
1962
|
+
* The line item's new quantity.
|
|
1963
|
+
*
|
|
1964
|
+
* > **Note:** Passing `0` will remove the line item.
|
|
1944
1965
|
* @max 1000000
|
|
1945
1966
|
*/
|
|
1946
1967
|
newQuantity?: number | null;
|
|
1947
1968
|
/**
|
|
1948
|
-
*
|
|
1969
|
+
* New price for 1 unit of the line item.
|
|
1949
1970
|
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
1950
1971
|
*/
|
|
1951
1972
|
newPrice?: string | null;
|
|
1952
|
-
/**
|
|
1973
|
+
/**
|
|
1974
|
+
* New description for the price.
|
|
1975
|
+
*
|
|
1976
|
+
* For example, when price is `0` but additional details about the actual price are needed - `"Starts at $67"`.
|
|
1977
|
+
*/
|
|
1953
1978
|
newPriceDescription?: PriceDescription;
|
|
1954
1979
|
}
|
|
1955
1980
|
export interface UpdateLineItemsResponse {
|
|
1956
|
-
/** Draft order
|
|
1981
|
+
/** Draft order calculated with the latest changes. */
|
|
1957
1982
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1958
1983
|
}
|
|
1959
1984
|
export interface SetDiscountsRequest {
|
|
@@ -1963,8 +1988,9 @@ export interface SetDiscountsRequest {
|
|
|
1963
1988
|
*/
|
|
1964
1989
|
draftOrderId: string;
|
|
1965
1990
|
/**
|
|
1966
|
-
*
|
|
1967
|
-
*
|
|
1991
|
+
* Discounts to set on the draft order.
|
|
1992
|
+
*
|
|
1993
|
+
* Any existing discounts that are not passed will not change.
|
|
1968
1994
|
* @minSize 1
|
|
1969
1995
|
* @maxSize 320
|
|
1970
1996
|
*/
|
|
@@ -1972,15 +1998,17 @@ export interface SetDiscountsRequest {
|
|
|
1972
1998
|
}
|
|
1973
1999
|
export interface IdAndApplied {
|
|
1974
2000
|
/**
|
|
1975
|
-
* Entity ID.
|
|
2001
|
+
* Entity ID.
|
|
2002
|
+
*
|
|
2003
|
+
* Depending on the context, the value is either a discount ID or an additional fee ID.
|
|
1976
2004
|
* @format GUID
|
|
1977
2005
|
*/
|
|
1978
2006
|
_id?: string;
|
|
1979
|
-
/**
|
|
2007
|
+
/** Whether the discount or additional fee should be applied to the draft order. */
|
|
1980
2008
|
applied?: boolean;
|
|
1981
2009
|
}
|
|
1982
2010
|
export interface SetDiscountsResponse {
|
|
1983
|
-
/** Draft order
|
|
2011
|
+
/** Draft order calculated with the latest changes. */
|
|
1984
2012
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1985
2013
|
}
|
|
1986
2014
|
export interface CreateCustomDiscountsRequest {
|
|
@@ -1990,17 +2018,19 @@ export interface CreateCustomDiscountsRequest {
|
|
|
1990
2018
|
*/
|
|
1991
2019
|
draftOrderId: string;
|
|
1992
2020
|
/**
|
|
1993
|
-
*
|
|
2021
|
+
* Custom discounts to create.
|
|
2022
|
+
*
|
|
2023
|
+
* Created discounts are not applied by default.
|
|
1994
2024
|
* @minSize 1
|
|
1995
2025
|
* @maxSize 100
|
|
1996
2026
|
*/
|
|
1997
2027
|
discounts?: DiscountOption[];
|
|
1998
2028
|
}
|
|
1999
2029
|
export interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
|
|
2000
|
-
/**
|
|
2030
|
+
/** Amount to discount from the line item price. */
|
|
2001
2031
|
priceAmount?: Price;
|
|
2002
2032
|
/**
|
|
2003
|
-
*
|
|
2033
|
+
* Percentage to discount from the line item price.
|
|
2004
2034
|
* @format DECIMAL_VALUE
|
|
2005
2035
|
* @decimalValue options { gte:0, lte:100, maxScale:2 }
|
|
2006
2036
|
*/
|
|
@@ -2028,8 +2058,9 @@ export interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
|
|
|
2028
2058
|
*/
|
|
2029
2059
|
description?: string | null;
|
|
2030
2060
|
/**
|
|
2031
|
-
*
|
|
2032
|
-
*
|
|
2061
|
+
* Whether to apply the discount to the draft order.
|
|
2062
|
+
*
|
|
2063
|
+
* Default: `false`
|
|
2033
2064
|
*/
|
|
2034
2065
|
applyToDraftOrder?: boolean | null;
|
|
2035
2066
|
/**
|
|
@@ -2040,10 +2071,10 @@ export interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
|
|
|
2040
2071
|
}
|
|
2041
2072
|
/** @oneof */
|
|
2042
2073
|
export interface DiscountOptionDiscountAmountOneOf {
|
|
2043
|
-
/**
|
|
2074
|
+
/** Amount to discount from the line item price. */
|
|
2044
2075
|
priceAmount?: Price;
|
|
2045
2076
|
/**
|
|
2046
|
-
*
|
|
2077
|
+
* Percentage to discount from the line item price.
|
|
2047
2078
|
* @format DECIMAL_VALUE
|
|
2048
2079
|
* @decimalValue options { gte:0, lte:100, maxScale:2 }
|
|
2049
2080
|
*/
|
|
@@ -2051,15 +2082,15 @@ export interface DiscountOptionDiscountAmountOneOf {
|
|
|
2051
2082
|
}
|
|
2052
2083
|
export declare enum DiscountType {
|
|
2053
2084
|
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
2054
|
-
/** Discount applies to entire order. */
|
|
2085
|
+
/** Discount applies to the entire order. */
|
|
2055
2086
|
GLOBAL = "GLOBAL",
|
|
2056
|
-
/** Discount applies to specific
|
|
2087
|
+
/** Discount applies to a specific item. */
|
|
2057
2088
|
SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
|
|
2058
|
-
/** Discount applies to shipping
|
|
2089
|
+
/** Discount applies to shipping fee. */
|
|
2059
2090
|
SHIPPING = "SHIPPING"
|
|
2060
2091
|
}
|
|
2061
2092
|
export interface CreateCustomDiscountsResponse {
|
|
2062
|
-
/** Draft order
|
|
2093
|
+
/** Draft order calculated with the latest changes. */
|
|
2063
2094
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2064
2095
|
}
|
|
2065
2096
|
export interface DeleteCustomDiscountsRequest {
|
|
@@ -2069,7 +2100,7 @@ export interface DeleteCustomDiscountsRequest {
|
|
|
2069
2100
|
*/
|
|
2070
2101
|
draftOrderId: string;
|
|
2071
2102
|
/**
|
|
2072
|
-
*
|
|
2103
|
+
* IDs of the discounts to remove from the draft order.
|
|
2073
2104
|
* @format GUID
|
|
2074
2105
|
* @minSize 1
|
|
2075
2106
|
* @maxSize 100
|
|
@@ -2077,7 +2108,7 @@ export interface DeleteCustomDiscountsRequest {
|
|
|
2077
2108
|
discountIds: string[];
|
|
2078
2109
|
}
|
|
2079
2110
|
export interface DeleteCustomDiscountsResponse {
|
|
2080
|
-
/** Draft order
|
|
2111
|
+
/** Draft order calculated with the latest changes. */
|
|
2081
2112
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2082
2113
|
}
|
|
2083
2114
|
export interface SetAdditionalFeesRequest {
|
|
@@ -2087,15 +2118,16 @@ export interface SetAdditionalFeesRequest {
|
|
|
2087
2118
|
*/
|
|
2088
2119
|
draftOrderId: string;
|
|
2089
2120
|
/**
|
|
2090
|
-
* Additional
|
|
2091
|
-
*
|
|
2121
|
+
* Additional fees to set on the draft order.
|
|
2122
|
+
*
|
|
2123
|
+
* Any existing additional fees that are not passed will not change.
|
|
2092
2124
|
* @minSize 1
|
|
2093
2125
|
* @maxSize 100
|
|
2094
2126
|
*/
|
|
2095
2127
|
additionalFees: IdAndApplied[];
|
|
2096
2128
|
}
|
|
2097
2129
|
export interface SetAdditionalFeesResponse {
|
|
2098
|
-
/** Draft order
|
|
2130
|
+
/** Draft order calculated with the latest changes. */
|
|
2099
2131
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2100
2132
|
}
|
|
2101
2133
|
export interface CreateCustomAdditionalFeesRequest {
|
|
@@ -2105,7 +2137,9 @@ export interface CreateCustomAdditionalFeesRequest {
|
|
|
2105
2137
|
*/
|
|
2106
2138
|
draftOrderId: string;
|
|
2107
2139
|
/**
|
|
2108
|
-
*
|
|
2140
|
+
* Custom additional fees to create.
|
|
2141
|
+
*
|
|
2142
|
+
* Created additional fees are not applied by default.
|
|
2109
2143
|
* @minSize 1
|
|
2110
2144
|
* @maxSize 100
|
|
2111
2145
|
*/
|
|
@@ -2113,28 +2147,30 @@ export interface CreateCustomAdditionalFeesRequest {
|
|
|
2113
2147
|
}
|
|
2114
2148
|
export interface AdditionalFeeOption {
|
|
2115
2149
|
/**
|
|
2116
|
-
*
|
|
2150
|
+
* Name of the additional fee.
|
|
2117
2151
|
* @minLength 1
|
|
2118
2152
|
* @maxLength 50
|
|
2119
2153
|
*/
|
|
2120
2154
|
name?: string;
|
|
2121
|
-
/**
|
|
2155
|
+
/** Price of the additional fee. */
|
|
2122
2156
|
price?: Price;
|
|
2123
|
-
/** Tax calculation details */
|
|
2157
|
+
/** Tax calculation details. */
|
|
2124
2158
|
taxDetails?: TaxDetails;
|
|
2125
2159
|
/**
|
|
2126
|
-
*
|
|
2127
|
-
*
|
|
2160
|
+
* Whether to apply the additional fee to the draft order.
|
|
2161
|
+
*
|
|
2162
|
+
* Default: `false`
|
|
2128
2163
|
*/
|
|
2129
2164
|
applyToDraftOrder?: boolean | null;
|
|
2130
2165
|
/**
|
|
2131
|
-
* Additional fee
|
|
2166
|
+
* Additional fee unique code (or ID) for future processing.
|
|
2132
2167
|
* @minLength 1
|
|
2133
2168
|
* @maxLength 100
|
|
2134
2169
|
*/
|
|
2135
2170
|
code?: string | null;
|
|
2136
2171
|
/**
|
|
2137
|
-
*
|
|
2172
|
+
* IDs of the line items associated with this additional fee.
|
|
2173
|
+
*
|
|
2138
2174
|
* If no `lineItemIds` are provided, the fee will be associated with the whole order.
|
|
2139
2175
|
* @format GUID
|
|
2140
2176
|
* @maxSize 300
|
|
@@ -2142,7 +2178,7 @@ export interface AdditionalFeeOption {
|
|
|
2142
2178
|
lineItemIds?: string[];
|
|
2143
2179
|
}
|
|
2144
2180
|
export interface CreateCustomAdditionalFeesResponse {
|
|
2145
|
-
/** Draft order
|
|
2181
|
+
/** Draft order calculated with the latest changes. */
|
|
2146
2182
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2147
2183
|
}
|
|
2148
2184
|
export interface DeleteCustomAdditionalFeesRequest {
|
|
@@ -2152,7 +2188,7 @@ export interface DeleteCustomAdditionalFeesRequest {
|
|
|
2152
2188
|
*/
|
|
2153
2189
|
draftOrderId: string;
|
|
2154
2190
|
/**
|
|
2155
|
-
*
|
|
2191
|
+
* IDs of the additional fees to remove from the draft order.
|
|
2156
2192
|
* @format GUID
|
|
2157
2193
|
* @minSize 1
|
|
2158
2194
|
* @maxSize 100
|
|
@@ -2160,7 +2196,7 @@ export interface DeleteCustomAdditionalFeesRequest {
|
|
|
2160
2196
|
customAdditionalFees: string[];
|
|
2161
2197
|
}
|
|
2162
2198
|
export interface DeleteCustomAdditionalFeesResponse {
|
|
2163
|
-
/** Draft order
|
|
2199
|
+
/** Draft order calculated with the latest changes. */
|
|
2164
2200
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2165
2201
|
}
|
|
2166
2202
|
export interface SetShippingInfoRequest {
|
|
@@ -2169,11 +2205,15 @@ export interface SetShippingInfoRequest {
|
|
|
2169
2205
|
* @format GUID
|
|
2170
2206
|
*/
|
|
2171
2207
|
draftOrderId: string;
|
|
2172
|
-
/**
|
|
2208
|
+
/**
|
|
2209
|
+
* Shipping info to set on the draft order.
|
|
2210
|
+
*
|
|
2211
|
+
* > **Note:** Passing an empty object will remove the existing shipping info.
|
|
2212
|
+
*/
|
|
2173
2213
|
shippingInfo?: V1ShippingInformation;
|
|
2174
2214
|
}
|
|
2175
2215
|
export interface SetShippingInfoResponse {
|
|
2176
|
-
/** Draft order
|
|
2216
|
+
/** Draft order calculated with the latest changes. */
|
|
2177
2217
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2178
2218
|
}
|
|
2179
2219
|
export interface SetBuyerInfoRequest {
|
|
@@ -2182,11 +2222,15 @@ export interface SetBuyerInfoRequest {
|
|
|
2182
2222
|
* @format GUID
|
|
2183
2223
|
*/
|
|
2184
2224
|
draftOrderId: string;
|
|
2185
|
-
/**
|
|
2225
|
+
/**
|
|
2226
|
+
* Shipping info to set on the draft order.
|
|
2227
|
+
*
|
|
2228
|
+
* > **Note:** Passing an empty object will remove the existing shipping info.
|
|
2229
|
+
*/
|
|
2186
2230
|
buyerInfo?: BuyerInfo;
|
|
2187
2231
|
}
|
|
2188
2232
|
export interface SetBuyerInfoResponse {
|
|
2189
|
-
/** Draft order
|
|
2233
|
+
/** Draft order calculated with the latest changes. */
|
|
2190
2234
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2191
2235
|
}
|
|
2192
2236
|
export interface SetRecipientInfoRequest {
|
|
@@ -2195,11 +2239,15 @@ export interface SetRecipientInfoRequest {
|
|
|
2195
2239
|
* @format GUID
|
|
2196
2240
|
*/
|
|
2197
2241
|
draftOrderId: string;
|
|
2198
|
-
/**
|
|
2242
|
+
/**
|
|
2243
|
+
* Recipient address and contact details.
|
|
2244
|
+
*
|
|
2245
|
+
* > **Note:** Passing an empty object will remove the existing recipient info.
|
|
2246
|
+
*/
|
|
2199
2247
|
recipientInfo?: AddressWithContact;
|
|
2200
2248
|
}
|
|
2201
2249
|
export interface SetRecipientInfoResponse {
|
|
2202
|
-
/** Draft order
|
|
2250
|
+
/** Draft order calculated with the latest changes. */
|
|
2203
2251
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2204
2252
|
}
|
|
2205
2253
|
export interface SetBillingInfoRequest {
|
|
@@ -2208,11 +2256,15 @@ export interface SetBillingInfoRequest {
|
|
|
2208
2256
|
* @format GUID
|
|
2209
2257
|
*/
|
|
2210
2258
|
draftOrderId: string;
|
|
2211
|
-
/**
|
|
2259
|
+
/**
|
|
2260
|
+
* Billing address and contact details.
|
|
2261
|
+
*
|
|
2262
|
+
* > **Note:** Passing an empty object will remove the existing billing info.
|
|
2263
|
+
*/
|
|
2212
2264
|
billingInfo?: AddressWithContact;
|
|
2213
2265
|
}
|
|
2214
2266
|
export interface SetBillingInfoResponse {
|
|
2215
|
-
/** Draft order
|
|
2267
|
+
/** Draft order calculated with the latest changes. */
|
|
2216
2268
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2217
2269
|
}
|
|
2218
2270
|
/** Deprecated */
|
|
@@ -2227,7 +2279,7 @@ export interface UpdateShippingInfoRequest {
|
|
|
2227
2279
|
}
|
|
2228
2280
|
/** Deprecated */
|
|
2229
2281
|
export interface UpdateShippingInfoResponse {
|
|
2230
|
-
/** Draft order
|
|
2282
|
+
/** Draft order calculated with the latest changes. */
|
|
2231
2283
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2232
2284
|
}
|
|
2233
2285
|
export interface GetDraftOrderRequest {
|
|
@@ -2238,26 +2290,30 @@ export interface GetDraftOrderRequest {
|
|
|
2238
2290
|
draftOrderId: string;
|
|
2239
2291
|
}
|
|
2240
2292
|
export interface GetDraftOrderResponse {
|
|
2241
|
-
/** Draft order
|
|
2293
|
+
/** Draft order calculated with the latest changes. */
|
|
2242
2294
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2243
2295
|
}
|
|
2244
2296
|
export interface GetOrderDraftabilityStatusRequest {
|
|
2245
2297
|
/**
|
|
2246
|
-
* Order
|
|
2298
|
+
* Order ID.
|
|
2247
2299
|
* @format GUID
|
|
2248
2300
|
*/
|
|
2249
2301
|
orderId: string;
|
|
2250
2302
|
}
|
|
2251
2303
|
export interface GetOrderDraftabilityStatusResponse {
|
|
2252
2304
|
/**
|
|
2253
|
-
* Order
|
|
2305
|
+
* Order ID.
|
|
2254
2306
|
* @format GUID
|
|
2255
2307
|
*/
|
|
2256
2308
|
orderId?: string;
|
|
2257
|
-
/**
|
|
2309
|
+
/**
|
|
2310
|
+
* Whether a draft can be created based on the order.
|
|
2311
|
+
*
|
|
2312
|
+
* Default: `false`
|
|
2313
|
+
*/
|
|
2258
2314
|
orderDraftable?: boolean;
|
|
2259
2315
|
/**
|
|
2260
|
-
* Reasons why
|
|
2316
|
+
* Reasons why a draft order cannot be created from the order.
|
|
2261
2317
|
* @maxSize 5
|
|
2262
2318
|
*/
|
|
2263
2319
|
nonDraftableReasons?: NonDraftableReason[];
|
|
@@ -2294,7 +2350,7 @@ export interface CommitDraftOrderRequest {
|
|
|
2294
2350
|
/** Optional side effects to trigger. */
|
|
2295
2351
|
commitSettings?: DraftOrderCommitSettings;
|
|
2296
2352
|
/**
|
|
2297
|
-
* Reason for edit,
|
|
2353
|
+
* Reason for edit, provided by user (optional).
|
|
2298
2354
|
* @maxLength 200
|
|
2299
2355
|
*/
|
|
2300
2356
|
reason?: string | null;
|
|
@@ -3365,7 +3421,7 @@ export interface CreateOrderFromDraftRequest {
|
|
|
3365
3421
|
/** Optional side effects to trigger. */
|
|
3366
3422
|
createSettings?: OrderCreateSettings;
|
|
3367
3423
|
/**
|
|
3368
|
-
* Reason for order creation,
|
|
3424
|
+
* Reason for order creation, provided by user (optional).
|
|
3369
3425
|
* @maxLength 200
|
|
3370
3426
|
*/
|
|
3371
3427
|
reason?: string | null;
|
|
@@ -3391,7 +3447,7 @@ export interface OrderCreateNotifications {
|
|
|
3391
3447
|
sendNotificationsToBusiness?: boolean | null;
|
|
3392
3448
|
}
|
|
3393
3449
|
export interface CreateOrderFromDraftResponse {
|
|
3394
|
-
/**
|
|
3450
|
+
/** Draft order after commit. */
|
|
3395
3451
|
committedDraftOrder?: DraftOrder;
|
|
3396
3452
|
/** Created order. */
|
|
3397
3453
|
createdOrder?: Order;
|
|
@@ -3517,14 +3573,14 @@ export interface SetTaxExemptionRequest {
|
|
|
3517
3573
|
*/
|
|
3518
3574
|
draftOrderId: string;
|
|
3519
3575
|
/**
|
|
3520
|
-
*
|
|
3576
|
+
* Whether the draft order is exempt from tax calculations.
|
|
3521
3577
|
*
|
|
3522
3578
|
* Default: `false`
|
|
3523
3579
|
*/
|
|
3524
3580
|
taxExempt: boolean | null;
|
|
3525
3581
|
}
|
|
3526
3582
|
export interface SetTaxExemptionResponse {
|
|
3527
|
-
/** Draft order
|
|
3583
|
+
/** Draft order calculated with the latest changes. */
|
|
3528
3584
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
3529
3585
|
}
|
|
3530
3586
|
export interface SetBusinessLocationRequest {
|
|
@@ -3537,7 +3593,7 @@ export interface SetBusinessLocationRequest {
|
|
|
3537
3593
|
businessLocation?: Location;
|
|
3538
3594
|
}
|
|
3539
3595
|
export interface SetBusinessLocationResponse {
|
|
3540
|
-
/** Draft order
|
|
3596
|
+
/** Draft order calculated with the latest changes. */
|
|
3541
3597
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
3542
3598
|
}
|
|
3543
3599
|
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
@@ -3680,13 +3736,13 @@ export declare enum WebhookIdentityType {
|
|
|
3680
3736
|
WIX_USER = "WIX_USER",
|
|
3681
3737
|
APP = "APP"
|
|
3682
3738
|
}
|
|
3683
|
-
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`;
|
|
3739
|
+
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`;
|
|
3684
3740
|
/**
|
|
3685
3741
|
* Creates or gets a draft order.
|
|
3686
3742
|
*
|
|
3687
3743
|
* When passing the ID of an order that is already in draft, the existing draft order will be returned.
|
|
3688
3744
|
* 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)).
|
|
3689
|
-
* @param orderId -
|
|
3745
|
+
* @param orderId - ID of the order to create a draft for.
|
|
3690
3746
|
* @public
|
|
3691
3747
|
* @documentationMaturity preview
|
|
3692
3748
|
* @requiredField orderId
|
|
@@ -3725,7 +3781,7 @@ export declare function createEmptyDraftOrder(): Promise<NonNullablePaths<Create
|
|
|
3725
3781
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
3726
3782
|
}[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`>>;
|
|
3727
3783
|
/**
|
|
3728
|
-
* Adds line items to a draft order.
|
|
3784
|
+
* Adds catalog or custom line items to a draft order.
|
|
3729
3785
|
* @param draftOrderId - Draft order ID.
|
|
3730
3786
|
* @public
|
|
3731
3787
|
* @documentationMaturity preview
|
|
@@ -3751,7 +3807,9 @@ export interface AddLineItemsToDraftOrderOptions {
|
|
|
3751
3807
|
*/
|
|
3752
3808
|
catalogLineItems?: CatalogReferenceLineItem[];
|
|
3753
3809
|
/**
|
|
3754
|
-
* Custom line items to add to draft order.
|
|
3810
|
+
* Custom line items to add to draft order.
|
|
3811
|
+
*
|
|
3812
|
+
* Custom line items do not trigger the Catalog Service Plugin.
|
|
3755
3813
|
* @maxSize 300
|
|
3756
3814
|
*/
|
|
3757
3815
|
customLineItems?: CustomLineItem[];
|
|
@@ -3763,7 +3821,7 @@ export interface AddLineItemsToDraftOrderOptions {
|
|
|
3763
3821
|
* > **Notes:**
|
|
3764
3822
|
* > + Passing a quantity of `0` will remove the line item.
|
|
3765
3823
|
* > + Price cannot be updated for line items with `paymentOption: MEMBERSHIP`.
|
|
3766
|
-
* > + Quantity cannot be decreased fulfilled line items. To
|
|
3824
|
+
* > + 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).
|
|
3767
3825
|
* @param draftOrderId - Draft order ID.
|
|
3768
3826
|
* @param lineItemChanges - Details of changes to apply per line item.
|
|
3769
3827
|
* @public
|
|
@@ -3787,11 +3845,12 @@ export declare function updateLineItems(draftOrderId: string, lineItemChanges: N
|
|
|
3787
3845
|
/**
|
|
3788
3846
|
* Applies or unapplies discounts on a draft order.
|
|
3789
3847
|
*
|
|
3790
|
-
* Unapplied discounts are still part of draft order, but do not affect balance.
|
|
3791
|
-
* Existing discounts
|
|
3848
|
+
* Unapplied discounts are still part of the draft order, but do not affect balance.
|
|
3849
|
+
* Existing discounts that are not passed in the request will keep their current state.
|
|
3792
3850
|
* @param draftOrderId - Draft order ID.
|
|
3793
|
-
* @param discounts -
|
|
3794
|
-
*
|
|
3851
|
+
* @param discounts - Discounts to set on the draft order.
|
|
3852
|
+
*
|
|
3853
|
+
* Any existing discounts that are not passed will not change.
|
|
3795
3854
|
* @public
|
|
3796
3855
|
* @documentationMaturity preview
|
|
3797
3856
|
* @requiredField discounts
|
|
@@ -3812,9 +3871,9 @@ export declare function setDiscounts(draftOrderId: string, discounts: NonNullabl
|
|
|
3812
3871
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
3813
3872
|
}[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`>>;
|
|
3814
3873
|
/**
|
|
3815
|
-
*
|
|
3874
|
+
* Creates custom discounts.
|
|
3816
3875
|
*
|
|
3817
|
-
* Newly
|
|
3876
|
+
* Newly created discounts are unapplied by default.
|
|
3818
3877
|
* 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)).
|
|
3819
3878
|
* @param draftOrderId - Draft order ID.
|
|
3820
3879
|
* @public
|
|
@@ -3838,16 +3897,18 @@ export declare function createCustomDiscounts(draftOrderId: string, options?: No
|
|
|
3838
3897
|
}[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`>>;
|
|
3839
3898
|
export interface CreateCustomDiscountsOptions {
|
|
3840
3899
|
/**
|
|
3841
|
-
*
|
|
3900
|
+
* Custom discounts to create.
|
|
3901
|
+
*
|
|
3902
|
+
* Created discounts are not applied by default.
|
|
3842
3903
|
* @minSize 1
|
|
3843
3904
|
* @maxSize 100
|
|
3844
3905
|
*/
|
|
3845
3906
|
discounts?: DiscountOption[];
|
|
3846
3907
|
}
|
|
3847
3908
|
/**
|
|
3848
|
-
*
|
|
3909
|
+
* Removes custom discounts from a draft order.
|
|
3849
3910
|
* @param draftOrderId - Draft order ID.
|
|
3850
|
-
* @param discountIds -
|
|
3911
|
+
* @param discountIds - IDs of the discounts to remove from the draft order.
|
|
3851
3912
|
* @public
|
|
3852
3913
|
* @documentationMaturity preview
|
|
3853
3914
|
* @requiredField discountIds
|
|
@@ -3868,11 +3929,12 @@ export declare function deleteCustomDiscounts(draftOrderId: string, discountIds:
|
|
|
3868
3929
|
/**
|
|
3869
3930
|
* Applies or unapplies additional fees on a draft order.
|
|
3870
3931
|
*
|
|
3871
|
-
*
|
|
3872
|
-
* Existing additional fees
|
|
3932
|
+
* Additional fees that are not applied are still part of the draft order, but do not affect balance.
|
|
3933
|
+
* Existing additional fees that are not passed in the request will keep their current state.
|
|
3873
3934
|
* @param draftOrderId - Draft order ID.
|
|
3874
|
-
* @param additionalFees - Additional
|
|
3875
|
-
*
|
|
3935
|
+
* @param additionalFees - Additional fees to set on the draft order.
|
|
3936
|
+
*
|
|
3937
|
+
* Any existing additional fees that are not passed will not change.
|
|
3876
3938
|
* @public
|
|
3877
3939
|
* @documentationMaturity preview
|
|
3878
3940
|
* @requiredField additionalFees
|
|
@@ -3895,7 +3957,7 @@ export declare function setAdditionalFees(draftOrderId: string, additionalFees:
|
|
|
3895
3957
|
/**
|
|
3896
3958
|
* Creates custom additional fees on a draft order.
|
|
3897
3959
|
*
|
|
3898
|
-
* Newly
|
|
3960
|
+
* Newly created additional fees are not applied by default.
|
|
3899
3961
|
* 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)).
|
|
3900
3962
|
* @param draftOrderId - Draft order ID.
|
|
3901
3963
|
* @public
|
|
@@ -3919,16 +3981,18 @@ export declare function createCustomAdditionalFees(draftOrderId: string, options
|
|
|
3919
3981
|
}[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`>>;
|
|
3920
3982
|
export interface CreateCustomAdditionalFeesOptions {
|
|
3921
3983
|
/**
|
|
3922
|
-
*
|
|
3984
|
+
* Custom additional fees to create.
|
|
3985
|
+
*
|
|
3986
|
+
* Created additional fees are not applied by default.
|
|
3923
3987
|
* @minSize 1
|
|
3924
3988
|
* @maxSize 100
|
|
3925
3989
|
*/
|
|
3926
3990
|
customAdditionalFees?: AdditionalFeeOption[];
|
|
3927
3991
|
}
|
|
3928
3992
|
/**
|
|
3929
|
-
*
|
|
3993
|
+
* Removes custom additional fees from a draft order.
|
|
3930
3994
|
* @param draftOrderId - Draft order ID.
|
|
3931
|
-
* @param customAdditionalFees -
|
|
3995
|
+
* @param customAdditionalFees - IDs of the additional fees to remove from the draft order.
|
|
3932
3996
|
* @public
|
|
3933
3997
|
* @documentationMaturity preview
|
|
3934
3998
|
* @requiredField customAdditionalFees
|
|
@@ -3966,7 +4030,11 @@ export declare function setShippingInfo(draftOrderId: string, options?: SetShipp
|
|
|
3966
4030
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
3967
4031
|
}[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`>>;
|
|
3968
4032
|
export interface SetShippingInfoOptions {
|
|
3969
|
-
/**
|
|
4033
|
+
/**
|
|
4034
|
+
* Shipping info to set on the draft order.
|
|
4035
|
+
*
|
|
4036
|
+
* > **Note:** Passing an empty object will remove the existing shipping info.
|
|
4037
|
+
*/
|
|
3970
4038
|
shippingInfo?: V1ShippingInformation;
|
|
3971
4039
|
}
|
|
3972
4040
|
/**
|
|
@@ -3989,7 +4057,11 @@ export declare function setBuyerInfo(draftOrderId: string, options?: SetBuyerInf
|
|
|
3989
4057
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
3990
4058
|
}[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`>>;
|
|
3991
4059
|
export interface SetBuyerInfoOptions {
|
|
3992
|
-
/**
|
|
4060
|
+
/**
|
|
4061
|
+
* Shipping info to set on the draft order.
|
|
4062
|
+
*
|
|
4063
|
+
* > **Note:** Passing an empty object will remove the existing shipping info.
|
|
4064
|
+
*/
|
|
3993
4065
|
buyerInfo?: BuyerInfo;
|
|
3994
4066
|
}
|
|
3995
4067
|
/**
|
|
@@ -4012,7 +4084,11 @@ export declare function setRecipientInfo(draftOrderId: string, options?: SetReci
|
|
|
4012
4084
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4013
4085
|
}[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`>>;
|
|
4014
4086
|
export interface SetRecipientInfoOptions {
|
|
4015
|
-
/**
|
|
4087
|
+
/**
|
|
4088
|
+
* Recipient address and contact details.
|
|
4089
|
+
*
|
|
4090
|
+
* > **Note:** Passing an empty object will remove the existing recipient info.
|
|
4091
|
+
*/
|
|
4016
4092
|
recipientInfo?: AddressWithContact;
|
|
4017
4093
|
}
|
|
4018
4094
|
/**
|
|
@@ -4035,16 +4111,22 @@ export declare function setBillingInfo(draftOrderId: string, options?: SetBillin
|
|
|
4035
4111
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4036
4112
|
}[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`>>;
|
|
4037
4113
|
export interface SetBillingInfoOptions {
|
|
4038
|
-
/**
|
|
4114
|
+
/**
|
|
4115
|
+
* Billing address and contact details.
|
|
4116
|
+
*
|
|
4117
|
+
* > **Note:** Passing an empty object will remove the existing billing info.
|
|
4118
|
+
*/
|
|
4039
4119
|
billingInfo?: AddressWithContact;
|
|
4040
4120
|
}
|
|
4041
4121
|
/**
|
|
4042
|
-
*
|
|
4122
|
+
* Retrieves a draft order.
|
|
4123
|
+
*
|
|
4124
|
+
* The retrieved draft order contains the latest calculations:
|
|
4125
|
+
* + Line items, shipping details, and buyer information.
|
|
4126
|
+
* + Tax details and price totals.
|
|
4127
|
+
* + Automatic discounts and automatic additional fees, along with updated eligibility.
|
|
4043
4128
|
*
|
|
4044
|
-
*
|
|
4045
|
-
* Automatic discounts and automatic additional fees will reflect the latest prices and eligibility.
|
|
4046
|
-
* Calculation will be based on current draft order content - items, shipping info and eligible discounts and additional fees.
|
|
4047
|
-
* When retrieving an already committed draft, it's not recalculated and contains data calculated during commit.
|
|
4129
|
+
* > **Note:** When retrieving a committed draft order, it **is not recalculated**.
|
|
4048
4130
|
* @param draftOrderId - Draft order ID.
|
|
4049
4131
|
* @public
|
|
4050
4132
|
* @documentationMaturity preview
|
|
@@ -4064,8 +4146,8 @@ export declare function getDraftOrder(draftOrderId: string): Promise<NonNullable
|
|
|
4064
4146
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4065
4147
|
}[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`>>;
|
|
4066
4148
|
/**
|
|
4067
|
-
* Checks whether a draft can be created for
|
|
4068
|
-
* @param orderId - Order
|
|
4149
|
+
* Checks whether a draft can be created for an order.
|
|
4150
|
+
* @param orderId - Order ID.
|
|
4069
4151
|
* @public
|
|
4070
4152
|
* @documentationMaturity preview
|
|
4071
4153
|
* @requiredField orderId
|
|
@@ -4081,10 +4163,13 @@ export declare function getDraftOrder(draftOrderId: string): Promise<NonNullable
|
|
|
4081
4163
|
*/
|
|
4082
4164
|
export declare function getOrderDraftabilityStatus(orderId: string): Promise<NonNullablePaths<GetOrderDraftabilityStatusResponse, `orderId` | `orderDraftable` | `nonDraftableReasons`>>;
|
|
4083
4165
|
/**
|
|
4084
|
-
*
|
|
4166
|
+
* Finalizes a draft order and applies its modifications to the associated order.
|
|
4167
|
+
* You can also control which side-effects are executed on commit.
|
|
4085
4168
|
*
|
|
4086
|
-
*
|
|
4087
|
-
*
|
|
4169
|
+
* > **Notes:**
|
|
4170
|
+
* > + The draft order's status is set to `COMMITTED`.
|
|
4171
|
+
* > + Commiting a draft order cannot be undone or reverted.
|
|
4172
|
+
* > + A committed draft order does not allow for further modifications. However, it is kept for reference and can be retrieved.
|
|
4088
4173
|
* @param draftOrderId - Draft order ID.
|
|
4089
4174
|
* @public
|
|
4090
4175
|
* @documentationMaturity preview
|
|
@@ -4102,21 +4187,23 @@ export declare function getOrderDraftabilityStatus(orderId: string): Promise<Non
|
|
|
4102
4187
|
*/
|
|
4103
4188
|
export declare function commitDraftOrder(draftOrderId: string, options?: CommitDraftOrderOptions): Promise<NonNullablePaths<CommitDraftOrderResponse, {
|
|
4104
4189
|
[P in DraftOrderNonNullablePaths]: `committedDraftOrder.${P}`;
|
|
4105
|
-
}[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`>>;
|
|
4190
|
+
}[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`>>;
|
|
4106
4191
|
export interface CommitDraftOrderOptions {
|
|
4107
4192
|
/** Optional side effects to trigger. */
|
|
4108
4193
|
commitSettings?: DraftOrderCommitSettings;
|
|
4109
4194
|
/**
|
|
4110
|
-
* Reason for edit,
|
|
4195
|
+
* Reason for edit, provided by user (optional).
|
|
4111
4196
|
* @maxLength 200
|
|
4112
4197
|
*/
|
|
4113
4198
|
reason?: string | null;
|
|
4114
4199
|
}
|
|
4115
4200
|
/**
|
|
4116
|
-
* Creates a new order while specifying which side-effects are executed.
|
|
4201
|
+
* Creates a new order from a draft, while specifying which side-effects are executed.
|
|
4117
4202
|
*
|
|
4118
|
-
*
|
|
4119
|
-
*
|
|
4203
|
+
* > **Notes:**
|
|
4204
|
+
* > + The draft order's status is set to `COMMITTED`.
|
|
4205
|
+
* > + Commiting a draft order cannot be undone or reverted.
|
|
4206
|
+
* > + A committed draft order does not allow for further modifications. However, it is kept for reference and can be retrieved.
|
|
4120
4207
|
* @param draftOrderId - Draft order ID.
|
|
4121
4208
|
* @public
|
|
4122
4209
|
* @documentationMaturity preview
|
|
@@ -4134,12 +4221,12 @@ export interface CommitDraftOrderOptions {
|
|
|
4134
4221
|
*/
|
|
4135
4222
|
export declare function createOrderFromDraft(draftOrderId: string, options?: CreateOrderFromDraftOptions): Promise<NonNullablePaths<CreateOrderFromDraftResponse, {
|
|
4136
4223
|
[P in DraftOrderNonNullablePaths]: `committedDraftOrder.${P}`;
|
|
4137
|
-
}[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`>>;
|
|
4224
|
+
}[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`>>;
|
|
4138
4225
|
export interface CreateOrderFromDraftOptions {
|
|
4139
4226
|
/** Optional side effects to trigger. */
|
|
4140
4227
|
createSettings?: OrderCreateSettings;
|
|
4141
4228
|
/**
|
|
4142
|
-
* Reason for order creation,
|
|
4229
|
+
* Reason for order creation, provided by user (optional).
|
|
4143
4230
|
* @maxLength 200
|
|
4144
4231
|
*/
|
|
4145
4232
|
reason?: string | null;
|
|
@@ -4149,7 +4236,7 @@ export interface CreateOrderFromDraftOptions {
|
|
|
4149
4236
|
/**
|
|
4150
4237
|
* Deletes a draft order along with all its pending changes.
|
|
4151
4238
|
*
|
|
4152
|
-
* Draft orders
|
|
4239
|
+
* Draft orders with status 'COMMITTED' cannot be deleted.
|
|
4153
4240
|
* @param draftOrderId - Draft order ID.
|
|
4154
4241
|
* @public
|
|
4155
4242
|
* @documentationMaturity preview
|
|
@@ -4176,6 +4263,7 @@ export declare function deleteDraftOrder(draftOrderId: string): Promise<void>;
|
|
|
4176
4263
|
* | `_updatedDate` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()`, `lt()`, `le()`, `gt()`, `ge()` | Sortable |
|
|
4177
4264
|
* | `status` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()` | Sortable |
|
|
4178
4265
|
* | `orderId` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()`, `startsWith()` | |
|
|
4266
|
+
*
|
|
4179
4267
|
* To learn how to query draft orders, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
4180
4268
|
* @public
|
|
4181
4269
|
* @documentationMaturity preview
|
|
@@ -4304,7 +4392,9 @@ export interface UpdateExtendedFieldsOptions {
|
|
|
4304
4392
|
namespaceData: Record<string, any> | null;
|
|
4305
4393
|
}
|
|
4306
4394
|
/**
|
|
4307
|
-
* Sets
|
|
4395
|
+
* Sets whether a draft order is tax-exempt.
|
|
4396
|
+
*
|
|
4397
|
+
* A tax exempted draft order ignores taxes during calculation. Tax information will return empty.
|
|
4308
4398
|
* @param draftOrderId - Draft order ID.
|
|
4309
4399
|
* @public
|
|
4310
4400
|
* @documentationMaturity preview
|
|
@@ -4326,7 +4416,7 @@ export declare function setTaxExemption(draftOrderId: string, options: NonNullab
|
|
|
4326
4416
|
}[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`>>;
|
|
4327
4417
|
export interface SetTaxExemptionOptions {
|
|
4328
4418
|
/**
|
|
4329
|
-
*
|
|
4419
|
+
* Whether the draft order is exempt from tax calculations.
|
|
4330
4420
|
*
|
|
4331
4421
|
* Default: `false`
|
|
4332
4422
|
*/
|
|
@@ -4334,6 +4424,8 @@ export interface SetTaxExemptionOptions {
|
|
|
4334
4424
|
}
|
|
4335
4425
|
/**
|
|
4336
4426
|
* Sets business location on a draft order.
|
|
4427
|
+
*
|
|
4428
|
+
* 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.
|
|
4337
4429
|
* @param draftOrderId - Draft order ID.
|
|
4338
4430
|
* @public
|
|
4339
4431
|
* @documentationMaturity preview
|