Calculate order details
POST
https://app.ecwid.com/api/v3/{storeId}/order/calculate
Required access scopes
Your app must have the following access scopes to make this request: read_store_profile
Path params
All path params are required.
storeId
number
Ecwid store ID.
Headers
The Authorization header is required.
Authorization
Bearer secret_ab***cd
Access token of the application.
Request JSON
A JSON object with the following fields:
string
Customer's email address.
ipAddress
string
Customer's IP address.
customerId
number
Unique customer internal ID. Use it to place the order on behalf of a registered user.
customerTaxExempt
boolean
Defines if the customer is tax exempt. Requires valid tax ID. Read more about handling tax exempt customers in Help Center.
shippingPerson
object shippingPerson
Name and shipping address of the customer.
If no shippingPerson
provided, the values are taken from billingPerson
giftCardCode
string
Gift card code to apply to this cart.
shippingOption
object shippingOption
Details about the shipping option customer selected at the checkout.
paymentOptionsDetails
paymentId
string
Internal ID of the selected payment option.
Response JSON
A JSON object with the following fields:
subtotal
number
Cost of all products in the order (item's price
x quantity
) before any cost modifiers such as discounts, taxes, fees, etc. are applied.
subtotalWithoutTax
number
Order subtotal without taxes included in price (GROSS) when pricesIncludeTax
is true
.
total
number
Order total cost with all cost modifiers: shipping costs, taxes, fees, and discounts.
totalWithoutTax
number
Order total without taxes. Calculates as total
- tax
.
refundedAmount
number
Sum of all refunds applied to the order.
totalBeforeGiftCardRedemption
number
Order total before the Gift Card was applied.
string
Customer's email address.
paymentModule
string
Payment processor used to pay for the order online. Only available to online payment integrations build by Ecwid team.
paymentMethod
string
Name of the payment method customer chosen at the checkout.
tax
number
Sum of all taxes applied to products and shipping. If the order is modified after being placed, this value is not recalculated automatically.
customerTaxExempt
boolean
Defines if the customer is tax exempt. Requires valid tax ID. Read more about handling tax exempt customers in Help Center.
customerTaxId
string
Tax ID entered by the customer at the checkout.
customerTaxIdValid
boolean
Defines if customer's tax ID is valid for tax exemption.
reversedTaxApplied
boolean
Defines if order tax was reversed (set to 0). Requires valid tax ID.
b2b_b2c
string
Order type. One of:
b2b
- business-to-business
b2c
- business-to-consumer
customerRequestedInvoice
boolean
Defines if customer requested an invoice.
customerFiscalCode
string
Fiscale code of the customer.
electronicInvoicePecEmail
string
PEC email for order invoices.
electronicInvoiceSdiCode
string
SDI code for order invoices.
ipAddress
string
Customer's IP address detected at the checkout.
paymentStatus
string
Order payment status. Supported values: AWAITING_PAYMENT
, PAID
, CANCELLED
, REFUNDED
, PARTIALLY_REFUNDED
, INCOMPLETE
, CUSTOM_PAYMENT_STATUS_1
, CUSTOM_PAYMENT_STATUS_2
, CUSTOM_PAYMENT_STATUS_3
.
Read more about order statuses in Help Center.
fulfillmentStatus
string
Order fulfillment 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
.
Read more about order statuses in Help Center.
refererUrl
string
URL of the page when order was placed without page slugs (hash #
part).
orderComments
string
Order comments, left by a customer at the checkout.
volumeDiscount
number
Sum of applied promotions based on subtotal. Included in the discount
field.
membershipBasedDiscount
number
Sum of applied promotions based on customer group. Included in the discount
field.
totalAndMembershipBasedDiscount
number
Sum of applied promotions based on both subtotal and customer group. Included in the discount
field.
discount
number
Sum of all applied promotions. Does not include discount coupons.
Total order discount is the sum of thecouponDiscount
and discount
fields.
couponDiscount
number
Discount value from applied discount coupon, e.g. 10
.
Total order discount is the sum of thecouponDiscount
and discount
fields.
customerId
number
Unique internal ID assigned to the customer.
usdTotal
number
Order total converted from the store's currency to USD.
globalReferer
string
URL that the customer came to the store from
createDate
string
The datetime when the order was placed, for example 2014-06-06 18:57:19 +0000
updateDate
string
The datetime of the latest order update. This includes all changes made from Ecwid admin or API. For example, 2014-06-06 18:57:19 +0000
createTimestamp
number
The datetime when the order was placed in UNIX timestamp, for example 1427268654
updateTimestamp
number
The datetime of the latest order update in UNIX timestamp. This includes all changes made from Ecwid admin or API. For example, 1427268654
customerGroup
string
Name of the group the customer belongs to (if any). Read more about customer groups.
customerGroupId
number
ID of the group the customer belongs to.
shippingPerson
object shippingPerson
Name and shipping address details left by customer at the checkout.
shippingOption
object shippingOption
Details about the shipping option customer selected at the checkout.
predictedPackages
object predictedPackages
Minimum total dimensions and weight of a single shipping package that will be enough to carry all products added to the order.
shippingLabelAvailableForShipment
boolean
Defines if the store owner can buy a shipping label through Ecwid for the order.
additionalInfo
object
Internal order information for Ecwid services.
paymentParams
object
Internal payment parameters for Ecwid services.
orderExtraFields
array orderExtraFields
Additional optional information about the order's extra fields. Along with the value of the field, it contains technical information, such as id, type, etc. of the field. Total storage of extra fields cannot exceed 8Kb.
hidden
boolean
Defines if the order is hidden from Ecwid admin. Applies to unsfinished orders only.
trackingNumber
string
Shipping tracking code.
paymentMessage
string
Error message sent by the online payment method. Only appears if a customer had issues with paying for the order online. When order becomes paid, paymentMessage
is cleared
externalTransactionId
string
Transaction ID saved to the order details by the payment system. For example, PayPal transaction ID.
affiliateId
string
If a store has several storefronts, this ID is used to track from which one the order came from. Read more on setting up affiliate IDs in Help Center.
creditCardStatus
object creditCardStatus
Saves verification messages if customer paid for the order with a credit card.
privateAdminNotes
string
Private note added to the order by store owner.
pickupTime
string
Order pickup time in the store date format (UTC +0 timezone), for example: 2017-10-17 05:00:00 +0000
taxesOnShipping
array taxesOnShipping
Taxes applied to shipping 'as is'. 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)
acceptMarketing
boolean
Defines if customer has accepted email marketing at the checkout. If true
or null
, you can use their email for promotions.
refererId
string
Referer identifier. Can be set in storefront via JS or by creating / updating an order with REST API
disableAllCustomerNotifications
boolean
Defines if the customer should receive any email notifications:
true
- no notifications are sent to the customer. If false
- email notifications are sent to customer according to store mail notification settings.
This setting does not affect email notifications to the store owner.
externalFulfillment
boolean
Defines if the order is fulfilled with an external system and should not be managed through Ecwid:
true
- Ecwid will hide fulfillment status change feature and ability to set tracking number within Ecwid admin.
false
- store owner can manage order fulfillment within Ecwid admin (default value)
externalOrderId
string
Order ID in an external system where order is fulfilled.
Requires externalFulfillment
to be true
.
pricesIncludeTax
boolean
Defines if taxes are included to product prices (GROSS or NET prices):
true
- the tax rate is included in product prices (GROSS).
false
- the tax rate is not included in product prices (NET).
Read more about setting up taxes in Help Center.
utmData
array utmData
UTM tags saved for the order. Read more about using UTM tags in orders in Help Center.
utmDataSets
array utmDataSets
Detailed information about UTM tags saved for the order. Contains more information than the utmData
field.
lang
string
Defines a list of available languages or a single language for customer notifications. Must match one of the active store translations.
List of active store languages is available in the GET
/profile
request> languages
> enabledLanguages
field.
customerUserAgent
string
Details about the customer's device and platform used to place an order based on the User-Agent browser data.
items
id
number
Order item ID unique for this order. Can be used to manage ordered items.
productId
number
Internal product ID. Can be used to find full product details with the GET
/products
request.
subscriptionId
number
ID of the subscription available at Ecwid admin > My Sales > Subscriptions.
categoryId
number
ID of the category this product belongs to or was added from.
Returns -1
if the product was added to the cart via the Buy Now button.
price
number
Price of product in the order with all price modifier applied.
priceWithoutTax
number
Price of product in the order without taxes.
productPrice
number
Basic product price without any modifiers: options markups, discounts, taxes, fees.
costPrice
number
Purchase price of the product in the specific order used for reports and profit calculations.
weight
number
Weight of the product.
sku
string
Product SKU. If the chosen options match a variation, this will be a variation SKU.
quantity
number
Quantity of the product in the order.
shortDescription
string
Product description truncated to 120 characters.
tax
number
Total tax applied to the product.
shipping
number
Partial shipping costs specific to the product.
quantityInStock
number
Number of products in stock in the store before placing the order.
name
string
Name of the product.
isShippingRequired
boolean
Defines if the product requires shipping.
trackQuantity
boolean
Defines if low stock notifications to the store owner are enabled.
imageUrl
string
Link to the main product image.
fixedShippingRateOnly
boolean
Defines if the product has a unique fixed shipping rate.
If true
, shipping costs won't calculate for the product and fixedShippingRate
value will be used instead.
fixedShippingRate
number
Fixed shipping costs for the product.
Affects shipping costs only if fixedShippingRateOnly
is true
.
couponApplied
boolean
Defines if the product has a discount coupon applied.
selectedOptions
array selectedOptions
Product options values selected by the customer at the checkout.
combinationId
number
ID of a product variation whos options mathes with values chosen by the customer at the checkout. Read more on product variations in Help Center.
digital
boolean
Defines if the product has any downloadable files attached. Read more on digital products in Help Center.
couponAmount
number
Discount applied to the product from discount coupon.
If the order is manually updated after being placed, this field is not recalculated automatically.
taxesOnShipping
array taxesOnShipping
Taxes applied to shipping costs for the product with the calculation formula of: (shippingRate + handlingFee)*(taxValue/100)
If the order is manually updated after being placed, this field is not recalculated automatically.
isCustomerSetPrice
boolean
If true
, customer set a custom product price using the "Pay What You Want" feature.
In this case, both the product price
and selectedPrice
-> value
fields contain the price set by a customer.
If false
, customer didn't choose the custom price. Therefore, the selectedPrice
-> value
field will be absent and the price
field contains default product price set by the store owner.
selectedPrice
object selectedPrice > value
If isCustomerSetPrice
is true
, this field contains the "Pay What You Want" price set by a customer at the checkout.
Example with the PWYW price set to 100:
"selectedPrice": { "value": 100 }
isPreorder
boolean
Defines if the product was pre-ordered in this order. Read more about accepting pre-orders in Help Center.
attributes
array of objects attributes
Details about product attributes. Read more on product attributes in Help Center.
attributes
name
string
Name of the product attribute.
value
string
Attribute value.
taxes
name
string
Name of the tax visible to customers at the checkout and in order invoices.
value
number
Tax value in percent.
total
number
Tax amount applied to the product.
taxOnDiscountedSubtotal
number
Tax applied to product price (price
) after all discounts.
taxOnShipping
number
Tax applied to the shipping costs of the product.
sourceTaxRateId
number
Tax rate ID. For manual taxes the value is copied from tax ID, for all other cases the value is 0
.
sourceTaxRateType
string
Type of tax rate.
One of AUTO
, MANUAL
, CUSTOM
(if tax is changed via API), LEGACY
.
taxType
string
Type of detailed tax for USA.
One of: STATE
, COUNTY
, CITY
, SPECIAL_DISTRICT
taxClassName
string
Name of the tax classification code applied to product. Available only in English. See: Tax classes by country
files
productFileId
number
Internal unique file ID.
maxDownloads
number
Maximum number of allowed file downloads. Read more on digital products in Help Center.
remainingDownloads
number
Remaining number of download attempts for the file.
expire
string
Date/time of the customer download link expiration.
name
string
File name visible to the customer.
description
string
File description visible to the customer.
size
number
File size in bytes (64-bit integer).
adminUrl
string
Link to the file download for the store owner. Keep caution: the link contains the API access token. Never share it and do not display the link in publically available code.
customerUrl
string
File download link sent to the customer after the order was paid.
selectedOptions
name
string
Name of the product option.
type
string
Type of the product option that defines its functionality.
One of:
CHOICE
- Dropdown, radio button, or size. Allows selecting only one value from the list.
CHOICES
- Checkbox. Allows selecting multiple values.
TEXT
- Text input or area.
value
string
Selected/entered value for the option as string
.
For CHOICES
type, provides a string with all selected values separated by a comma.
valuesArray
array
Selected/entered value for the option as array
.
For the CHOICES
type, provides an array with all selected values.
selections
array of objects
Details of selected product options.
If sent in "Update order" request, other fields will be recalculated based on information from selections
.
hexCodes
array of strings
List of HEX codes.
Defines what color must be displayed when user changes color in the SWATCHES
option, for example: ["#fff000"]
.
Requires useImageAsSwatchSelector
to be true
.
selections
selectionTitle
string
Name of the selected option value.
selectionModifier
number
Price modifier of the selected option value.
Value can be negative, for example, -10
if it decreases the product price.
selectionModifierType
string
Price modifier type.
One of:
PERCENT
- Price modifier applies as a percent from the product price.
ABSOLUTE
- Price modifier applies as a flat value.
recurringChargeSettings
recurringInterval
string
Subscription charge interval.
One of: day
, week
, month
, year
.
recurringIntervalCount
number
Charge interval count that depends on the recurringInterval
. For example 3
- once per 3 months, if recurringInterval
is month.
subscriptionPriceWithSignUpFee
number
Total product cost including the first subscription payment.
signUpFee
number
Fees imposed on the first payment.
dimensions
length
number
Length of a product
width
number
Width of a product
height
number
Height of a product
shippingPerson
name
string
Full name of the customer.
companyName
string
Customer's company name.
street
string
Address line 1 and address line 2, separated by \n
.
city
string
City.
countryCode
string
Two-letter country code.
countryName
string
Country name.
postalCode
string
Postal/ZIP code.
stateOrProvinceCode
string
State/province code, for example, NY
.
stateOrProvinceName
string
State/province name.
phone
string
Customer's phone number.
billingPerson
name
string
Full name of the customer.
companyName
string
Customer's company name.
street
string
Address line 1 and address line 2, separated by \n
.
city
string
City.
countryCode
string
Two-letter country code.
countryName
string
Country name.
postalCode
string
Postal/ZIP code.
stateOrProvinceCode
string
State/province code, for example, NY
.
stateOrProvinceName
string
State/province name.
phone
string
Customer's phone number.
customSurcharges
id
string
Surcharge ID.
If not specified default value: Custom Surcharge
value
number
Surcharge value.
type
string
Surcharges type.
One of:
"PERCENT"
- Surcharge applies as a percent from the product price.
"ABSOLUTE"
- Surcharge applies as a flat value.
total
number
Total value of the surcharge.
totalWithoutTax
number
Total value of the surcharge without taxes.
description
string
Surcharge description defined by the store owner.
descriptionTranslated
string
Available translations for the surcharge description.
taxable
boolean
Defines if taxes apply to the surcharge.
discounts
total
number
Sum of promotions applied to the order.
discountCoupon
id
number
Internal discount coupon ID.
name
string
Name of the discount coupon visible in Ecwid admin.
code
string
Discount coupon code.
discountType
string
Discount type.
One of:
ABS
PERCENT
SHIPPING
ABS_AND_SHIPPING
PERCENT_AND_SHIPPING
status
string
Discount coupon state.
One of:
ACTIVE
PAUSED
EXPIRED
USEDUP
discount
number
Discount value applied to the order total.
launchDate
string
The date of coupon launch, for example, 2014-06-06 08:00:00 +0000
.
expirationDate
string
Coupon expiration date, for example, 2014-06-06 08:00:00 +0000
.
totalLimit
number
The minimum order subtotal the coupon applies to.
usesLimit
string
Number of uses limitation: UNLIMITED
, ONCEPERCUSTOMER
, SINGLE
applicationLimit
string
Application limit for discount coupons.
One of:
UNLIMITED
NEW_CUSTOMER_ONLY
REPEAT_CUSTOMER_ONLY
creationDate
string
Discount coupon creation date.
updateDate
string
Date of the last discount coupon update.
orderCount
number
Amount of orders where the discount coupon was used previously.
catalogLimit
products
array of numbers
List of product IDs the coupon can be applied to.
categories
array of numbers
List of category IDs the coupon can be applied to.
shippingOption
shippingCarrierName
string
If an order is fulfilled with a native shipping carrier integration or a shipping app, this field holds carrier's name.
shippingMethodName
string
Name of the shipping option visible at the checkout.
shippingMethodId
string
Internal shipping method ID.
shippingRate
number
Shipping rate for the order.
shippingRateWithoutTax
number
Shipping rate without taxes.
estimatedTransitTime
number/string
Delivery time estimation.
Depending on the store settings it can be a number, for example, 5
or a string – 4-9 days
.
The string value is equal to the description
field in the Get shipping options
request.
isPickup
boolean
Defines if this is a store pickup method.
pickupInstruction
string
Instructions for customer on how to pickup the order.
fulfillmentType
string
Shipping type.
One of:
shipping
pickup
delivery
handlingFee
name
string
Handling fee name set by store admin, for example, Wrapping
.
value
number
Handling fee flat value.
description
string
Handling fee's description for customers.
predictedPackages
height
number
Height of a predicted package.
width
number
Width of a predicted package.
length
number
Length of a predicted package.
weight
number
Total weight of a predicted package.
declaredValue
number
Declared value of a predicted package (subtotal of items in package).
shipments
id
string
ID of the purchased shipping label.
created
date
The date/time of shipping label purchase, for example, 2020-04-23 19:13:43 +0000
shipFrom
object shipFrom
Shipping origin address. If matches company address, company address is returned.
shipFrom
companyName
string
Store owner's company name.
string
Store owner's email.
street
string
Store's address in 1 or 2 lines format. If two address lines provided, they are separated by \n
.
city
string
City where the store is located.
countryCode
string
Two-letter country code.
countryName
string
Country where the store is located.
postalCode
string
Postal/ZIP code for the store's location.
stateOrProvinceCode
string
State/province code, for example, NY
.
stateOrProvinceName
string
State/province name.
phone
string
Store's phone number.
parcel
weight
number
Total weight of the labeled package.
weightUnit
string
Weight unit of the package.
One of:
CARAT
GRAM
OUNCE
POUND
KILOGRAM
width
number
Width of the labeled package.
height
number
Height of the labeled package.
length
number
Length of the labeled package.
dimensionUnit
string
Dimension unit of the package.
One of:
MM
CM
IN
YD
shippingService
carrier
string
Carrier used for shipping the order. Available only for integrations build by Ecwid team.
One of:
USPS
UPS
FEDEX
CANADA_POST
AUSTRALIA_POST
carrierName
string
Name of shipping option in store settings.
carrierServiceName
string
Specific carrier's name visible at the checkout.
carrierServiceCode
string
Internal carrier code.
tracking
tracking_number
string
Tracking number provided by the shipping service.
tracking_url
string
Link to the delivery tracking page.
estimatedDays
number
Estimated delivery time in days.
shippingLabel
label_url
string
Link for download shipping label.
discountInfo
value
number
Discount value.
type
string
Discount type.
One of
ABS
PERCENT
base
string
Discount base.
One of:
SUBTOTAL
- Discount is based on order subtotal.
ITEM
- Discount is only applied to certain products in the order.
SHIPPING
- Discount is only applied to order shipping costs.
ON_MEMBERSHIP
- Discount is only applied if customer belongs to a certain customer group.
ON_TOTAL_AND_MEMBERSHIP
- Discount is applied to
CUSTOM
- Discount is created by an app with a custom logic
orderTotal
number
Minimum order subtotal the discount applies to.
description
string
Description of a discount visible at the checkout. Available only for discounts with CUSTOM
base.
creditCardStatus
avsMessage
string
Address verification status returned by the payment system.
cvvMessage
string
Credit card verification status returned by the payment system.
extraFields
ecwid_order_delivery_time_interval_start
string
Start of the delivery date/datetime interval.
ecwid_order_delivery_time_interval_end
string
End of the delivery date/datetime interval.
ecwid_order_delivery_time_display_format
string
Format of the delivery date chosen.
One of:
DATE
DATETIME
orderExtraFields
id
string
Internal ID defined for the checkout extra field.
value
string
Extra field value. Length cannot exceed 255 characters.
customerInputType
string
One of: ""
,"TEXT"
, "SELECT"
, "DATETIME"
title
string
Extra field title visible at the checkout.
orderDetailsDisplaySection
string
Defines a place where the field is visible to the store admin on the order details page.
One of:
shipping_info
billing_info
customer_info
order_comments
Empty if the field is hidden.
orderBy
string
Extra field position. Use it to sort fields within the same orderDetailsDisplaySection
refunds
date
string
The datetime of a refund, for example, 2014-06-06 18:57:19 +0000
source
string
What action triggered refund.
One of:
CP
- changed by the store owner in Ecwid admin
API
- changed by an app through API
External
- refund made from payment processor website
reason
string
A text reason for a refund. 256 characters max.
amount
number
Amount of this specific refund (not total amount refunded for order. see redundedAmount
field)
utmData
source
string
Traffic source that indicates where the customer come from.
campaign
string
Saves the name of the advertising campaign if there is one.
medium
string
Type of traffic that indicates customers reach the website.
utmDataSets
timestamp
string
Datetime of saving UTM data into the local browser storage.
source
string
Traffic source that indicates where the customer come from.
campaign
string
Saves the name of the advertising campaign if there is one.
medium
string
Type of traffic that indicates customers reach the website.
invoices
internalId
number
Internal ID of the order invoice.
id
string
Public ID showed in the invoice.
created
string
Datetime of invoice creation in UTC +0.
link
string
Download link for the invoice in PDF format.
type
string
Invoice type.
One of:A
SALE
- regular invoice
FULL_CANCEL
- full refund invoice
taxesOnShipping
name
string
Name of the tax applied to shipping costs.
value
number
Value of the tax applied to shipping costs.
total
number
Total of taxes applied to shipping costs.
translations
Object with text field translations in the "lang": "text"
format, where the "lang"
is an ISO 639-1 language code. For example:
{
"en": "Sample text",
"nl": "Voorbeeldtekst"
}
Translations are available for all active store languages. Only the default language translations are returned if no other translations are provided for the field. Find active store languages with GET
/profile
request > languages
> enabledLanguages
.
Last updated
Was this helpful?