Update order

This request allows you to update existing orders in an Ecwid store. When updating order information, you can omit unchanged fields – they will be ignored so the resulting order will keep the corresponding information unchanged.

However, please mind that if you want to update the ordered items, you should submit all the items in the request. The omitted items will be removed. This is done this way to let you remove some purchased items from the order.

Access scopes

Requires the following access scope: update_orders

Request body

A JSON object with the following fields:

FieldTypeDescription
subtotalnumberOrder subtotal. Includes the sum of all products' cost in the order (item's price x quantity)
totalnumberOrder total cost. Includes shipping, taxes, discounts, etc.
giftCardRedemptionnumberAmount deducted from the Gift Card balance and applied to order total.
totalBeforeGiftCardRedemptionnumberOrder total before the Gift Card was applied.
emailstringCustomer email address
paymentMethodstringPayment method name
paymentModulestringPayment processor name
taxnumberTax total for order. Sum of all tax in order items, unless they were modified after order was placed
customerTaxExemptbooleantrue if customer is tax exempt, false otherwise. Learn more
customerTaxIdstringCustomer tax ID
customerTaxIdValidbooleantrue if customer tax ID is valid, false otherwise
reversedTaxAppliedbooleantrue if order tax was set to 0 because customer specified their valid tax ID in checkout process. false otherwise
b2b_b2cstringOrder type: business-to-business (b2b) or business-to-consumer (b2c)
customerRequestedInvoicebooleantrue if customer requested an invoice, false otherwise
customerFiscalCodestringFiscale code of a customer
electronicInvoicePecEmailstringPEC email for invoices
electronicInvoiceSdiCodestringSDI code for invoices
ipAddressstringCustomer IP
couponDiscountnumberDiscount applied to order using a coupon
paymentStatusstringPayment status. Supported values: AWAITING_PAYMENT, PAID, CANCELLED, REFUNDED, PARTIALLY_REFUNDED, INCOMPLETE, CUSTOM_PAYMENT_STATUS_1, CUSTOM_PAYMENT_STATUS_2, CUSTOM_PAYMENT_STATUS_3.
fulfillmentStatusstringFulfilment status. Supported values: AWAITING_PROCESSING, PROCESSING, SHIPPED, DELIVERED, WILL_NOT_DELIVER, RETURNED, READY_FOR_PICKUP, OUT_FOR_DELIVERY, CUSTOM_FULFILLMENT_STATUS_1, CUSTOM_FULFILLMENT_STATUS_2, CUSTOM_FULFILLMENT_STATUS_3.
refererUrlstringURL of the page when order was placed (without hash (#) part)
orderCommentsstringCustomer's order comments, specified at checkout
volumeDiscountnumberSum of discounts based on subtotal. Is included into the discount field
customerIdnumberUnique customer internal ID (if the order is placed by a registered user)
hiddenbooleanDetermines if the order is hidden (removed from the list). Applies to unfinished orders only.
membershipBasedDiscountnumberSum of discounts based on customer group. Is included into the discount field
totalAndMembershipBasedDiscountnumberThe sum of discount based on subtotal AND customer group. Is included into the discount field
discountnumberThe sum of all applied discounts except for the coupon discount. To get the total order discount, take the sum of couponDiscount and discount field values. Total order discount is a sum of all discounts applied to items (both regular discount and discount coupons) unless they were modified after order was placed
globalRefererstringURL that the customer came to the store from
customerGroupstringThe name of group (membership) the customer belongs to
discountCoupon<DiscountCouponInfo>Information about applied coupon
itemsArray<OrderItem>Order items
billingPerson<PersonInfo>Name and billing address of the customer
shippingPerson<PersonInfo>Name and address of the person entered in shipping information
shippingOption<ShippingOptionInfo>Information about selected shipping option
handlingFee<HandlingFeeInfo>Handling fee details
additionalInfoMap<string,string>Additional order information if any (reserved for future use)
paymentParamsMap<string,string>Additional payment parameters entered by customer on checkout, e.g. PO number in "Purchase order" payments
discountInfoArray<DiscountInfo>Information about applied discounts (coupons are not included)
trackingNumberstringShipping tracking code
paymentMessagestringMessage from the payment processor if any. It is present and visible in order details only if order status is not paid. When order becomes paid, paymentMessage is cleared
externalTransactionIdstringTransaction ID / invoice number of the order in the payment system (e.g. PayPal transaction ID)
affiliateIdstringAffiliate ID
creditCardStatus<CreditCardStatus>The status of credit card payment
privateAdminNotesstringPrivate note about the order from store owner
extraFields<ExtraFieldsInfo>Information about order extra fields, both internal and custom fields added from Control Panel or by applications
pickupTimestringOrder pickup time in the store date format, e.g.: "2017-10-17 05:00:00 +0000"
taxesOnShippingArray<TaxOnShipping>Taxes applied to shipping. null for old orders, [] for orders with taxes applied to subtotal only. Are not recalculated if order is updated later manually. Is calculated like: (shippingRate + handlingFee)*(taxValue/100)
acceptMarketingbooleantrue if customer has accepted email marketing and you can use their email for promotions. If value is false, you can't use this email for promotions
refererIdstringReferer identifier. Can be set in storefront via JS or by creating / updating an order with REST API
disableAllCustomerNotificationsbooleantrue if no email notifications are sent to customer. If false or empty, then email notifications are sent to customer according to store mail notification settings. This field does not influence admin email notifications
externalFulfillmentbooleanSet true if order is fulfilled in an external system; Ecwid will hide fulfillment status change feature and ability to set tracking number within Ecwid Control Panel in order details. Set false to manage order fulfillment within Ecwid Control Panel
utmDataArray<utmData>UTM parameters tracked for the order. See more details in Help Center
externalOrderIdstringCorresponding order number in an external system where order is fulfilled. Use together with the externalFulfillment field
pricesIncludeTaxbooleantrue if the tax rate is included in order price. More details: Taxes in Ecwid
orderExtraFieldsarray<OrderExtraFieldsInfo>Extra fields information in the order
langstringOrder's language (optional). If this field has a value matching one of the active store translations, all customer emails for the order will use this language.

Get a list of active store languages here

OrderItem

FieldTypeDescription
idnumberOrder item ID.
quantitynumberAmount purchased
namestringProduct name
productIdnumberStore product ID
categoryIdnumberID of the category this product belongs to. If the product belongs to many categories, categoryID will return the ID of the default product category. If the product doesn't belong to any category, 0 is returned
pricenumberPrice of ordered item in the cart
productPricenumberBasic product price without options markups, wholesale discounts etc.
weightnumberProduct weight
skustringProduct/variation SKU
shortDescriptionstringProduct description truncated to 120 characters
taxnumberTax amount applied to the item
combinationIdnumberThe ID of a chosen combination. If not specified, it will be calculated automatically
shippingnumberOrder item shipping cost
quantityInStocknumberThe number of products in stock in the store
isShippingRequiredbooleantrue/false: shows whether the item requires shipping
trackQuantitybooleantrue/false: shows whether the store admin set to track the quantity of this product and get low stock notifications
fixedShippingRateOnlybooleantrue/false: shows whether the fixed shipping rate is set for the product
fixedShippingRatenumberFixed shipping rate for the product
digitalbooleantrue/false: shows whether the item has downloadable files attached
couponAppliedbooleantrue/false: shows whether a discount coupon is applied for this item
selectedOptionsArray<OrderItemOption>Product options values selected by the customer
taxesArray<OrderItemTax>Taxes applied to this order item
isCustomerSetPricebooleantrue if price for the ordered product was set up by a customer ("Pay What You Want" feature is enabled). false otherwise.
isPreorderbooleantrue if the product is pre-ordered because it was out of stock. Learn more about Accepting pre-orders. Otherwise the field should not be passed.
attributesobject attributesDetails about product attributes .

attributes

FieldTypeDescription
namestringName of the product attribute.
valuestringAttribute value.

OrderItemTax

FieldTypeDescription
namestringTax name
valuenumberTax value in percent
totalnumberTax amount for the item
includeInPricebooleantrue if the tax rate is included in product prices. More details: Taxes in Ecwid
taxClassCodestringTax classification code applied to product. See: Tax classes by country
taxClassNamestring(EN) Name of the tax classification code applied to product. See: Tax classes by country

OrderItemOption

FieldTypeDescription
namestringOption name
typestringOption type. One of:
  • CHOICE (dropdown, radio button or size)
  • CHOICES (checkboxes)
  • TEXT (text input and text area)
  • DATE (date/time)
  • FILES (Sets option type only. Impossible to upload the file on behalf of customers via REST API)
valuestringSelected/entered value by customer. Multiple values separated by comma in a single string
selectionsArray<SelectionInfo>Details of selected product options. If sent in update order request, other fields will be regenerated based on information in this field

SelectionInfo

FieldTypeDescription
selectionTitlestringSelection title, as set by merchant
selectionModifiernumberSelection price modifier amount. Value is negative for negative modifiers
selectionModifierTypestringPrice modifier type: "PERCENT" or "ABSOLUTE"

PersonInfo

FieldTypeDescription
namestringFull name
companyNamestringCompany name
streetstringAddress line 1 and address line 2, separated by '\n'
citystringCity
countryCodestringTwo-letter country code
postalCodestringPostal/ZIP code
stateOrProvinceCodestringState code, e.g. NY; full list of codes here: https://api-docs.ecwid.com/reference/list-of-state-codes
phonestringPhone number

OrderItemDiscounts

FieldTypeDescription
discountInfo<OrderItemDiscountInfo>Info about discounts applied to item
totalnumberTotal order item discount value for this discount

OrderItemDiscountInfo

FieldTypeDescription
valuenumberDiscount value
typestringDiscount type: ABS or PERCENT
basestringDiscount base, one of ON_TOTAL, ON_MEMBERSHIP, ON_TOTAL_AND_MEMBERSHIP, CUSTOM
orderTotalnumberMinimum order subtotal the discount applies to

DiscountCouponInfo

FieldTypeDescription
namestringCoupon title in store control panel
codestringCoupon code
discountTypestringDiscount type: ABS, PERCENT, SHIPPING, ABS_AND_SHIPPING, PERCENT_AND_SHIPPING
statusstringDiscount coupon state: ACTIVE, PAUSED, EXPIRED or USEDUP
discountnumberDiscount amount
launchDatestringThe date of coupon launch, e.g. 2014-06-06 08:00:00 +0000
expirationDatestringCoupon expiration date, e.g. 2014-06-06 08:00:00 +0000
totalLimitnumberThe minimum order subtotal the coupon applies to
usesLimitstringNumber of uses limitation: UNLIMITED, ONCEPERCUSTOMER, SINGLE
applicationLimitstringApplication limit for discount coupons. Possible values: "UNLIMITED", "NEW_CUSTOMER_ONLY", "REPEAT_CUSTOMER_ONLY"
creationDatestringCoupon creation date
orderCountnumberNumber of uses
catalogLimit<DiscountCouponCatalogLimit>Products and categories the coupon can be applied to

DiscountCouponCatalogLimit

FieldTypeDescription
productsArray<number>The list of product IDs the coupon can be applied to
categoriesArray<number>The list of category IDs the coupon can be applied to

ShippingOptionInfo

FieldTypeDescription
shippingCarrierNamestringOptional. Is present for orders made with carriers, e.g. USPS or shipping applications.
shippingMethodNamestringShipping option name
shippingRatenumberRate
estimatedTransitTimestringDelivery time estimation. Formats accepted: number "5", several days estimate "4-9"
pickupInstructionstringInstruction for customer on how to receive their products
fulfillmentTypestringContains one of the values: shipping, pickup, delivery

HandlingFeeInfo

FieldTypeDescription
namestringHandling fee name set by store admin. E.g. Wrapping
valuenumberHandling fee value
descriptionstringHandling fee description for customer
taxes<HandlingFeeTaxes>Taxes applied to the handling fee

HandlingFeeTaxes

FieldTypeDescription
namestringTax name
valuenumberTax percent value
totalnumberTax total value

DiscountInfo

FieldTypeDescription
valuenumberDiscount value
typestringDiscount type: ABS or PERCENT
basestringDiscount base, one of ON_TOTAL, ON_MEMBERSHIP, ON_TOTAL_AND_MEMBERSHIP
orderTotalnumberMinimum order subtotal the discount applies to

CreditCardStatus

FieldTypeDescription
avsMessagestringAddress verification status returned by the payment system
cvvMessagestringCredit card verification status returned by the payment system

ExtraFieldsInfo

FieldTypeDescription
ecwid_order_delivery_time_interval_enddateEnd of the delivery date interval.
ecwid_order_delivery_time_display_formatstringFormat of the delivery date chosen:DATE or DATETIME.
ecwid_order_delivery_time_interval_startdateStart of the delivery date interval.

TaxOnShipping

FieldTypeDescription
namestringTax name
valuenumberTax value in store settings, applied to destination zone
totalnumberTax total applied to shipping

IsCustomerSetPrice

FieldTypeDescription
selectedPrice → value<SelectedPriceValue>Value of the price tier selected by a customer.

OrderExtraFieldsInfo

FieldTypeDescription
idstringYour custom name saved for the order extra field
valuestringExtra field value. Length cannot exceed 255 characters
customerInputTypestringOne of: "","TEXT", "SELECT", "DATETIME"
titlestringExtra field title. Displayed for a customer at checkout if the field is visible
orderDetailsDisplaySectionstringOne of: shipping_info , billing_info, customer_info, order_comments. Empty string for hidden fields.
orderBystringExtra field position. Use it to sort fields within the same orderDetailsDisplaySection

utmData

FieldTypeDescription
sourcestringTraffic source - indicated where customers come from
campaignstringIndicates a specific advertising campaign
mediumstringType of traffic - indicates the method for bringing customers

Response

A JSON object with the following fields:

FieldTypeDescription
updateCountnumberThe number of updated orders (1 or 0 depending on whether the update was successful)

Errors

In case of error, Ecwid responds with an error HTTP status code and, optionally, JSON-formatted body containing error description

HTTP codes

HTTP StatusDescription
400Request parameters are invalid
403Access token doesn't have update_orders scope
404The order is not found
415Unsupported content-type: expected application/json or text/json
500Cannot update the order info because of an error on the server

Error response body (optional)

FieldTypeDescription
errorMessagestringError message
Language
Click Try It! to start a request and see the response here!