The base currency the cart should be calculated in.
skus
array
*
skus
Required
array
A list of one or more Violet Sku's. Sku's from the same merchant will be grouped and calculated together.
shipping_address
object
*
shipping_address
Required
object
The address the cart would be shipped to.
city
City or Subdivision · string
*
city
Required
string
Add Example Value
state
State/Province · string
*
state
Required
string
The state/province of the address. Abbreviations are recommended but not required. Violet will attempt to abbreviate these values when abbreviations are required by the external commerce platform.
Using the Estimate Cart endpoint you can discover the estimated totals and available shipping methods for any combination of Sku’s and a shipping address. This feature can be useful for debugging failed carts where one or more Sku’s may have been unavailable in a certain region or no shipping methods were returned for an address.
Cart estimation is not a part of the checkout process and is instead best used as a method for anticipating the behavior of a cart or debugging a failed cart.
When using Estimate Cart you do not need to manage the lifecycle of a cart. Violet will handle the creation, modification, and deletion of any external carts that may need to be created while estimating a cart.
When the Estimate Cart process fails in the external commerce platform, Violet will attempt to parse and surface all error messages from the external system so that you are able to fully understand why the estimation failed. The most common reasons for failure will be Sku unavailability and incorrectly formatted shipping addresses.
Headers
X-Violet-Token
string
X-Violet-App-Secret
string
X-Violet-App-Id
integer
Body
application/json
base_currency
enum<string>
default: USD
The base currency the cart should be calculated in.
Available options:
USD,
AED,
AFN,
ALL,
AMD,
ANG,
AOA,
ARS,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BIF,
BMD,
BND,
BOB,
BRL,
BSD,
BWP,
BZD,
CAD,
CDF,
CHF,
CLP,
CNY,
COP,
CRC,
CVE,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
ETB,
EUR,
FJD,
FKP,
GBP,
GEL,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HRK,
HTG,
HUF,
IDR,
ILS,
INR,
ISK,
JMD,
JPY,
KES,
KGS,
KHR,
KMF,
KRW,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
MAD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRO,
MUR,
MVR,
MWK,
MXN,
MYR,
MZN,
NAD,
NGN,
NIO,
NOK,
NPR,
NZD,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PYG,
QAR,
RON,
RSD,
RUB,
RWF,
SAR,
SBD,
SCR,
SEK,
SGD,
SHP,
SLL,
SOS,
SRD,
STD,
SVC,
SZL,
THB,
TJS,
TOP,
TRY,
TTD,
TWD,
TZS,
UAH,
UGX,
UYU,
UZS,
VND,
VUV,
WST,
XAF,
XCD,
XOF,
XPF,
YER,
ZAR,
ZMW,
BTN
skus
object[]
required
A list of one or more Violet Sku's. Sku's from the same merchant will be grouped and calculated together.
skus.quantity
integer
default: 1
Quantity of the Sku.
skus.sku_id
integer
required
ID of the Violet Sku.
shipping_address
object
required
The address the cart would be shipped to.
shipping_address.city
string
required
shipping_address.state
string
required
The state/province of the address. Abbreviations are recommended but not required. Violet will attempt to abbreviate these values when abbreviations are required by the external commerce platform.
shipping_address.postal_code
string
required
The postal/zip code of the address.
shipping_address.country
string
required
The ISO2 country code.
shipping_address.address_1
string
required
shipping_address.address_2
string | null
Response
default - application/json
estimated_carts
object[]
The discount total of the cart in cents.
estimated_carts.merchant_id
integer
ID of the merchant this cart is calculated for.
estimated_carts.platform
enum<string>
Platform of the merchant this cart is calculated for.
Available options:
OTHER,
SHOPIFY,
MAGENTO,
MAGENTO_ONE,
WOOCOMMERCE,
BIGCOMMERCE,
LIGHTSPEED,
ECWID,
YAAS,
SPREECOMMERCE,
DEMANDWARE,
VOLUSION,
PRESTASHOP,
THREEDCART,
SYLIUS,
WIX,
SWELL,
MIVA,
WEBSPHERE,
ORACLECC,
SAPCC,
SQUARESPACE,
SHOPWARE,
COMMERCETOOLS,
MEDUSA,
ABICART,
SPRYKER,
MYSTORE,
CENTRA,
XCART,
VTEX,
KIBO,
SALEOR,
VENDO,
CHORD,
DIGITALRIVER,
SQUARE,
AMAZON,
BIGCARTEL,
CUSTOM
estimated_carts.base_currency
enum<string>
default: USD
The base currency the cart should is calculated in.
Available options:
USD,
AED,
AFN,
ALL,
AMD,
ANG,
AOA,
ARS,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BIF,
BMD,
BND,
BOB,
BRL,
BSD,
BWP,
BZD,
CAD,
CDF,
CHF,
CLP,
CNY,
COP,
CRC,
CVE,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
ETB,
EUR,
FJD,
FKP,
GBP,
GEL,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HRK,
HTG,
HUF,
IDR,
ILS,
INR,
ISK,
JMD,
JPY,
KES,
KGS,
KHR,
KMF,
KRW,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
MAD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRO,
MUR,
MVR,
MWK,
MXN,
MYR,
MZN,
NAD,
NGN,
NIO,
NOK,
NPR,
NZD,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PYG,
QAR,
RON,
RSD,
RUB,
RWF,
SAR,
SBD,
SCR,
SEK,
SGD,
SHP,
SLL,
SOS,
SRD,
STD,
SVC,
SZL,
THB,
TJS,
TOP,
TRY,
TTD,
TWD,
TZS,
UAH,
UGX,
UYU,
UZS,
VND,
VUV,
WST,
XAF,
XCD,
XOF,
XPF,
YER,
ZAR,
ZMW,
BTN
estimated_carts.sub_total
integer
The subtotal of the cart in cents.
estimated_carts.shipping_total
integer
The tax total of the cart in cents.
estimated_carts.discount_total
integer
The discount total of the cart in cents.
estimated_carts.total
integer
The grand total of the cart in cents. This is the sum of the subtotal, shipping total, and tax total, with the discount total subtracted.
estimated_carts.skus
object[]
A collection of skus calculated for the cart.
estimated_carts.skus.quantity
integer
default: 1
Quantity of the Sku.
estimated_carts.skus.sku_id
integer
required
ID of the Violet Sku.
estimated_carts.skus.name
string
Name of the SKU
estimated_carts.skus.price
integer
Price of the individual SKU. In Cents
estimated_carts.skus.merchant_id
integer
ID of the merchant in Violet
estimated_carts.skus.external_id
string
ID of the equivalent Sku in the external commerce platform
estimated_carts.skus.available
boolean
Is the Sku available in the external commerce platform and included in the calculation.
estimated_carts.skus.requires_shipping
boolean
Does the Sku require shipping.
estimated_carts.skus.product_type
enum<string>
Product Type
Available options:
PHYSICAL,
DIGITAL,
VIRTUAL,
BUNDLED
estimated_carts.skus.line_price
integer
Price of the SKU multiplied by the Quantity. In Cents
estimated_carts.available_shipping_methods
object[]
A collection of shipping methods calculated for the cart.