deleteFulfillment( )
Deletes a fulfillment from an order.
Description
The deleteFulfillment()
function returns a Promise that is resolved
to an updated Order
object when the specified fulfillment
is deleted from the order.
Syntax
function deleteFulfillment(orderId: string, fulfillmentId: string): Promise<Order>
deleteFulfillment Parameters
NAME
TYPE
DESCRIPTION
ID of the order to delete the fulfillment from.
ID of the fulfillment to delete.
Returns
Fulfilled - The updated order without the specified fulfillment details.
Return Type:
NAME
TYPE
DESCRIPTION
Unique order ID.
Date and time the order was updated.
The site's displayed language.
Shopping cart ID.
Channel information.
Identity of the order's initiator.
Billing information.
Buyer information.
A note added by the buyer.
Date and time the order was created.
Order currency.
The order's current fulfillment status (whether the order received a tracking number or was delivered/picked up). One of:
"NOT_FULFILLED"
: Order is not yet fulfilled."FULFILLED"
: Order was fulfilled successfully."CANCELED"
: Order was canceled."PARTIALLY_FULFILLED"
: Order was partially fulfilled. For example, when only some of the order's items were fulfilled.
Whether or not the order was archived.
Log of updates related to the order.
Running order number.
Current status of the payment. One of:
"NOT_PAID"
: Payment was not made."PAID"
: Order was successfully paid for."PARTIALLY_REFUNDED"
: Order was partially refunded."FULLY_REFUNDED"
: Order was refunded in full.
Shipping information.
Order items.
Order totals.
The unit in which the order's weight is measured. Either "KG"
or "LB"
. If not provided, the site's default weight unit is used.
Custom field information.
Order fulfillment information.
Discount information.
Refund information.
Subscription information. Omitted unless the order is a subscription. Learn more about selling product subscriptions.
Was this helpful?
Delete a fulfillment
1import wixStoresBackend from 'wix-stores-backend'23export function deleteFulfillment(orderId, fulfillmentId) {4 return wixStoresBackend.deleteFulfillment(orderId, fulfillmentId)5 .then((updatedOrderObject) => {6 // Fulfillment deleted7 const orderFulfillmentStatus = updatedOrderObject.fulfillmentStatus8 })9 .catch((error) => {10 // Fulfillment not deleted11 })12}1314/* Returns a promise that resolves to:15 *16 * {17 * "order": {18 * "_id": "d5d43d01-d9a4-4cc2-b257-61184b881447",19 * "_updatedDate": "2020-06-16T12:39:10.399Z",20 * "buyerLanguage": "en",21 * "channelInfo": {22 * "type": "WEB"23 * },24 * "enteredBy": {25 * "id": "f6c2c0f9-4e9f-a58d-a02d-9af2497294d9",26 * "identityType": "MEMBER"27 * },28 * "billingInfo": {29 * "address": {30 * "formatted": "My company name\n235 W 23rd St\nNew York, New York 10011\nUnited States\n+15555555555",31 * "city": "New York",32 * "country": "USA",33 * "addressLine": "235 W 23rd St",34 * "postalCode": "10011",35 * "subdivision": "NY"36 * },37 * "firstName": "John",38 * "lastName": "Doe",39 * "email": "john.doe@somedomain.com",40 * "phone": "+15555555555",41 * "company": "My company name",42 * "externalTransactionId": "7c03ca74-eaf5-4541-8678-9b857634fdcb",43 * "paidDate": "2020-05-27T12:20:37.994Z",44 * "paymentMethod": "VISA",45 * "paymentGatewayTransactionId": "29A06193U6234935D",46 * "paymentProviderTransactionId": "7c03ca74-eaf5-4541-8678-9b857634fdcb"47 * },48 * "buyerInfo": {49 * "id": "f6c2c0f9-4e9f-a58d-a02d-9af2497294d9",50 * "identityType": "MEMBER",51 * "firstName": "John",52 * "lastName": "Doe",53 * "phone": "+15555555555",54 * "email": "john.doe@somedomain.com"55 * },56 * "_dateCreated": "2020-05-27T12:20:37.966Z",57 * "currency": "ILS",58 * "fulfillmentStatus": "NOT_FULFILLED",59 * "archived": false,60 * "activities": [61 * {62 * "type": "ORDER_PLACED",63 * "timestamp": "2020-05-27T12:20:37.966Z"64 * },65 * {66 * "type": "ORDER_PAID",67 * "timestamp": "2020-05-27T12:20:37.994Z"68 * }69 * ],70 * "number": 10019,71 * "paymentStatus": "PAID",72 * "shippingInfo": {73 * "deliveryOption": "Free Shipping",74 * "estimatedDeliveryTime": "4:30pm",75 * "shippingRegion": "Domestic",76 * "shipmentDetails": {77 * "address": {78 * "formatted": "company name\n235 W 23rd St\nNew York, New York 10011\nUnited States\n5555555555",79 * "city": "New York",80 * "country": "USA",81 * "addressLine": "235 W 23rd St",82 * "postalCode": "10011",83 * "subdivision": "NY"84 * },85 * "firstName": "John",86 * "lastName": "Doe",87 * "email": "john.doe@somedomain.com",88 * "phone": "5555555555",89 * "company": "company name",90 * "tax": 0,91 * "discount": 0,92 * "priceData": null93 * },94 * "pickupDetails": null95 * },96 * "lineItems": [97 * {98 * "index": 1,99 * "quantity": 1,100 * "price": 5,101 * "name": "my product's name",102 * "translatedName": "Nombre traducido",103 * "productId": "3fb6a3c8-988b-8755-04bd-5c59ae0b18ea",104 * "totalPrice": 5,105 * "lineItemType": "PHYSICAL",106 * "options": [107 * {108 * "option": "Size",109 * "selection": "Medium"110 * }111 * ],112 * "customTextFields": [113 * {114 * "title": "Notes for delivery",115 * "value": "Please leave at front door"116 * }117 * ],118 * "weight": 1.42,119 * "sku": "36523641234523",120 * "discount": 0,121 * "tax": 5,122 * "taxIncludedInPrice": true,123 * "priceData": {124 * "price": "5",125 * "totalPrice": 5,126 * "taxIncludedInPrice": true127 * },128 * "mediaItem": null129 * }130 * ],131 * "totals": {132 * "discount": 0,133 * "quantity": 1,134 * "shipping": 0,135 * "subtotal": 5,136 * "tax": 0,137 * "total": 5,138 * "weight": 1.42139 * },140 * "weightUnit": "KG",141 * "customField": {142 * "value": "Please call when outside",143 * "title": "Notes for delivery",144 * "translatedTitle": "Notas de entrega"145 * },146 * "fulfillments": [],147 * "discount": null148 * }149 * }150 *151 */