@wix/auto_sdk_ecom_draft-orders 1.0.23 → 1.0.25
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.context.d.ts +17 -1
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.context.js +18 -2
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.context.js.map +1 -1
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.http.d.ts +54 -34
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.http.js +54 -34
- 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 +62 -43
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.public.js +213 -2
- 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 +207 -86
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.types.js +11 -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 +457 -136
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.universal.js +115 -47
- 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.context.d.ts +17 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.context.js +16 -0
- package/build/es/src/ecom-v1-draft-order-draft-orders.context.js.map +1 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.http.d.ts +54 -34
- package/build/es/src/ecom-v1-draft-order-draft-orders.http.js +54 -34
- 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 +62 -43
- package/build/es/src/ecom-v1-draft-order-draft-orders.public.js +211 -0
- 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 +207 -86
- package/build/es/src/ecom-v1-draft-order-draft-orders.types.js +11 -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 +457 -136
- package/build/es/src/ecom-v1-draft-order-draft-orders.universal.js +115 -47
- 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.context.d.ts +17 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.context.js +18 -2
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.context.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.http.d.ts +54 -34
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.http.js +54 -34
- 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 +62 -43
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.public.js +213 -2
- 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 +207 -86
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.types.js +11 -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 +459 -137
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.universal.js +115 -47
- 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.context.d.ts +17 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.context.js +16 -0
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.context.js.map +1 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.http.d.ts +54 -34
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.http.js +54 -34
- 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 +62 -43
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.public.js +211 -0
- 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 +207 -86
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.types.js +11 -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 +459 -137
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.universal.js +115 -47
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.universal.js.map +1 -1
- package/package.json +4 -4
|
@@ -112,9 +112,13 @@ export var DiscountReason;
|
|
|
112
112
|
})(DiscountReason || (DiscountReason = {}));
|
|
113
113
|
export var EditingStatus;
|
|
114
114
|
(function (EditingStatus) {
|
|
115
|
-
/** Draft order
|
|
115
|
+
/** Draft order is being edited. */
|
|
116
116
|
EditingStatus["DRAFT"] = "DRAFT";
|
|
117
|
-
/**
|
|
117
|
+
/**
|
|
118
|
+
* Draft order has been committed - No further modifications allowed.
|
|
119
|
+
*
|
|
120
|
+
* Draft orders with status 'COMMITTED' cannot be deleted.
|
|
121
|
+
*/
|
|
118
122
|
EditingStatus["COMMITTED"] = "COMMITTED";
|
|
119
123
|
})(EditingStatus || (EditingStatus = {}));
|
|
120
124
|
export var WeightUnit;
|
|
@@ -129,9 +133,9 @@ export var WeightUnit;
|
|
|
129
133
|
export var PickupMethod;
|
|
130
134
|
(function (PickupMethod) {
|
|
131
135
|
PickupMethod["UNKNOWN_METHOD"] = "UNKNOWN_METHOD";
|
|
132
|
-
/**
|
|
136
|
+
/** Store pickup. */
|
|
133
137
|
PickupMethod["STORE_PICKUP"] = "STORE_PICKUP";
|
|
134
|
-
/**
|
|
138
|
+
/** Pickup point. */
|
|
135
139
|
PickupMethod["PICKUP_POINT"] = "PICKUP_POINT";
|
|
136
140
|
})(PickupMethod || (PickupMethod = {}));
|
|
137
141
|
export var RuleType;
|
|
@@ -170,11 +174,11 @@ export var FileType;
|
|
|
170
174
|
export var DiscountType;
|
|
171
175
|
(function (DiscountType) {
|
|
172
176
|
DiscountType["UNKNOWN_TYPE"] = "UNKNOWN_TYPE";
|
|
173
|
-
/** Discount applies to entire order. */
|
|
177
|
+
/** Discount applies to the entire order. */
|
|
174
178
|
DiscountType["GLOBAL"] = "GLOBAL";
|
|
175
|
-
/** Discount applies to specific
|
|
179
|
+
/** Discount applies to a specific item. */
|
|
176
180
|
DiscountType["SPECIFIC_ITEMS"] = "SPECIFIC_ITEMS";
|
|
177
|
-
/** Discount applies to shipping
|
|
181
|
+
/** Discount applies to shipping fee. */
|
|
178
182
|
DiscountType["SHIPPING"] = "SHIPPING";
|
|
179
183
|
})(DiscountType || (DiscountType = {}));
|
|
180
184
|
export var NonDraftableReason;
|
|
@@ -380,11 +384,11 @@ export var WebhookIdentityType;
|
|
|
380
384
|
WebhookIdentityType["APP"] = "APP";
|
|
381
385
|
})(WebhookIdentityType || (WebhookIdentityType = {}));
|
|
382
386
|
/**
|
|
383
|
-
* Creates or
|
|
387
|
+
* Creates or retrieves a draft order based on the specified order ID.
|
|
384
388
|
*
|
|
385
|
-
* When passing the ID of an order that is already in draft, the existing draft order
|
|
386
|
-
* To complete a draft and update the order, call Commit Draft Order
|
|
387
|
-
* @param orderId -
|
|
389
|
+
* When passing the ID of an order that is already in draft, the existing draft order is returned.
|
|
390
|
+
* To complete a draft and update the original order, call Commit Draft Order.
|
|
391
|
+
* @param orderId - ID of the order to create a draft for.
|
|
388
392
|
* @public
|
|
389
393
|
* @documentationMaturity preview
|
|
390
394
|
* @requiredField orderId
|
|
@@ -393,6 +397,8 @@ export var WebhookIdentityType;
|
|
|
393
397
|
* @permissionId DRAFT_ORDER_WRITE_ALL_EXTENDED_FIELDS
|
|
394
398
|
* @permissionScope Manage Stores - all permissions
|
|
395
399
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
400
|
+
* @permissionScope Manage Stores
|
|
401
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
396
402
|
* @permissionScope Manage Restaurants - all permissions
|
|
397
403
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
398
404
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -465,6 +471,8 @@ export async function createDraftOrder(orderId) {
|
|
|
465
471
|
}
|
|
466
472
|
/**
|
|
467
473
|
* Creates an empty draft order.
|
|
474
|
+
*
|
|
475
|
+
* After all relevant details are applied, call Create Order From Draft to convert the draft order to a regular order.
|
|
468
476
|
* @public
|
|
469
477
|
* @documentationMaturity preview
|
|
470
478
|
* @permissionId ECOM.DRAFT_ORDERS_CREATE
|
|
@@ -472,6 +480,8 @@ export async function createDraftOrder(orderId) {
|
|
|
472
480
|
* @permissionId DRAFT_ORDER_WRITE_ALL_EXTENDED_FIELDS
|
|
473
481
|
* @permissionScope Manage Stores - all permissions
|
|
474
482
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
483
|
+
* @permissionScope Manage Stores
|
|
484
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
475
485
|
* @permissionScope Manage Restaurants - all permissions
|
|
476
486
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
477
487
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -543,7 +553,7 @@ export async function createEmptyDraftOrder() {
|
|
|
543
553
|
}
|
|
544
554
|
}
|
|
545
555
|
/**
|
|
546
|
-
* Adds line items to a draft order.
|
|
556
|
+
* Adds catalog or custom line items to a draft order.
|
|
547
557
|
* @param draftOrderId - Draft order ID.
|
|
548
558
|
* @public
|
|
549
559
|
* @documentationMaturity preview
|
|
@@ -552,6 +562,8 @@ export async function createEmptyDraftOrder() {
|
|
|
552
562
|
* @permissionId ECOM.DRAFT_ORDERS_ADD_LINE_ITEMS
|
|
553
563
|
* @permissionScope Manage Stores - all permissions
|
|
554
564
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
565
|
+
* @permissionScope Manage Stores
|
|
566
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
555
567
|
* @permissionScope Manage Restaurants - all permissions
|
|
556
568
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
557
569
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -642,11 +654,11 @@ export async function addLineItemsToDraftOrder(draftOrderId, options) {
|
|
|
642
654
|
/**
|
|
643
655
|
* Updates a draft order's line items.
|
|
644
656
|
*
|
|
645
|
-
*
|
|
657
|
+
* You can update a line item's quantity, price, and description.
|
|
646
658
|
* > **Notes:**
|
|
647
|
-
* > +
|
|
659
|
+
* > + Specifying a quantity of `0` will remove the line item.
|
|
648
660
|
* > + Price cannot be updated for line items with `paymentOption: MEMBERSHIP`.
|
|
649
|
-
* > + Quantity cannot be decreased fulfilled line items. To
|
|
661
|
+
* > + Quantity cannot be decreased for fulfilled line items. To retrieve fulfillment information, specify the order ID when calling List Fulfillments For Single Order ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/order-fulfillments/list-fulfillments-for-single-order) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/order-fulfillments/list-fulfillments-for-single-order)).
|
|
650
662
|
* @param draftOrderId - Draft order ID.
|
|
651
663
|
* @param lineItemChanges - Details of changes to apply per line item.
|
|
652
664
|
* @public
|
|
@@ -657,6 +669,8 @@ export async function addLineItemsToDraftOrder(draftOrderId, options) {
|
|
|
657
669
|
* @permissionId ECOM.DRAFT_ORDERS_MODIFY_ITEMS
|
|
658
670
|
* @permissionScope Manage Stores - all permissions
|
|
659
671
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
672
|
+
* @permissionScope Manage Stores
|
|
673
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
660
674
|
* @permissionScope Manage Restaurants - all permissions
|
|
661
675
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
662
676
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -736,11 +750,12 @@ export async function updateLineItems(draftOrderId, lineItemChanges) {
|
|
|
736
750
|
/**
|
|
737
751
|
* Applies or unapplies discounts on a draft order.
|
|
738
752
|
*
|
|
739
|
-
* Unapplied discounts are still part of draft order, but do not affect balance.
|
|
740
|
-
* Existing discounts
|
|
753
|
+
* Unapplied discounts are still part of the draft order, but do not affect balance.
|
|
754
|
+
* Existing discounts that are not passed in the request will keep their current state.
|
|
741
755
|
* @param draftOrderId - Draft order ID.
|
|
742
|
-
* @param discounts -
|
|
743
|
-
*
|
|
756
|
+
* @param discounts - Discounts to set on the draft order.
|
|
757
|
+
*
|
|
758
|
+
* Any existing discounts that are not passed will not change.
|
|
744
759
|
* @public
|
|
745
760
|
* @documentationMaturity preview
|
|
746
761
|
* @requiredField discounts
|
|
@@ -750,6 +765,8 @@ export async function updateLineItems(draftOrderId, lineItemChanges) {
|
|
|
750
765
|
* @permissionId ECOM.DRAFT_ORDERS_SET_DISCOUNTS
|
|
751
766
|
* @permissionScope Manage Stores - all permissions
|
|
752
767
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
768
|
+
* @permissionScope Manage Stores
|
|
769
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
753
770
|
* @permissionScope Manage Restaurants - all permissions
|
|
754
771
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
755
772
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -824,10 +841,10 @@ export async function setDiscounts(draftOrderId, discounts) {
|
|
|
824
841
|
}
|
|
825
842
|
}
|
|
826
843
|
/**
|
|
827
|
-
*
|
|
844
|
+
* Creates custom discounts.
|
|
828
845
|
*
|
|
829
|
-
* Newly
|
|
830
|
-
* To apply them, use Set Discounts
|
|
846
|
+
* Newly created discounts are unapplied by default.
|
|
847
|
+
* To apply them, use Set Discounts.
|
|
831
848
|
* @param draftOrderId - Draft order ID.
|
|
832
849
|
* @public
|
|
833
850
|
* @documentationMaturity preview
|
|
@@ -838,6 +855,8 @@ export async function setDiscounts(draftOrderId, discounts) {
|
|
|
838
855
|
* @permissionId ECOM.DRAFT_ORDERS_ADD_DISCOUNTS
|
|
839
856
|
* @permissionScope Manage Stores - all permissions
|
|
840
857
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
858
|
+
* @permissionScope Manage Stores
|
|
859
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
841
860
|
* @permissionScope Manage Restaurants - all permissions
|
|
842
861
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
843
862
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -915,9 +934,9 @@ export async function createCustomDiscounts(draftOrderId, options) {
|
|
|
915
934
|
}
|
|
916
935
|
}
|
|
917
936
|
/**
|
|
918
|
-
*
|
|
937
|
+
* Removes custom discounts from a draft order.
|
|
919
938
|
* @param draftOrderId - Draft order ID.
|
|
920
|
-
* @param discountIds -
|
|
939
|
+
* @param discountIds - IDs of the discounts to remove from the draft order.
|
|
921
940
|
* @public
|
|
922
941
|
* @documentationMaturity preview
|
|
923
942
|
* @requiredField discountIds
|
|
@@ -925,6 +944,8 @@ export async function createCustomDiscounts(draftOrderId, options) {
|
|
|
925
944
|
* @permissionId ECOM.DRAFT_ORDERS_DELETE_DISCOUNTS
|
|
926
945
|
* @permissionScope Manage Stores - all permissions
|
|
927
946
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
947
|
+
* @permissionScope Manage Stores
|
|
948
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
928
949
|
* @permissionScope Manage Restaurants - all permissions
|
|
929
950
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
930
951
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -1001,11 +1022,12 @@ export async function deleteCustomDiscounts(draftOrderId, discountIds) {
|
|
|
1001
1022
|
/**
|
|
1002
1023
|
* Applies or unapplies additional fees on a draft order.
|
|
1003
1024
|
*
|
|
1004
|
-
*
|
|
1005
|
-
* Existing additional fees
|
|
1025
|
+
* Additional fees that are not applied are still part of the draft order, but do not affect balance.
|
|
1026
|
+
* Existing additional fees that are not passed in the request will keep their current state.
|
|
1006
1027
|
* @param draftOrderId - Draft order ID.
|
|
1007
|
-
* @param additionalFees - Additional
|
|
1008
|
-
*
|
|
1028
|
+
* @param additionalFees - Additional fees to set on the draft order.
|
|
1029
|
+
*
|
|
1030
|
+
* Any existing additional fees that are not passed will not change.
|
|
1009
1031
|
* @public
|
|
1010
1032
|
* @documentationMaturity preview
|
|
1011
1033
|
* @requiredField additionalFees
|
|
@@ -1015,6 +1037,8 @@ export async function deleteCustomDiscounts(draftOrderId, discountIds) {
|
|
|
1015
1037
|
* @permissionId ECOM.DRAFT_ORDERS_SET_ADDITIONAL_FEES
|
|
1016
1038
|
* @permissionScope Manage Stores - all permissions
|
|
1017
1039
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1040
|
+
* @permissionScope Manage Stores
|
|
1041
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1018
1042
|
* @permissionScope Manage Restaurants - all permissions
|
|
1019
1043
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1020
1044
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -1094,8 +1118,8 @@ export async function setAdditionalFees(draftOrderId, additionalFees) {
|
|
|
1094
1118
|
/**
|
|
1095
1119
|
* Creates custom additional fees on a draft order.
|
|
1096
1120
|
*
|
|
1097
|
-
* Newly
|
|
1098
|
-
* To apply them, use Set Additional Fees
|
|
1121
|
+
* Newly created additional fees are not applied by default.
|
|
1122
|
+
* To apply them, use Set Additional Fees.
|
|
1099
1123
|
* @param draftOrderId - Draft order ID.
|
|
1100
1124
|
* @public
|
|
1101
1125
|
* @documentationMaturity preview
|
|
@@ -1106,6 +1130,8 @@ export async function setAdditionalFees(draftOrderId, additionalFees) {
|
|
|
1106
1130
|
* @permissionId ECOM.DRAFT_ORDERS_CREATE_ADDITIONAL_FEES
|
|
1107
1131
|
* @permissionScope Manage Stores - all permissions
|
|
1108
1132
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1133
|
+
* @permissionScope Manage Stores
|
|
1134
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1109
1135
|
* @permissionScope Manage Restaurants - all permissions
|
|
1110
1136
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1111
1137
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -1183,9 +1209,9 @@ export async function createCustomAdditionalFees(draftOrderId, options) {
|
|
|
1183
1209
|
}
|
|
1184
1210
|
}
|
|
1185
1211
|
/**
|
|
1186
|
-
*
|
|
1212
|
+
* Removes custom additional fees from a draft order.
|
|
1187
1213
|
* @param draftOrderId - Draft order ID.
|
|
1188
|
-
* @param customAdditionalFees -
|
|
1214
|
+
* @param customAdditionalFees - IDs of the additional fees to remove from the draft order.
|
|
1189
1215
|
* @public
|
|
1190
1216
|
* @documentationMaturity preview
|
|
1191
1217
|
* @requiredField customAdditionalFees
|
|
@@ -1193,6 +1219,8 @@ export async function createCustomAdditionalFees(draftOrderId, options) {
|
|
|
1193
1219
|
* @permissionId ECOM.DRAFT_ORDERS_DELETE_ADDITIONAL_FEES
|
|
1194
1220
|
* @permissionScope Manage Stores - all permissions
|
|
1195
1221
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1222
|
+
* @permissionScope Manage Stores
|
|
1223
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1196
1224
|
* @permissionScope Manage Restaurants - all permissions
|
|
1197
1225
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1198
1226
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -1278,6 +1306,8 @@ export async function deleteCustomAdditionalFees(draftOrderId, customAdditionalF
|
|
|
1278
1306
|
* @permissionId ECOM.DRAFT_ORDERS_SET_SHIPPING_INFO
|
|
1279
1307
|
* @permissionScope Manage Stores - all permissions
|
|
1280
1308
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1309
|
+
* @permissionScope Manage Stores
|
|
1310
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1281
1311
|
* @permissionScope Manage Restaurants - all permissions
|
|
1282
1312
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1283
1313
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -1371,6 +1401,8 @@ export async function setShippingInfo(draftOrderId, options) {
|
|
|
1371
1401
|
* @permissionId ECOM.DRAFT_ORDER_SET_BUYER_INFO
|
|
1372
1402
|
* @permissionScope Manage Stores - all permissions
|
|
1373
1403
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1404
|
+
* @permissionScope Manage Stores
|
|
1405
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1374
1406
|
* @permissionScope Manage Restaurants - all permissions
|
|
1375
1407
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1376
1408
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -1456,6 +1488,8 @@ export async function setBuyerInfo(draftOrderId, options) {
|
|
|
1456
1488
|
* @permissionId ECOM.DRAFT_ORDER_SET_RECIPIENT_INFO
|
|
1457
1489
|
* @permissionScope Manage Stores - all permissions
|
|
1458
1490
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1491
|
+
* @permissionScope Manage Stores
|
|
1492
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1459
1493
|
* @permissionScope Manage Restaurants - all permissions
|
|
1460
1494
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1461
1495
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -1546,6 +1580,8 @@ export async function setRecipientInfo(draftOrderId, options) {
|
|
|
1546
1580
|
* @permissionId ECOM.DRAFT_ORDER_SET_BILLING_INFO
|
|
1547
1581
|
* @permissionScope Manage Stores - all permissions
|
|
1548
1582
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1583
|
+
* @permissionScope Manage Stores
|
|
1584
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1549
1585
|
* @permissionScope Manage Restaurants - all permissions
|
|
1550
1586
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1551
1587
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -1628,12 +1664,14 @@ export async function setBillingInfo(draftOrderId, options) {
|
|
|
1628
1664
|
}
|
|
1629
1665
|
}
|
|
1630
1666
|
/**
|
|
1631
|
-
*
|
|
1667
|
+
* Retrieves a draft order.
|
|
1632
1668
|
*
|
|
1633
|
-
*
|
|
1634
|
-
*
|
|
1635
|
-
*
|
|
1636
|
-
*
|
|
1669
|
+
* The retrieved draft order contains the latest calculations:
|
|
1670
|
+
* + Line items, shipping details, and buyer information.
|
|
1671
|
+
* + Tax details and price totals.
|
|
1672
|
+
* + Automatic discounts and automatic additional fees, along with updated eligibility.
|
|
1673
|
+
*
|
|
1674
|
+
* > **Note:** When retrieving a committed draft order, it **is not recalculated**.
|
|
1637
1675
|
* @param draftOrderId - Draft order ID.
|
|
1638
1676
|
* @public
|
|
1639
1677
|
* @documentationMaturity preview
|
|
@@ -1642,6 +1680,8 @@ export async function setBillingInfo(draftOrderId, options) {
|
|
|
1642
1680
|
* @permissionId ECOM.DRAFT_ORDER_READ_ALL_EXTENDED_FIELDS
|
|
1643
1681
|
* @permissionScope Manage Stores - all permissions
|
|
1644
1682
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1683
|
+
* @permissionScope Manage Stores
|
|
1684
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1645
1685
|
* @permissionScope Manage Restaurants - all permissions
|
|
1646
1686
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1647
1687
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -1715,14 +1755,16 @@ export async function getDraftOrder(draftOrderId) {
|
|
|
1715
1755
|
}
|
|
1716
1756
|
}
|
|
1717
1757
|
/**
|
|
1718
|
-
* Checks whether a draft can be created for
|
|
1719
|
-
* @param orderId - Order
|
|
1758
|
+
* Checks whether a draft can be created for an order.
|
|
1759
|
+
* @param orderId - Order ID.
|
|
1720
1760
|
* @public
|
|
1721
1761
|
* @documentationMaturity preview
|
|
1722
1762
|
* @requiredField orderId
|
|
1723
1763
|
* @permissionId ECOM.DRAFT_ORDERS_READ
|
|
1724
1764
|
* @permissionScope Manage Stores - all permissions
|
|
1725
1765
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1766
|
+
* @permissionScope Manage Stores
|
|
1767
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1726
1768
|
* @permissionScope Manage Restaurants - all permissions
|
|
1727
1769
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1728
1770
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -1752,10 +1794,13 @@ export async function getOrderDraftabilityStatus(orderId) {
|
|
|
1752
1794
|
}
|
|
1753
1795
|
}
|
|
1754
1796
|
/**
|
|
1755
|
-
*
|
|
1797
|
+
* Finalizes a draft order and applies its modifications to the associated order.
|
|
1798
|
+
* You can also control which side-effects are executed on commit.
|
|
1756
1799
|
*
|
|
1757
|
-
*
|
|
1758
|
-
*
|
|
1800
|
+
* > **Notes:**
|
|
1801
|
+
* > + The draft order's status is set to `COMMITTED`.
|
|
1802
|
+
* > + Commiting a draft order cannot be undone or reverted.
|
|
1803
|
+
* > + A committed draft order does not allow for further modifications. However, it is kept for reference and can be retrieved.
|
|
1759
1804
|
* @param draftOrderId - Draft order ID.
|
|
1760
1805
|
* @public
|
|
1761
1806
|
* @documentationMaturity preview
|
|
@@ -1764,6 +1809,8 @@ export async function getOrderDraftabilityStatus(orderId) {
|
|
|
1764
1809
|
* @permissionId ECOM.DRAFT_ORDER_READ_ALL_EXTENDED_FIELDS
|
|
1765
1810
|
* @permissionScope Manage Stores - all permissions
|
|
1766
1811
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1812
|
+
* @permissionScope Manage Stores
|
|
1813
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1767
1814
|
* @permissionScope Manage Restaurants - all permissions
|
|
1768
1815
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1769
1816
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -1843,10 +1890,12 @@ export async function commitDraftOrder(draftOrderId, options) {
|
|
|
1843
1890
|
}
|
|
1844
1891
|
}
|
|
1845
1892
|
/**
|
|
1846
|
-
* Creates a new order while specifying which side-effects are executed.
|
|
1893
|
+
* Creates a new order from a draft, while specifying which side-effects are executed.
|
|
1847
1894
|
*
|
|
1848
|
-
*
|
|
1849
|
-
*
|
|
1895
|
+
* > **Notes:**
|
|
1896
|
+
* > + The draft order's status is set to `COMMITTED`.
|
|
1897
|
+
* > + Commiting a draft order cannot be undone or reverted.
|
|
1898
|
+
* > + A committed draft order does not allow for further modifications. However, it is kept for reference and can be retrieved.
|
|
1850
1899
|
* @param draftOrderId - Draft order ID.
|
|
1851
1900
|
* @public
|
|
1852
1901
|
* @documentationMaturity preview
|
|
@@ -1855,6 +1904,8 @@ export async function commitDraftOrder(draftOrderId, options) {
|
|
|
1855
1904
|
* @permissionId ECOM.DRAFT_ORDER_READ_ALL_EXTENDED_FIELDS
|
|
1856
1905
|
* @permissionScope Manage Stores - all permissions
|
|
1857
1906
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1907
|
+
* @permissionScope Manage Stores
|
|
1908
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1858
1909
|
* @permissionScope Manage Restaurants - all permissions
|
|
1859
1910
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1860
1911
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -1938,7 +1989,7 @@ export async function createOrderFromDraft(draftOrderId, options) {
|
|
|
1938
1989
|
/**
|
|
1939
1990
|
* Deletes a draft order along with all its pending changes.
|
|
1940
1991
|
*
|
|
1941
|
-
* Draft orders
|
|
1992
|
+
* Draft orders with status 'COMMITTED' cannot be deleted.
|
|
1942
1993
|
* @param draftOrderId - Draft order ID.
|
|
1943
1994
|
* @public
|
|
1944
1995
|
* @documentationMaturity preview
|
|
@@ -1947,6 +1998,8 @@ export async function createOrderFromDraft(draftOrderId, options) {
|
|
|
1947
1998
|
* @permissionId ECOM.DRAFT_ORDERS_ADMIN_DELETE
|
|
1948
1999
|
* @permissionScope Manage Stores - all permissions
|
|
1949
2000
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
2001
|
+
* @permissionScope Manage Stores
|
|
2002
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1950
2003
|
* @permissionScope Manage Restaurants - all permissions
|
|
1951
2004
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1952
2005
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -1986,11 +2039,14 @@ export async function deleteDraftOrder(draftOrderId) {
|
|
|
1986
2039
|
* | `_updatedDate` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()`, `lt()`, `le()`, `gt()`, `ge()` | Sortable |
|
|
1987
2040
|
* | `status` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()` | Sortable |
|
|
1988
2041
|
* | `orderId` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()`, `startsWith()` | |
|
|
2042
|
+
*
|
|
1989
2043
|
* To learn how to query draft orders, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
1990
2044
|
* @public
|
|
1991
2045
|
* @documentationMaturity preview
|
|
1992
2046
|
* @permissionScope Manage Stores - all permissions
|
|
1993
2047
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
2048
|
+
* @permissionScope Manage Stores
|
|
2049
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1994
2050
|
* @permissionScope Manage Restaurants - all permissions
|
|
1995
2051
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1996
2052
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -2087,12 +2143,16 @@ export function queryDraftOrders() {
|
|
|
2087
2143
|
* @permissionId ECOM.DRAFT_ORDER_WRITE_ALL_EXTENDED_FIELDS
|
|
2088
2144
|
* @permissionScope Manage Stores - all permissions
|
|
2089
2145
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
2146
|
+
* @permissionScope Manage Stores
|
|
2147
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
2090
2148
|
* @permissionScope Manage Restaurants - all permissions
|
|
2091
2149
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
2092
2150
|
* @permissionScope Manage eCommerce - all permissions
|
|
2093
2151
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
2094
2152
|
* @permissionScope Manage Stores - all permissions
|
|
2095
2153
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
2154
|
+
* @permissionScope Manage Stores
|
|
2155
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
2096
2156
|
* @permissionScope Manage Restaurants - all permissions
|
|
2097
2157
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
2098
2158
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -2163,7 +2223,9 @@ export async function updateExtendedFields(_id, namespace, options) {
|
|
|
2163
2223
|
}
|
|
2164
2224
|
}
|
|
2165
2225
|
/**
|
|
2166
|
-
* Sets
|
|
2226
|
+
* Sets whether a draft order is tax-exempt.
|
|
2227
|
+
*
|
|
2228
|
+
* A tax exempted draft order ignores taxes during calculation. Tax information will return empty.
|
|
2167
2229
|
* @param draftOrderId - Draft order ID.
|
|
2168
2230
|
* @public
|
|
2169
2231
|
* @documentationMaturity preview
|
|
@@ -2173,6 +2235,8 @@ export async function updateExtendedFields(_id, namespace, options) {
|
|
|
2173
2235
|
* @permissionId ECOM.DRAFT_ORDER_SET_TAX_EXEMPTION
|
|
2174
2236
|
* @permissionScope Manage Stores - all permissions
|
|
2175
2237
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
2238
|
+
* @permissionScope Manage Stores
|
|
2239
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
2176
2240
|
* @permissionScope Manage Restaurants - all permissions
|
|
2177
2241
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
2178
2242
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -2251,6 +2315,8 @@ export async function setTaxExemption(draftOrderId, options) {
|
|
|
2251
2315
|
}
|
|
2252
2316
|
/**
|
|
2253
2317
|
* Sets business location on a draft order.
|
|
2318
|
+
*
|
|
2319
|
+
* 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.
|
|
2254
2320
|
* @param draftOrderId - Draft order ID.
|
|
2255
2321
|
* @public
|
|
2256
2322
|
* @documentationMaturity preview
|
|
@@ -2259,6 +2325,8 @@ export async function setTaxExemption(draftOrderId, options) {
|
|
|
2259
2325
|
* @permissionId ECOM.DRAFT_ORDER_SET_BUSINESS_LOCATION
|
|
2260
2326
|
* @permissionScope Manage Stores - all permissions
|
|
2261
2327
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
2328
|
+
* @permissionScope Manage Stores
|
|
2329
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
2262
2330
|
* @permissionScope Manage Restaurants - all permissions
|
|
2263
2331
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
2264
2332
|
* @permissionScope Manage eCommerce - all permissions
|