PATCH

Update Order


Updates an order's properties.

Currently, only the following fields can be updated:

  • order.buyerInfo.email
  • order.buyerLanguage
  • order.weightUnit
  • order.billingInfo.address
  • order.billingInfo.contactDetails
  • order.archived
  • order.attributionSource
  • order.seenByAHuman
  • order.recipientInfo.address
  • order.recipientInfo.contactDetails
  • order.shippingInfo.logistics.shippingDestination.address
  • order.shippingInfo.logistics.shippingDestination.contactDetails
  • order.extendedFields

To update a field's value, include the new value in the order object in the body params. To remove a field's value, pass null.

Note: Removing buyerInfo or contactDetails results in an error.

To update an order's payment status, use Update Payment Status.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage eCommerce - all permissions
Manage Stores - all permissions
Manage Orders
Manage Restaurants - all permissions
Learn more about app permissions.
Endpoint
PATCH
https://www.wixapis.com/ecom/v1/orders/{order.id}

Path Params
order.idstringRequired

Order ID.

Body Params
orderOrderRequired

Order to be updated.

Response Object
orderOrder

Newly created order.

Updates buyer's email.

Request
cURL
curl -X PATCH \ 'https://www.wixapis.com/ecom/v1/orders/6da768ad-3c9f-444a-9465-7ae0b89fd305' \ -H 'Content-type: application/json' \ -H 'Authorization: <AUTH>' \ --data-binary '{ "order": { "buyerInfo": { "email": "a-new-buyerInfo-email@gmail.com" } } }'
Response
JSON
{ "order": { "id": "6da768ad-3c9f-444a-9465-7ae0b89fd305", "number": "10107", "createdDate": "2024-01-04T13:57:09.968Z", "updatedDate": "2024-01-17T15:06:43.658Z", "lineItems": [ { "id": "da4004fd-2ee3-48fa-bb7d-7624f1005348", "productName": { "original": "Ethiopian Yirgacheffe" }, "catalogReference": { "catalogItemId": "93162737-1553-9cd6-6581-b1555bc150bf", "appId": "215238eb-22a5-4c36-9e7b-e7c08025e04e", "options": { "variantId": "3051f244-bb16-40c3-bd91-64fe27fbfbd1" } }, "quantity": 1, "totalDiscount": { "amount": "0", "formattedAmount": "$0.00" }, "descriptionLines": [ { "name": { "original": "Weight", "translated": "Weight" }, "plainText": { "original": "500g", "translated": "500g" } }, { "name": { "original": "Ground for", "translated": "Ground for" } }, { "name": { "original": "What would you like us to print on the custom label?", "translated": "What would you like us to print on the custom label?" }, "plainText": { "original": "", "translated": "" } } ], "image": { "id": "4a5954_4da1a00418774f1bac924194b516155b~mv2.jpg", "url": "https://static.wixstatic.com/media/4a5954_4da1a00418774f1bac924194b516155b~mv2.jpg/v1/fit/w_1500,h_1000,q_90/file.jpg", "height": 1000, "width": 1500 }, "physicalProperties": { "sku": "", "shippable": true }, "itemType": { "preset": "PHYSICAL" }, "price": { "amount": "18.00", "formattedAmount": "$18.00" }, "totalPriceBeforeTax": { "amount": "18.00", "formattedAmount": "$18.00" }, "totalPriceAfterTax": { "amount": "18.00", "formattedAmount": "$18.00" }, "paymentOption": "FULL_PAYMENT_ONLINE", "taxDetails": { "taxRate": "0", "totalTax": { "amount": "0", "formattedAmount": "$0.00" } }, "locations": [], "lineItemPrice": { "amount": "18.00", "formattedAmount": "$18.00" } }, { "id": "99479044-23e6-4dbb-9644-9104e4d99ee2", "productName": { "original": "Barista masterclass" }, "catalogReference": { "catalogItemId": "8c449785-80ab-48ba-8d35-5d123a7a25b8", "appId": "13d21c63-b5ec-5912-8397-c3a5ddb27a97", "options": {} }, "quantity": 1, "totalDiscount": { "amount": "0", "formattedAmount": "$0.00" }, "descriptionLines": [], "itemType": { "preset": "SERVICE" }, "price": { "amount": "10", "formattedAmount": "$10.00" }, "totalPriceBeforeTax": { "amount": "10", "formattedAmount": "$10.00" }, "totalPriceAfterTax": { "amount": "10", "formattedAmount": "$10.00" }, "paymentOption": "FULL_PAYMENT_OFFLINE", "taxDetails": { "taxRate": "0", "totalTax": { "amount": "0", "formattedAmount": "$0.00" } }, "locations": [], "lineItemPrice": { "amount": "10", "formattedAmount": "$10.00" } } ], "buyerInfo": { "contactId": "02b9675a-c6f0-4392-837f-3bde1d4b5e7c", "email": "a-new-buyerInfo-email@gmail.com", "memberId": "02b9675a-c6f0-4392-837f-3bde1d4b5e7c" }, "paymentStatus": "NOT_PAID", "fulfillmentStatus": "PARTIALLY_FULFILLED", "buyerLanguage": "en", "weightUnit": "LB", "currency": "USD", "taxIncludedInPrices": false, "priceSummary": { "subtotal": { "amount": "28.00", "formattedAmount": "$28.00" }, "shipping": { "amount": "5", "formattedAmount": "$5.00" }, "tax": { "amount": "0", "formattedAmount": "$0.00" }, "discount": { "amount": "1", "formattedAmount": "$1.00" }, "total": { "amount": "32.00", "formattedAmount": "$32.00" } }, "billingInfo": { "address": { "country": "US", "subdivision": "US-NY", "city": "New York", "postalCode": "10173", "addressLine": "525 5th Ave", "countryFullname": "United States", "subdivisionFullname": "New York" }, "contactDetails": { "firstName": "John", "lastName": "Doe", "phone": "0555555555", "company": "" } }, "shippingInfo": { "carrierId": "c8a08776-c095-4dec-8553-8f9698d86adc", "code": "4a43a709-d4a0-e07e-33e6-9c8618796577", "title": "Standard shipping", "logistics": { "deliveryTime": "3 - 5 business days", "shippingDestination": { "address": { "country": "US", "subdivision": "US-NY", "city": "New York", "postalCode": "10173", "addressLine": "525 5th Ave", "countryFullname": "United States", "subdivisionFullname": "New York" }, "contactDetails": { "firstName": "John", "lastName": "Doe", "phone": "0555555555", "company": "" } } }, "cost": { "price": { "amount": "5", "formattedAmount": "$5.00" }, "totalPriceBeforeTax": { "amount": "5", "formattedAmount": "$5.00" }, "totalPriceAfterTax": { "amount": "5", "formattedAmount": "$5.00" } }, "region": { "name": "Region 4" } }, "status": "APPROVED", "archived": false, "appliedDiscounts": [ { "discountType": "GLOBAL", "lineItemIds": [], "merchantDiscount": { "amount": { "amount": "1", "formattedAmount": "$1.00" }, "description": "Nice customer" }, "id": "7dcf2c6d-7fda-4733-b997-fe83b087083b" } ], "activities": [ { "id": "8b010b96-5272-4d40-862a-ad579a90a074", "createdDate": "2024-01-04T12:02:10.501Z", "type": "ORDER_PLACED" } ], "attributionSource": "UNSPECIFIED", "createdBy": { "userId": "4a5954f0-8c60-4975-8210-c995c00f6077" }, "channelInfo": { "type": "BACKOFFICE_MERCHANT" }, "seenByAHuman": true, "customFields": [], "balanceSummary": { "balance": { "amount": "32.00", "formattedAmount": "$32.00" }, "paid": { "amount": "0.00", "formattedAmount": "$0.00" }, "refunded": { "amount": "0.00", "formattedAmount": "$0.00" } }, "additionalFees": [], "recipientInfo": { "address": { "country": "US", "subdivision": "US-NY", "city": "New York", "postalCode": "10173", "addressLine": "525 5th Ave", "countryFullname": "United States", "subdivisionFullname": "New York" }, "contactDetails": { "firstName": "John", "lastName": "Doe", "phone": "0555555555", "company": "" } } } }
Errors
428Failed Precondition

There are 2 errors with this status code.

This method may also return standard errors. Learn more about standard Wix errors.

Event TriggersThis method triggers the following events:
Did this help?