Path parameters
-
platform string Required
Source platform
Values are
shopify
,commerce
,woocommerce
,magento
,bigcommerce
, orsquarespace
. -
merchantId string Required
Globally unique id for merchant
Body
Create new cart details
-
merchantSiteUrl string Required
Full url to merchant store
- cart object Required
-
subdomain boolean
Whether merchant site url is a platform subdomain
Default value is
true
.
POST /carts/{platform}/{merchantId}
curl \
-X POST https://nomad.samarkand-global.cn/checkout/carts/{platform}/SMK474 \
-H "x-ca-key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"merchantSiteUrl":"https://smktestpartner.myshopify.com/cart","cart":{"currency":"GBP","item_count":5,"items":[{"id":36801771733142,"quantity":2,"variant_id":14808998805549,"key":"14808998805549:7d7c76c0a1dd684c158ea58cf28a5062","title":"Probio7 50 Plus","price":2349,"sku":"PB50","grams":27,"product_title":"Probio7 50 Plus","properties":{"shipping_interval_unit_type":"Months","shipping_interval_frequency":"1"},"image":"https://cdn.shopify.com/s/files/1/0024/2240/7213/products/ORIG_plain_73cf94a5-7732-4457-a32a-449b537c4598.png?v=1587802551","vendor":"Probio7"}],"total_price":6355,"total_weight":99.2155},"subdomain":false}'
Request example
{
"merchantSiteUrl": "https://smktestpartner.myshopify.com/cart",
"cart": {
"currency": "GBP",
"item_count": 5,
"items": [
{
"id": 36801771733142,
"quantity": 2,
"variant_id": 14808998805549,
"key": "14808998805549:7d7c76c0a1dd684c158ea58cf28a5062",
"title": "Probio7 50 Plus",
"price": 2349,
"sku": "PB50",
"grams": 27,
"product_title": "Probio7 50 Plus",
"properties": {
"shipping_interval_unit_type": "Months",
"shipping_interval_frequency": "1"
},
"image": "https://cdn.shopify.com/s/files/1/0024/2240/7213/products/ORIG_plain_73cf94a5-7732-4457-a32a-449b537c4598.png?v=1587802551",
"vendor": "Probio7"
}
],
"total_price": 6355,
"total_weight": 99.2155
},
"subdomain": false
}
Response example (200)
{
"code": 42,
"message": "Status of operation",
"data": {
"cartId": "SMK474-1Vzff80HMU0FqdotSN8T0mGjK",
"exchangeRate": 9.1
}
}
Response example (400)
{
"code": 42,
"message": "Status of operation",
"data": {
"cartId": "SMK474-1Vzff80HMU0FqdotSN8T0mGjK",
"exchangeRate": 9.1
}
}
Response example (500)
{
"code": 42,
"message": "Status of operation",
"data": {
"cartId": "SMK474-1Vzff80HMU0FqdotSN8T0mGjK",
"exchangeRate": 9.1
}
}