Basket
Baskets are virtual containers that hold our products so that we can checkout with multiple products. Baskets can be Created, Deleted, Updated and Merged and we can also Add, Bulk Add, Remove and Update products inside a basket This page covers Basket endpoints that are created to effectively handle various basket operations.
Gets user baskets
This endpoint allows you to get baskets for a user.
Developers - API Operations:
Operation | Endpoint | Response |
---|---|---|
Get baskets | /api/v2/commerce/basket/user/:userId/all | Gets user baskets. |
Required attributes
- Name
userId
- Type
- string
- Description
User Id to identify the user
Response Properties
- Name
statusCode
- Type
- number
- Description
Status code of the response
- Name
status
- Type
- string
- Description
Status of the response
- Name
errors
- Type
- array
- Description
List of errors in the response
- Name
success
- Type
- boolean
- Description
Success status of the response
- Name
message
- Type
- string
- Description
Message of the response
- Name
messageCode
- Type
- string
- Description
Message code of the response
- Name
result
- Type
- object
- Description
Result of the response
- Name
id
- Type
- number
- Description
Id to identify the user
- Name
currencySymbol
- Type
- string
- Description
Currency Symbol for Price e.g £
- Name
currencyCode
- Type
- string
- Description
Currency code according to the region e.g. GBP:'Great Britain Pound'
- Name
userId
- Type
- string
- Description
User Id to identify the User
- Name
userEmail
- Type
- string
- Description
User email provided by the user
- Name
shippingMethodId
- Type
- string
- Description
Shipping method Id to identify the shipping method
- Name
subTotal
- Type
- object
- Description
Sub total of the total price
- Name
shippingCharge
- Type
- object
- Description
Shipping charges of the product in basket
- Name
formatted
- Type
- object
- Description
Formatted price with and without tax
- Name
withTax
- Type
- string
- Description
Price of basket item with Tax
- Name
withoutTax
- Type
- string
- Description
Price of basket item without Tax
- Name
tax
- Type
- string
- Description
Tax amount of basket item
- Name
raw
- Type
- object
- Description
Raw price without discount
- Name
discount
- Type
- object
- Description
Discount amount on the basket item
- Name
additionalCharge
- Type
- object
- Description
Additional charges applied on the basket item
- Name
grandTotal
- Type
- object
- Description
Grand total price of basket items
- Name
isLocked
- Type
- boolean
- Description
Flag to check if the basket is locked
- Name
createdByAdmin
- Type
- boolean
- Description
Flag to check if the basket is created by Admin
- Name
poNumber
- Type
- string
- Description
P O Number of the basket
- Name
isQuote
- Type
- boolean
- Description
Flag to check if the basket is a Quote
- Name
quoteStatus
- Type
- number
- Description
Quote status of the basket
- Name
postCode
- Type
- string
- Description
Post code of the user
- Name
hasMembership
- Type
- boolean
- Description
Flag to check if the user has a membership
- Name
exchangeRate
- Type
- number
- Description
Exchange rate of the currency
- Name
baseCurrency
- Type
- string
- Description
Base currency of the region
- Name
microSiteId
- Type
- string
- Description
Micro site Id of the site
- Name
baseCurrencyTotal
- Type
- number
- Description
Total amount of the basket in base currency
- Name
membershipDiscount
- Type
- string
- Description
Discount given to the user under their membership
- Name
created
- Type
- string
- Description
Date and time when the basket was created
- Name
lastUpdated
- Type
- string
- Description
Date and time when the basket was last updated
- Name
lineItems
- Type
- array
- Description
Array of all the products added in to basket
- Name
stockCode
- Type
- string
- Description
Stock code of the product
- Name
name
- Type
- string
- Description
Name of the product
- Name
slug
- Type
- string
- Description
Slug of the product used to navigate to the product
- Name
shortDescription
- Type
- string
- Description
A short description of the product
- Name
productId
- Type
- string
- Description
Product Id used to identify the product
- Name
productIid
- Type
- string
- Description
Product Iid used to identify the product
- Name
parentProductId
- Type
- string
- Description
Id of the parent product product, used to map personalized products with their parent product
- Name
price
- Type
- string
- Description
Price of the product
- Name
totalPrice
- Type
- object
- Description
Total price of the product
- Name
isSubscription
- Type
- boolean
- Description
Flag to check if the user has an active subscription
- Name
isMembership
- Type
- boolean
- Description
Flag to check if the user has an active membership
Request
curl --location 'https://api20.bettercommerce.io/api/v2/commerce/basket/user/:userId/all' \
--header 'Accept: application/json' \
--header 'UserId;' \
--header 'Email: abc@abc.com'
Response
{
"statusCode": 200,
"status": "OK",
"errors": [],
"success": true,
"message": null,
"messageCode": null,
"result": [
{
"id": "1f17fb65-fd0b-4332-9113-7655dd2ac1dc",
"currencySymbol": "£",
"currencyCode": "GBP",
"userId": "79db110c-e22d-4b26-b565-ae530043dea1",
"userEmail": "abc@abc.com",
"shippingMethodId": "3b9ba0d0-2669-462c-974a-bfcda4dcfebe",
"subTotal": {
"currencySymbol": "£",
"formatted": {
"withTax": "£160.00",
"withoutTax": "£160.00",
"tax": "£0.00"
},
"raw": {
"withTax": 160,
"withoutTax": 160,
"tax": 0
}
},
"shippingCharge": {
"currencySymbol": "£",
"formatted": {
"withTax": "£9.99",
"withoutTax": "£9.99",
"tax": "£0.00"
},
"raw": {
"withTax": 9.99,
"withoutTax": 9.99,
"tax": 0
}
},
"discount": {
"currencySymbol": "£",
"formatted": {
"withTax": "£0.00",
"withoutTax": "£0.00",
"tax": "£0.00"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"additionalCharge": {
"currencySymbol": "£",
"formatted": {
"withTax": "£0.00",
"withoutTax": "£0.00",
"tax": "£0.00"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"grandTotal": {
"currencySymbol": "£",
"formatted": {
"withTax": "£169.99",
"withoutTax": "£143.32",
"tax": "£26.67"
},
"raw": {
"withTax": 169.99,
"withoutTax": 143.3234,
"tax": 26.6666
}
},
"lineItems": [
{
"id": "1507587",
"stockCode": "BS0010-DODGER-BLUE-M",
"name": "Cotton Racerback Spaghetti top for Women DODGER BLUE m Colour",
"slug": "products/my-brand-cotton-racerback-spaghetti-top-women-dodger-blue-1-bs0010-dodger-blue-s",
"shortDescription": "<p>Care Instructions: Care Instructions: Gentle Wash | Hand Wash | Do not Iron Directly<br />\nFabric: Cotton<br />\nFitting: Modern fit / Style : Racer back<br />\nPurpose : To be worn as lounge wear, leisure wear and Active wear - for all purpose use<br />\nLabel free for all day comfort<br />\nContoured armholes and neckline with delicate finish</p>\n",
"productId": "4CCE5615-A72F-4792-97A0-FCE18F57A50F",
"productIid": "0",
"parentProductId": "00000000-0000-0000-0000-000000000000",
"price": {
"currencySymbol": "£",
"formatted": {
"withTax": "£80.00",
"withoutTax": "£66.67",
"tax": "£13.33"
},
"raw": {
"withTax": 80,
"withoutTax": 66.6667,
"tax": 13.3333
}
},
"listPrice": {
"currencySymbol": "£",
"formatted": {
"withTax": "£100.00",
"withoutTax": "£66.67",
"tax": "£33.33"
},
"raw": {
"withTax": 100,
"withoutTax": 66.6667,
"tax": 33.3333
}
},
"subTotal": {
"currencySymbol": "£",
"formatted": {
"withTax": "£80.00",
"withoutTax": "£80.00",
"tax": "£0.00"
},
"raw": {
"withTax": 80,
"withoutTax": 80,
"tax": 0
}
},
"discount": null,
"additionalCharge": {
"currencySymbol": "£",
"formatted": {
"withTax": "£0.00",
"withoutTax": "£0.00",
"tax": "£0.00"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"totalPrice": {
"currencySymbol": "£",
"formatted": {
"withTax": "£66.67",
"withoutTax": "£66.67",
"tax": "£0.00"
},
"raw": {
"withTax": 66.6667,
"withoutTax": 66.6667,
"tax": 0
}
},
"image": "https://liveocxcdn.azureedge.net/betterstore/products/blue1.jpg?fm=webp",
"qty": 1,
"displayOrder": 1,
"isSubscription": false,
"isMembership": false
},
],
"isLocked": false,
"createdByAdmin": false,
"poNumber": null,
"isQuote": false,
"quoteStatus": 0,
"postCode": null,
"hasMembership": false,
"exchangeRate": 1,
"baseCurrency": "GBP",
"microSiteId": "00000000-0000-0000-0000-000000000000",
"baseCurrencyTotal": 169.99,
"membershipDiscount": null,
"created": "2022-03-14T16:52:32.583",
"lastUpdated": "2022-03-14T16:52:55.233"
}
]
}
Get basket based on id
This endpoint allows you to get a basket based on Id.
Developers - API Operations:
Operation | Endpoint | Response |
---|---|---|
Get baskets | /api/v2/commerce/basket/:id | Gets user baskets based on Id. |
Required attributes
- Name
Id
- Type
- string
- Description
Id to identify the basket
Response Properties
- Name
statusCode
- Type
- number
- Description
Status code of the response
- Name
status
- Type
- string
- Description
Status of the response
- Name
errors
- Type
- array
- Description
List of errors in the response
- Name
success
- Type
- boolean
- Description
Success status of the response
- Name
message
- Type
- string
- Description
Message of the response
- Name
messageCode
- Type
- string
- Description
Message code of the response
- Name
result
- Type
- object
- Description
Result of the response
- Name
id
- Type
- number
- Description
Id to identify the user
- Name
currencySymbol
- Type
- string
- Description
Currency Symbol for Price e.g £
- Name
currencyCode
- Type
- string
- Description
Currency code according to the region e.g. GBP:'Great Britain Pound'
- Name
userId
- Type
- string
- Description
User Id to identify the User
- Name
userEmail
- Type
- string
- Description
User email provided by the user
- Name
shippingMethodId
- Type
- string
- Description
Shipping method Id to identify the shipping method
- Name
subTotal
- Type
- object
- Description
Sub total of the total price
- Name
shippingCharge
- Type
- object
- Description
Shipping charges of the product in basket
- Name
formatted
- Type
- object
- Description
Formatted price with and without tax
- Name
withTax
- Type
- string
- Description
Price of basket item with Tax
- Name
withoutTax
- Type
- string
- Description
Price of basket item without Tax
- Name
tax
- Type
- string
- Description
Tax amount of basket item
- Name
raw
- Type
- object
- Description
Raw price without discount
- Name
discount
- Type
- object
- Description
Discount amount on the basket item
- Name
additionalCharge
- Type
- object
- Description
Additional charges applied on the basket item
- Name
grandTotal
- Type
- object
- Description
Grand total price of basket items
- Name
isLocked
- Type
- boolean
- Description
Flag to check if the basket is locked
- Name
createdByAdmin
- Type
- boolean
- Description
Flag to check if the basket is created by Admin
- Name
poNumber
- Type
- string
- Description
P O Number of the basket
- Name
isQuote
- Type
- boolean
- Description
Flag to check if the basket is a Quote
- Name
quoteStatus
- Type
- number
- Description
Quote status of the basket
- Name
postCode
- Type
- string
- Description
Post code of the user
- Name
hasMembership
- Type
- boolean
- Description
Flag to check if the user has a membership
- Name
exchangeRate
- Type
- number
- Description
Exchange rate of the currency
- Name
baseCurrency
- Type
- string
- Description
Base currency of the region
- Name
microSiteId
- Type
- string
- Description
Micro site Id of the site
- Name
baseCurrencyTotal
- Type
- number
- Description
Total amount of the basket in base currency
- Name
membershipDiscount
- Type
- string
- Description
Discount given to the user under their membership
- Name
created
- Type
- string
- Description
Date and time when the basket was created
- Name
lastUpdated
- Type
- string
- Description
Date and time when the basket was last updated
- Name
lineItems
- Type
- array
- Description
Array of all the products added in to basket
- Name
stockCode
- Type
- string
- Description
Stock code of the product
- Name
name
- Type
- string
- Description
Name of the product
- Name
slug
- Type
- string
- Description
Slug of the product used to navigate to the product
- Name
shortDescription
- Type
- string
- Description
A short description of the product
- Name
productId
- Type
- string
- Description
Product Id used to identify the product
- Name
productIid
- Type
- string
- Description
Product Iid used to identify the product
- Name
parentProductId
- Type
- string
- Description
Id of the parent product product, used to map personalized products with their parent product
- Name
price
- Type
- string
- Description
Price of the product
- Name
totalPrice
- Type
- object
- Description
Total price of the product
- Name
minPrice
- Type
- number
- Description
Minimum price for the company
- Name
minPriceWithoutTax
- Type
- number
- Description
Minimum price for the company without tax
- Name
maxPrice
- Type
- number
- Description
Maximum price for the company
- Name
maxPriceWithoutTax
- Type
- number
- Description
Maximum price for the company wihtout tax
- Name
currencyDecimalSeparator
- Type
- string
- Description
Currency decimal separator for the region
- Name
currencyDigitsAfterDecimal
- Type
- number
- Description
Digits after decimal for the currency
- Name
id
- Type
- string
- Description
id to identify the user
- Name
title
- Type
- string
- Description
Title of the user e.g. Miss./Mrs./Mr.
- Name
firstName
- Type
- string
- Description
First name of the user
- Name
lastName
- Type
- string
- Description
Last name of the user
- Name
address1
- Type
- string
- Description
Address Line 1 provided by the user
- Name
address2
- Type
- string
- Description
Address Line 2 provided by the user
- Name
address3
- Type
- string
- Description
Address Line 3 provided by the user
- Name
city
- Type
- string
- Description
City name provided by the user
- Name
state
- Type
- string
- Description
State name provided by the user
- Name
country
- Type
- string
- Description
Country name provided by the user
- Name
countryCode
- Type
- string
- Description
Country code provided by the user
- Name
postCode
- Type
- string
- Description
Post code provided by the user
- Name
phoneNo
- Type
- string
- Description
Phone number of the user
- Name
mobileNo
- Type
- string
- Description
Mobile number of the user
- Name
companyName
- Type
- string
- Description
Name of the company provided by the user
- Name
displayOrder
- Type
- number
- Description
Order of the display associated with the product
- Name
totalWithoutShipping
- Type
- object
- Description
Total price of the basket without shipping charges
- Name
taxPercent
- Type
- number
- Description
Amount of tax applied in percentage
- Name
brand
- Type
- string
- Description
Brand name of the product
- Name
subbrand
- Type
- string
- Description
Sub brand name of the product
- Name
image
- Type
- string
- Description
File name of the image of the product
- Name
qty
- Type
- number
- Description
Quantity of product in the basket
- Name
displayOrder
- Type
- number
- Description
Display order of the product in the basket
- Name
itemType
- Type
- number
- Description
Type of item in the basket
- Name
displayInBasket
- Type
- boolean
- Description
Flag to check if the product should be displayed in the basket
- Name
categoryItems
- Type
- array
- Description
List of all the categories available
- Name
categoryId
- Type
- string
- Description
Category Id to identify the cateogories
- Name
categoryName
- Type
- string
- Description
Name of the category e.g. 'Shirts','Joggers', etc
- Name
parentCategoryId
- Type
- string
- Description
Parent category Id to identify the parent category
- Name
parentCategoryName
- Type
- string
- Description
Name of the Parent category e.g. 'Clothings'
- Name
attributesJson
- Type
- string
- Description
JSON attributes of the product
- Name
customInfo1
- Type
- string
- Description
Custom Information of the product in the basket
- Name
customInfo2
- Type
- string
- Description
Custom Information of the product in the basket
- Name
customInfo3
- Type
- string
- Description
Custom Information of the product in the basket
- Name
customInfo4
- Type
- string
- Description
Custom Information of the product in the basket
- Name
customInfo5
- Type
- string
- Description
Custom Information of the product in the basket
- Name
isSubscription
- Type
- boolean
- Description
Flag to check if the user has an active subscription
- Name
isMembership
- Type
- boolean
- Description
Flag to check if the user has an active membership
- Name
subscriptionUserSettings
- Type
- object
- Description
Settings for the users's subscription
- Name
subscriptionPlanId
- Type
- string
- Description
Plan Id of the subscription
- Name
subscriptionTermId
- Type
- string
- Description
Term Id of the subscription
- Name
userPricingType
- Type
- number
- Description
Type of pricing for the user
- Name
subscriptionJson
- Type
- string
- Description
JSON values for the subscription
- Name
authorizationAmount
- Type
- number
- Description
Amount to be authorized for this subscription
- Name
shippingMethods
- Type
- array
- Description
A List of shipping methods available for the products
- Name
id
- Type
- string
- Description
Id to identify the shipping method
- Name
enabled
- Type
- boolean
- Description
Flag to check if the shipping method is enabled
- Name
systemName
- Type
- string
- Description
System name of the shipping methods
- Name
shippingCode
- Type
- string
- Description
Shipping code used by the shipping method
- Name
displayName
- Type
- string
- Description
Display name of the shipping method
- Name
description
- Type
- string
- Description
Description of the shipping method
- Name
displayOrder
- Type
- number
- Description
Display order of this shipping method in the list of shipping methods
- Name
expectedDaysToDeliver
- Type
- number
- Description
Number of days before the expected delivery date
- Name
expectedDeliveryDate
- Type
- string
- Description
Date and time of expected delivery of the product
- Name
deliveryOnOrBefore
- Type
- string
- Description
The date on or before which date the product should be delivered
- Name
isDefault
- Type
- boolean
- Description
Flag to check if this shipping method is the default shipping method
- Name
isNominated
- Type
- boolean
- Description
Flag to check if this shipping method is the nominated shipping method
- Name
type
- Type
- number
- Description
Type of this shipping mehtod
- Name
carrierCode
- Type
- string
- Description
Carrier code of the delivery carrier
- Name
countryCode
- Type
- string
- Description
Country code of the region of delivery
- Name
isPriceOnRequest
- Type
- boolean
- Description
Flag to check if product is produced only for editorials and is never actually put into production for consumer purchase
- Name
showRecomendation
- Type
- boolean
- Description
Flag to check if the recommendations for this product should be shown
- Name
recomendation
- Type
- string
- Description
The recommendations for this product
- Name
isTaxable
- Type
- boolean
- Description
Flag to check if this shipping method is taxable
- Name
shippingCostMethod
- Type
- number
- Description
Used to select the type of shipping cost to be applied
- Name
cutOffTimes
- Type
- string
- Description
It is the latest time in any Business Day that we can process a particular Transaction, request or instruction on that Business Day.
- Name
countryCsv
- Type
- string
- Description
File name for the csv file having data of the countries
- Name
maxDimensionMm
- Type
- number
- Description
Maximum dimensions of the package to be delivered in Millimeters
- Name
priceMatchReqId
- Type
- string
- Description
Id used to match the price requests
- Name
companyDiscount
- Type
- object
- Description
The discount given on the original price of the products by the company to their employees
- Name
validUntil
- Type
- string
- Description
The date time of the validity of the order for delivery
- Name
deliveryInstruction
- Type
- string
- Description
Instructions for the delivery agent regarding the delivery
- Name
deliveryPlans
- Type
- array
- Description
A list of delivery plans for the delivery of the order
- Name
promotionsApplied
- Type
- array
- Description
List of promotions applied on the products in the basket
- Name
voucherCode
- Type
- string
- Description
Voucher code used to validate the offer and claim the benefits e.g. 'DISCOUNT15'
- Name
discountPct
- Type
- number
- Description
Discount value applied on the product in Percentage
- Name
discountAmt
- Type
- object
- Description
The amount of discount to be applied on the products in the basket
- Name
autoApply
- Type
- boolean
- Description
Flag to check if the promotion has to be auto applied on the products
- Name
promoCode
- Type
- string
- Description
Promotion code used to validate the offer e.g. 'DISCOUNT15'
- Name
name
- Type
- string
- Description
Name of the promotion to be applied
- Name
itemGroupId
- Type
- number
- Description
Id used to identify the group of items
- Name
couponProvider
- Type
- string
- Description
The entity that provides the coupon to create an offer
- Name
isManualPrice
- Type
- boolean
- Description
Flag to check if the Price is set Manually
- Name
deliveryMessage
- Type
- string
- Description
Message for the delivery agent provided by the user
- Name
variantProducts
- Type
- array
- Description
A list of all available variants of the current product
- Name
productName
- Type
- string
- Description
Product name of the variant product
- Name
variantAttributes
- Type
- array
- Description
List of variant attributes of the product e.g. Size, Color
- Name
variantProductsAttribute
- Type
- array
- Description
A list of variant attributes of the product
- Name
fieldName
- Type
- string
- Description
Name of the variant attribute
- Name
fieldCode
- Type
- string
- Description
Field code of the atrribute
- Name
fieldValues
- Type
- array
- Description
A list of values for the variant attribute
- Name
currentStock
- Type
- number
- Description
Number of products available in stock
- Name
fulfilmentChannel
- Type
- number
- Description
The method by which sellers can sell items through various sales channels and have the company handle the packaging and shipping aspects for them
- Name
deliveryType
- Type
- number
- Description
The type of delivery for the order
- Name
deliveryCenter
- Type
- object
- Description
The details of the delivery center which will handle the delivery for this order
- Name
recordId
- Type
- string
- Description
Record Id to identify the delivery center records
- Name
code
- Type
- string
- Description
A code used by the delivery center
- Name
name
- Type
- string
- Description
Name of the delivery center
- Name
type
- Type
- number
- Description
Type of the delivery center
- Name
postCode
- Type
- string
- Description
Postal code of the delivery center
- Name
latitude
- Type
- string
- Description
Latitute of the geographical location of the delivery center
- Name
longitude
- Type
- string
- Description
Longitute of the geographical location of the delivery center
- Name
items
- Type
- array
- Description
The list of items to be delivered
- Name
distanceInMiles
- Type
- string
- Description
The distance to the the delivery location in miles
- Name
shippingMethodName
- Type
- string
- Description
The name of the shipping method used for shipping the product
- Name
cost
- Type
- number
- Description
The cost of shipping the product
- Name
shippingSpeed
- Type
- string
- Description
The rate at which the order will be shipped for deliery
- Name
deliveryDateTarget
- Type
- string
- Description
The date and time target for the delivery of the order
- Name
deliveryDateActual
- Type
- string
- Description
The date and time of the actual delivery of the order
- Name
leadTime
- Type
- number
- Description
The amount of time that passes from the start of a process until its conclusion
- Name
leadTimeUom
- Type
- number
- Description
The unit of measurement for the lead time
- Name
leadTimeMin
- Type
- number
- Description
The minimum lead time for the order to be delivered
- Name
leadTimeMax
- Type
- number
- Description
The maximum lead time for the order to be delivered
- Name
pickupStoreId
- Type
- string
- Description
The id of stores from which the order can be collected
- Name
refStoreId
- Type
- string
- Description
Reference Id of the store
- Name
pickupStoreCode
- Type
- string
- Description
The store code for a pickup store
- Name
shippingType
- Type
- number
- Description
The type of shipping used for delivery of the order
- Name
hasSubscription
- Type
- boolean
- Description
Flag to check if the user has a subscription
- Name
subscriptionTotal
- Type
- object
- Description
The total amount that must be paid by the user for the subscription
- Name
isGiftWrapApplied
- Type
- boolean
- Description
Flag to check if Gift wrap is applied to the products
- Name
giftWrapId
- Type
- string
- Description
Gift wrap Id to identify the gift warpped products in the basket
- Name
giftWrapOption
- Type
- string
- Description
The gift wrapping options available for the products in the basket
- Name
membershipPlanId
- Type
- string
- Description
Membership plan Id to identify the membership plan of the user
- Name
snippets
- Type
- array
- Description
A list of snippets that can be added to the site
- Name
slugType
- Type
- number
- Description
Type of slug of the basket
Request
curl --location 'https://api20.bettercommerce.io/api/v2/commerce/basket/:id' \
--header 'Accept: application/json' \
--header 'UserId;' \
--header 'Email: abc@abc.com'
Response
{
"statusCode": 200,
"status": "OK",
"errors": [],
"success": true,
"message": "",
"messageCode": "",
"result": {
"id": "3ea3c02e-82a4-4758-bf11-3530893aaaef",
"currencySymbol": "€",
"currencyCode": "EUR",
"userId": "919f08a4-0a00-46da-bfa9-4bdf317ce072",
"userEmail": "myemail@example.com",
"grandTotal": {
"currencySymbol": "€",
"formatted": {
"withTax": "€99.99000",
"withoutTax": "€99.99000",
"tax": "€.00000"
},
"raw": {
"withTax": 99.99,
"withoutTax": 99.99,
"tax": 0
}
},
"totalWithoutShipping": {
"currencySymbol": "€",
"formatted": {
"withTax": "€96.00000",
"withoutTax": "€96.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 96,
"withoutTax": 96,
"tax": 0
}
},
"shippingMethodId": "STD",
"shippingCharge": {
"currencySymbol": "€",
"formatted": {
"withTax": "€3.99000",
"withoutTax": "€3.99000",
"tax": "€.00000"
},
"raw": {
"withTax": 3.99,
"withoutTax": 3.99,
"tax": 0
}
},
"subTotal": {
"currencySymbol": "€",
"formatted": {
"withTax": "€99.99000",
"withoutTax": "€99.99000",
"tax": "€.00000"
},
"raw": {
"withTax": 99.99,
"withoutTax": 99.99,
"tax": 0
}
},
"discount": {
"currencySymbol": "€",
"formatted": {
"withTax": "€.00000",
"withoutTax": "€.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"taxPercent": 0,
"additionalCharge": {
"currencySymbol": "€",
"formatted": {
"withTax": "€.00000",
"withoutTax": "€.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"lineItems": [
{
"id": "0",
"stockCode": "SKU-0001",
"name": "Polo Shirt",
"productId": "1C5D16AB-0497-462D-A0D2-B2F8F67335A1",
"productIid": "0",
"parentProductId": "",
"brand": "Tommy Hilfiger",
"subbrand": "Tommy Hilfiger",
"price": {
"currencySymbol": "€",
"formatted": {
"withTax": "€24.00000",
"withoutTax": "€24.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 24,
"withoutTax": 24,
"tax": 0
}
},
"subTotal": {
"currencySymbol": "€",
"formatted": {
"withTax": "€96.00000",
"withoutTax": "€96.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 96,
"withoutTax": 96,
"tax": 0
}
},
"totalPrice": {
"currencySymbol": "€",
"formatted": {
"withTax": "€96.00000",
"withoutTax": "€96.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 96,
"withoutTax": 96,
"tax": 0
}
},
"image": "image1.jeg",
"qty": 4,
"displayOrder": 1,
"slug": "/product/SKU-0001",
"itemType": 1,
"displayInBasket": false,
"categoryItems": [
{
"categoryId": "29312465-8f0a-4827-b1bc-79dad65ec5d1",
"categoryName": "Shirt",
"parentCategoryId": "1c2eb621-246a-4fd6-9f8e-8b7b6a93b67d",
"parentCategoryName": "Clothings"
}
],
"attributesJson": "",
"customInfo1": "cust info 1",
"customInfo2": "cust info 2",
"customInfo3": "cust info 3",
"customInfo4": "cust info 4",
"customInfo5": "cust info 5",
"discount": {
"currencySymbol": "€",
"formatted": {
"withTax": "€.00000",
"withoutTax": "€.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"additionalCharge": {
"currencySymbol": "€",
"formatted": {
"withTax": "€.00000",
"withoutTax": "€.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"shortDescription": "Polo Shirt Description",
"companyDiscount": {
"currencySymbol": "€",
"formatted": {
"withTax": "€.00000",
"withoutTax": "€.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"listPrice": {
"currencySymbol": "€",
"formatted": {
"withTax": "€24.00000",
"withoutTax": "€24.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 24,
"withoutTax": 24,
"tax": 0
}
},
"isSubscription": false,
"isMembership": false,
"subscriptionUserSettings": {
"subscriptionPlanId": "00000000-0000-0000-0000-000000000000",
"subscriptionTermId": "00000000-0000-0000-0000-000000000000",
"userPricingType": 0,
"subscriptionJson": null,
"authorizationAmount": 0
},
"promotionsApplied": [
{
"voucherCode": "DISCOUNT15",
"discountPct": 0,
"discountAmt": {
"minPrice": 0,
"minPriceWithoutTax": 0,
"maxPrice": 0,
"maxPriceWithoutTax": 0,
"currencyDecimalSeparator": ".",
"currencyDigitsAfterDecimal": 2,
"currencySymbol": "€",
"formatted": {
"withTax": "€.00000",
"withoutTax": "€.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"autoApply": false,
"promoCode": "DISCOUNT15",
"name": "Dummy Promo"
}
],
"isGiftWrapApplied": false,
"giftWrapId": "00000000-0000-0000-0000-000000000000",
"itemGroupId": 0,
"couponProvider": "",
"isManualPrice": false,
"priceMatchReqId": "00000000-0000-0000-0000-000000000000",
"deliveryMessage": " delivery message",
"variantProducts": [
{
"stockCode": null,
"productId": "00000000-0000-0000-0000-000000000000",
"price": {
"minPrice": 0,
"minPriceWithoutTax": 0,
"maxPrice": 0,
"maxPriceWithoutTax": 0,
"currencyDecimalSeparator": ".",
"currencyDigitsAfterDecimal": 2,
"currencySymbol": "€",
"formatted": {
"withTax": "€15.99000",
"withoutTax": "€15.99000",
"tax": "€.00000"
},
"raw": {
"withTax": 15.99,
"withoutTax": 15.99,
"tax": 0
}
},
"slug": null,
"image": "img.jpg",
"productName": "Variant SKU",
"variantAttributes": []
}
],
"variantProductsAttribute": [
{
"fieldName": "color",
"fieldCode": "global.color",
"fieldValues": []
}
],
"currentStock": 999
}
],
"promotionsApplied": [
{
"voucherCode": null,
"discountPct": 0,
"discountAmt": null,
"autoApply": false,
"promoCode": null,
"name": null
}
],
"shippingMethods": [
{
"id": "00000000-0000-0000-0000-000000000000",
"enabled": false,
"systemName": null,
"shippingCode": null,
"displayName": null,
"description": null,
"displayOrder": 0,
"expectedDaysToDeliver": 0,
"expectedDeliveryDate": "0001-01-01T00:00:00",
"deliveryOnOrBefore": null,
"price": {
"currencySymbol": "£",
"formatted": {
"withTax": "£0.00",
"withoutTax": "£0.00",
"tax": "£0.00"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"isDefault": false,
"isNominated": false,
"type": 0,
"carrierCode": null,
"countryCode": null,
"isPriceOnRequest": false,
"showRecomendation": false,
"recomendation": null,
"isTaxable": false,
"shippingCostMethod": 0,
"cutOffTimes": null,
"countryCsv": null
}
],
"created": "0001-01-01T00:00:00",
"lastUpdated": "0001-01-01T00:00:00",
"isQuote": false,
"quoteStatus": 0,
"customInfo1": "cust info 1",
"customInfo2": "cust info 2",
"customInfo3": "cust info 3",
"customInfo4": "cust info 4",
"customInfo5": "cust info 5",
"shippingAddress": {
"id": 0,
"title": "Mr.",
"firstName": "FName",
"lastName": "LName",
"address1": "Address Line 1",
"address2": "Address Line 2",
"address3": "Address Line 3",
"city": "London",
"state": "London",
"country": "United Kingdom",
"countryCode": "UK",
"postCode": null,
"phoneNo": "9999999999",
"mobileNo": null,
"companyName": "My Company"
},
"billingAddress": {
"id": 0,
"title": "Mr.",
"firstName": "FName",
"lastName": "LName",
"address1": "Address Line 1",
"address2": "Address Line 2",
"address3": "Address Line 3",
"city": "London",
"state": "London",
"country": "United Kingdom",
"countryCode": "UK",
"postCode": null,
"phoneNo": "9999999999",
"mobileNo": null,
"companyName": "My Company"
},
"postCode": "XX55YY",
"maxDimensionMm": 0,
"companyDiscount": {
"currencySymbol": "€",
"formatted": {
"withTax": "€.00000",
"withoutTax": "€.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"validUntil": "0001-01-01T00:00:00",
"isLocked": false,
"createdByAdmin": false,
"poNumber": "PO00001",
"deliveryInstruction": "Please read the give instructions",
"deliveryPlans": [
{
"fulfilmentChannel": 0,
"deliveryType": 0,
"deliveryCenter": {
"recordId": "00000000-0000-0000-0000-000000000000",
"code": null,
"name": null,
"type": 0,
"postCode": null,
"latitude": null,
"longitude": null
},
"items": [],
"distanceInMiles": null,
"shippingMethodId": "00000000-0000-0000-0000-000000000000",
"shippingMethodName": null,
"cost": 0,
"shippingSpeed": " - ",
"deliveryDateTarget": "2022-03-15T07:25:35.0394846Z",
"deliveryDateActual": "0001-01-01T00:00:00",
"leadTime": 0,
"leadTimeUom": 0,
"leadTimeMin": 0,
"leadTimeMax": 0,
"pickupStoreId": "00000000-0000-0000-0000-000000000000",
"refStoreId": null,
"pickupStoreCode": null,
"shippingType": 0,
"lineItems": null,
"created": null,
"recordId": "00000000-0000-0000-0000-000000000000"
}
],
"hasSubscription": false,
"subscriptionTotal": {
"currencySymbol": "€",
"formatted": {
"withTax": "€.00000",
"withoutTax": "€.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"isGiftWrapApplied": false,
"giftWrapId": "00000000-0000-0000-0000-000000000000",
"giftWrapOption": null,
"membershipPlanId": "00000000-0000-0000-0000-000000000000",
"hasMembership": false,
"exchangeRate": 1,
"baseCurrency": "EUR",
"microSiteId": "00000000-0000-0000-0000-000000000000",
"baseCurrencyTotal": 99.99,
"membershipDiscount": {
"currencySymbol": "€",
"formatted": {
"withTax": "€.00000",
"withoutTax": "€.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
}
},
"snippets": [],
"slugType": 1
}
Update campaign code for basket
This endpoint allows you to update the campaign code for the basket.
Developers - API Operations:
Operation | Endpoint | Response |
---|---|---|
Update baskets | /api/v2/commerce/basket/:id/campaign?campaignCode=dolore cillum sit | Update campaign code for basket. |
Required attributes
- Name
Id
- Type
- string
- Description
Id to identify the basket
- Name
campaignCode
- Type
- string
- Description
New Campaign code that will be used to update previous campaign code
Response Properties
- Name
statusCode
- Type
- number
- Description
Status code of the response
- Name
status
- Type
- string
- Description
Status of the response
- Name
errors
- Type
- array
- Description
List of errors in the response
- Name
success
- Type
- boolean
- Description
Success status of the response
- Name
message
- Type
- string
- Description
Message of the response
- Name
messageCode
- Type
- string
- Description
Message code of the response
- Name
result
- Type
- object
- Description
Result of the response
- Name
id
- Type
- string
- Description
id to identify the user
- Name
title
- Type
- string
- Description
Title of the user e.g. Miss./Mrs./Mr.
- Name
firstName
- Type
- string
- Description
First name of the user
- Name
lastName
- Type
- string
- Description
Last name of the user
- Name
address1
- Type
- string
- Description
Address Line 1 provided by the user
- Name
address2
- Type
- string
- Description
Address Line 2 provided by the user
- Name
address3
- Type
- string
- Description
Address Line 3 provided by the user
- Name
city
- Type
- string
- Description
City name provided by the user
- Name
state
- Type
- string
- Description
State name provided by the user
- Name
country
- Type
- string
- Description
Country name provided by the user
- Name
countryCode
- Type
- string
- Description
Country code provided by the user
- Name
postCode
- Type
- string
- Description
Post code provided by the user
- Name
phoneNo
- Type
- string
- Description
Phone number of the user
- Name
mobileNo
- Type
- string
- Description
Mobile number of the user
- Name
companyName
- Type
- string
- Description
Name of the company provided by the user
- Name
isDefaultDelivery
- Type
- boolean
- Description
Flag to check if the addresss is default delivery address
- Name
isDefaultForSubscription
- Type
- boolean
- Description
Flag to check if the address is default
- Name
isDefaultBilling
- Type
- boolean
- Description
Flag to check if the address is default billing address
- Name
customerId
- Type
- string
- Description
Customer Id to identify the user
Request
curl --location --request PUT 'https://api20.bettercommerce.io/api/v2/commerce/basket/:id/campaign?campaignCode=dolore%20cillum%20sit' \
--header 'Accept: application/json' \
--header 'UserId;' \
--header 'Email: abc@abc.com'
Response
{
"statusCode": 200,
"status": "OK",
"errors": [],
"success": true,
"message": "",
"messageCode": "",
"result": {
"customerId": "29b600a5-e08d-4c40-99c2-2806a98a4415",
"isDefault": false,
"isDefaultDelivery": false,
"isDefaultForSubscription": false,
"isDefaultBilling": false,
"id": 0,
"title": "Mr.",
"firstName": "David",
"lastName": "Smith",
"address1": "Address Line 1",
"address2": "Address Line 2",
"address3": "Address Line 3",
"city": "London",
"state": "London",
"country": "United Kingdom",
"countryCode": "UK",
"postCode": "XX55YY",
"phoneNo": "9999999999",
"mobileNo": "888888888",
"companyName": "My Company"
}
}
Update custom info fields for basket
This endpoint allows you to get a basket based on Id.
Developers - API Operations:
Operation | Endpoint | Response |
---|---|---|
Update baskets | /api/v2/commerce/basket/:id/custom-info | Update custom info fields for basket. |
Required attributes
- Name
Id
- Type
- string
- Description
Id to identify the basket
- Name
info
- Type
- model
- Description
Customer Id to identify the user
Model attributes
- Name
basketId
- Type
- string
- Description
Basket Id to identify the basket
- Name
customInfo1
- Type
- string
- Description
Custom information about the product given by the user
- Name
customInfo2
- Type
- string
- Description
Custom information about the product given by the user
- Name
customInfo3
- Type
- string
- Description
Custom information about the product given by the user
- Name
customInfo4
- Type
- string
- Description
Custom information about the product given by the user
- Name
customInfo5
- Type
- string
- Description
Custom information about the product given by the user
- Name
lineInfo
- Type
- array
- Description
List of products in the basket
- Name
productId
- Type
- string
- Description
Id used to identify the product
- Name
parentProductId
- Type
- string
- Description
Custom information about the product given by the user
- Name
lineId
- Type
- string
- Description
Id used to identify the line of products in basket
- Name
customInfo1Formatted
- Type
- string
- Description
New Custom information about the product given by the user to be updated
- Name
customInfo2Formatted
- Type
- string
- Description
New Custom information about the product given by the user to be updated
- Name
customInfo3Formatted
- Type
- string
- Description
New Custom information about the product given by the user to be updated
- Name
customInfo4Formatted
- Type
- string
- Description
New Custom information about the product given by the user to be updated
- Name
customInfo5Formatted
- Type
- string
- Description
New Custom information about the product given by the user to be updated
- Name
qty
- Type
- number
- Description
Quantity of the product in the basket
- Name
additionalCharge
- Type
- number
- Description
Additional charges applied on the product
- Name
serviceType
- Type
- string
- Description
Type of service provided for the product in the basket
- Name
lengthMm
- Type
- number
- Description
Length of the product in Millimeters
- Name
additionalServiceCost
- Type
- number
- Description
Additional service cost applied on the product for specific services
Response Properties
- Name
statusCode
- Type
- number
- Description
Status code of the response
- Name
status
- Type
- string
- Description
Status of the response
- Name
errors
- Type
- array
- Description
List of errors in the response
- Name
success
- Type
- boolean
- Description
Success status of the response
- Name
message
- Type
- string
- Description
Message of the response
- Name
messageCode
- Type
- string
- Description
Message code of the response
- Name
result
- Type
- object
- Description
Result of the response
- Name
id
- Type
- number
- Description
Id to identify the user
- Name
currencySymbol
- Type
- string
- Description
Currency Symbol for Price e.g £
- Name
currencyCode
- Type
- string
- Description
Currency code according to the region e.g. GBP:'Great Britain Pound'
- Name
userId
- Type
- string
- Description
User Id to identify the User
- Name
userEmail
- Type
- string
- Description
User email provided by the user
- Name
shippingMethodId
- Type
- string
- Description
Shipping method Id to identify the shipping method
- Name
subTotal
- Type
- object
- Description
Sub total of the total price
- Name
shippingCharge
- Type
- object
- Description
Shipping charges of the product in basket
- Name
formatted
- Type
- object
- Description
Formatted price with and without tax
- Name
withTax
- Type
- string
- Description
Price of basket item with Tax
- Name
withoutTax
- Type
- string
- Description
Price of basket item without Tax
- Name
tax
- Type
- string
- Description
Tax amount of basket item
- Name
raw
- Type
- object
- Description
Raw price without discount
- Name
discount
- Type
- object
- Description
Discount amount on the basket item
- Name
additionalCharge
- Type
- object
- Description
Additional charges applied on the basket item
- Name
grandTotal
- Type
- object
- Description
Grand total price of basket items
- Name
isLocked
- Type
- boolean
- Description
Flag to check if the basket is locked
- Name
createdByAdmin
- Type
- boolean
- Description
Flag to check if the basket is created by Admin
- Name
poNumber
- Type
- string
- Description
P O Number of the basket
- Name
isQuote
- Type
- boolean
- Description
Flag to check if the basket is a Quote
- Name
quoteStatus
- Type
- number
- Description
Quote status of the basket
- Name
postCode
- Type
- string
- Description
Post code of the user
- Name
hasMembership
- Type
- boolean
- Description
Flag to check if the user has a membership
- Name
exchangeRate
- Type
- number
- Description
Exchange rate of the currency
- Name
baseCurrency
- Type
- string
- Description
Base currency of the region
- Name
microSiteId
- Type
- string
- Description
Micro site Id of the site
- Name
baseCurrencyTotal
- Type
- number
- Description
Total amount of the basket in base currency
- Name
membershipDiscount
- Type
- string
- Description
Discount given to the user under their membership
- Name
created
- Type
- string
- Description
Date and time when the basket was created
- Name
lastUpdated
- Type
- string
- Description
Date and time when the basket was last updated
- Name
lineItems
- Type
- array
- Description
Array of all the products added in to basket
- Name
stockCode
- Type
- string
- Description
Stock code of the product
- Name
name
- Type
- string
- Description
Name of the product
- Name
slug
- Type
- string
- Description
Slug of the product used to navigate to the product
- Name
shortDescription
- Type
- string
- Description
A short description of the product
- Name
productId
- Type
- string
- Description
Product Id used to identify the product
- Name
productIid
- Type
- string
- Description
Product Iid used to identify the product
- Name
parentProductId
- Type
- string
- Description
Id of the parent product product, used to map personalized products with their parent product
- Name
price
- Type
- string
- Description
Price of the product
- Name
totalPrice
- Type
- object
- Description
Total price of the product
- Name
minPrice
- Type
- number
- Description
Minimum price for the company
- Name
minPriceWithoutTax
- Type
- number
- Description
Minimum price for the company without tax
- Name
maxPrice
- Type
- number
- Description
Maximum price for the company
- Name
maxPriceWithoutTax
- Type
- number
- Description
Maximum price for the company wihtout tax
- Name
currencyDecimalSeparator
- Type
- string
- Description
Currency decimal separator for the region
- Name
currencyDigitsAfterDecimal
- Type
- number
- Description
Digits after decimal for the currency
- Name
id
- Type
- string
- Description
id to identify the user
- Name
title
- Type
- string
- Description
Title of the user e.g. Miss./Mrs./Mr.
- Name
firstName
- Type
- string
- Description
First name of the user
- Name
lastName
- Type
- string
- Description
Last name of the user
- Name
address1
- Type
- string
- Description
Address Line 1 provided by the user
- Name
address2
- Type
- string
- Description
Address Line 2 provided by the user
- Name
address3
- Type
- string
- Description
Address Line 3 provided by the user
- Name
city
- Type
- string
- Description
City name provided by the user
- Name
state
- Type
- string
- Description
State name provided by the user
- Name
country
- Type
- string
- Description
Country name provided by the user
- Name
countryCode
- Type
- string
- Description
Country code provided by the user
- Name
postCode
- Type
- string
- Description
Post code provided by the user
- Name
phoneNo
- Type
- string
- Description
Phone number of the user
- Name
mobileNo
- Type
- string
- Description
Mobile number of the user
- Name
companyName
- Type
- string
- Description
Name of the company provided by the user
- Name
displayOrder
- Type
- number
- Description
Order of the display associated with the product
- Name
totalWithoutShipping
- Type
- object
- Description
Total price of the basket without shipping charges
- Name
taxPercent
- Type
- number
- Description
Amount of tax applied in percentage
- Name
brand
- Type
- string
- Description
Brand name of the product
- Name
subbrand
- Type
- string
- Description
Sub brand name of the product
- Name
image
- Type
- string
- Description
File name of the image of the product
- Name
qty
- Type
- number
- Description
Quantity of product in the basket
- Name
displayOrder
- Type
- number
- Description
Display order of the product in the basket
- Name
itemType
- Type
- number
- Description
Type of item in the basket
- Name
displayInBasket
- Type
- boolean
- Description
Flag to check if the product should be displayed in the basket
- Name
categoryItems
- Type
- array
- Description
List of all the categories available
- Name
categoryId
- Type
- string
- Description
Category Id to identify the cateogories
- Name
categoryName
- Type
- string
- Description
Name of the category e.g. 'Shirts','Joggers', etc
- Name
parentCategoryId
- Type
- string
- Description
Parent category Id to identify the parent category
- Name
parentCategoryName
- Type
- string
- Description
Name of the Parent category e.g. 'Clothings'
- Name
attributesJson
- Type
- string
- Description
JSON attributes of the product
- Name
customInfo1
- Type
- string
- Description
Custom Information of the product in the basket
- Name
customInfo2
- Type
- string
- Description
Custom Information of the product in the basket
- Name
customInfo3
- Type
- string
- Description
Custom Information of the product in the basket
- Name
customInfo4
- Type
- string
- Description
Custom Information of the product in the basket
- Name
customInfo5
- Type
- string
- Description
Custom Information of the product in the basket
- Name
isSubscription
- Type
- boolean
- Description
Flag to check if the user has an active subscription
- Name
isMembership
- Type
- boolean
- Description
Flag to check if the user has an active membership
- Name
subscriptionUserSettings
- Type
- object
- Description
Settings for the users's subscription
- Name
subscriptionPlanId
- Type
- string
- Description
Plan Id of the subscription
- Name
subscriptionTermId
- Type
- string
- Description
Term Id of the subscription
- Name
userPricingType
- Type
- number
- Description
Type of pricing for the user
- Name
subscriptionJson
- Type
- string
- Description
JSON values for the subscription
- Name
authorizationAmount
- Type
- number
- Description
Amount to be authorized for this subscription
- Name
shippingMethods
- Type
- array
- Description
A List of shipping methods available for the products
- Name
id
- Type
- string
- Description
Id to identify the shipping method
- Name
enabled
- Type
- boolean
- Description
Flag to check if the shipping method is enabled
- Name
systemName
- Type
- string
- Description
System name of the shipping methods
- Name
shippingCode
- Type
- string
- Description
Shipping code used by the shipping method
- Name
displayName
- Type
- string
- Description
Display name of the shipping method
- Name
description
- Type
- string
- Description
Description of the shipping method
- Name
displayOrder
- Type
- number
- Description
Display order of this shipping method in the list of shipping methods
- Name
expectedDaysToDeliver
- Type
- number
- Description
Number of days before the expected delivery date
- Name
expectedDeliveryDate
- Type
- string
- Description
Date and time of expected delivery of the product
- Name
deliveryOnOrBefore
- Type
- string
- Description
The date on or before which date the product should be delivered
- Name
isDefault
- Type
- boolean
- Description
Flag to check if this shipping method is the default shipping method
- Name
isNominated
- Type
- boolean
- Description
Flag to check if this shipping method is the nominated shipping method
- Name
type
- Type
- number
- Description
Type of this shipping mehtod
- Name
carrierCode
- Type
- string
- Description
Carrier code of the delivery carrier
- Name
countryCode
- Type
- string
- Description
Country code of the region of delivery
- Name
isPriceOnRequest
- Type
- boolean
- Description
Flag to check if product is produced only for editorials and is never actually put into production for consumer purchase
- Name
showRecomendation
- Type
- boolean
- Description
Flag to check if the recommendations for this product should be shown
- Name
recomendation
- Type
- string
- Description
The recommendations for this product
- Name
isTaxable
- Type
- boolean
- Description
Flag to check if this shipping method is taxable
- Name
shippingCostMethod
- Type
- number
- Description
Used to select the type of shipping cost to be applied
- Name
cutOffTimes
- Type
- string
- Description
It is the latest time in any Business Day that we can process a particular Transaction, request or instruction on that Business Day.
- Name
countryCsv
- Type
- string
- Description
File name for the csv file having data of the countries
- Name
maxDimensionMm
- Type
- number
- Description
Maximum dimensions of the package to be delivered in Millimeters
- Name
companyDiscount
- Type
- object
- Description
The discount given on the original price of the products by the company to their employees
- Name
validUntil
- Type
- string
- Description
The date time of the validity of the order for delivery
- Name
deliveryInstruction
- Type
- string
- Description
Instructions for the delivery agent regarding the delivery
- Name
deliveryPlans
- Type
- array
- Description
A list of delivery plans for the delivery of the order
- Name
fulfilmentChannel
- Type
- number
- Description
The method by which sellers can sell items through various sales channels and have the company handle the packaging and shipping aspects for them
- Name
deliveryType
- Type
- number
- Description
The type of delivery for the order
- Name
deliveryCenter
- Type
- object
- Description
The details of the delivery center which will handle the delivery for this order
- Name
recordId
- Type
- string
- Description
Record Id to identify the delivery center records
- Name
code
- Type
- string
- Description
A code used by the delivery center
- Name
name
- Type
- string
- Description
Name of the delivery center
- Name
type
- Type
- number
- Description
Type of the delivery center
- Name
postCode
- Type
- string
- Description
Postal code of the delivery center
- Name
latitude
- Type
- string
- Description
Latitute of the geographical location of the delivery center
- Name
longitude
- Type
- string
- Description
Longitute of the geographical location of the delivery center
- Name
items
- Type
- array
- Description
The list of items to be delivered
- Name
distanceInMiles
- Type
- string
- Description
The distance to the the delivery location in miles
- Name
shippingMethodName
- Type
- string
- Description
The name of the shipping method used for shipping the product
- Name
cost
- Type
- number
- Description
The cost of shipping the product
- Name
shippingSpeed
- Type
- string
- Description
The rate at which the order will be shipped for deliery
- Name
deliveryDateTarget
- Type
- string
- Description
The date and time target for the delivery of the order
- Name
deliveryDateActual
- Type
- string
- Description
The date and time of the actual delivery of the order
- Name
leadTime
- Type
- number
- Description
The amount of time that passes from the start of a process until its conclusion
- Name
leadTimeUom
- Type
- number
- Description
The unit of measurement for the lead time
- Name
leadTimeMin
- Type
- number
- Description
The minimum lead time for the order to be delivered
- Name
leadTimeMax
- Type
- number
- Description
The maximum lead time for the order to be delivered
- Name
pickupStoreId
- Type
- string
- Description
The id of stores from which the order can be collected
- Name
refStoreId
- Type
- string
- Description
Reference Id of the store
- Name
pickupStoreCode
- Type
- string
- Description
The store code for a pickup store
- Name
shippingType
- Type
- number
- Description
The type of shipping used for delivery of the order
- Name
hasSubscription
- Type
- boolean
- Description
Flag to check if the user has a subscription
- Name
subscriptionTotal
- Type
- object
- Description
The total amount that must be paid by the user for the subscription
- Name
isGiftWrapApplied
- Type
- boolean
- Description
Flag to check if Gift wrap is applied to the products
- Name
giftWrapId
- Type
- string
- Description
Gift wrap Id to identify the gift warpped products in the basket
- Name
giftWrapOption
- Type
- string
- Description
The gift wrapping options available for the products in the basket
- Name
membershipPlanId
- Type
- string
- Description
Membership plan Id to identify the membership plan of the user
- Name
snippets
- Type
- array
- Description
A list of snippets that can be added to the site
- Name
slugType
- Type
- number
- Description
Type of slug of the basket
- Name
promotionsApplied
- Type
- array
- Description
List of promotions applied on the products in the basket
- Name
voucherCode
- Type
- string
- Description
Voucher code used to validate the offer and claim the benefits e.g. 'DISCOUNT15'
- Name
discountPct
- Type
- number
- Description
Discount value applied on the product in Percentage
- Name
discountAmt
- Type
- object
- Description
The amount of discount to be applied on the products in the basket
- Name
autoApply
- Type
- boolean
- Description
Flag to check if the promotion has to be auto applied on the products
- Name
promoCode
- Type
- string
- Description
Promotion code used to validate the offer e.g. 'DISCOUNT15'
- Name
name
- Type
- string
- Description
Name of the promotion to be applied
- Name
itemGroupId
- Type
- number
- Description
Id used to identify the group of items
- Name
couponProvider
- Type
- string
- Description
The entity that provides the coupon to create an offer
- Name
isManualPrice
- Type
- boolean
- Description
Flag to check if the Price is set Manually
- Name
priceMatchReqId
- Type
- string
- Description
Id used to match the price requests
- Name
deliveryMessage
- Type
- string
- Description
Message for the delivery agent provided by the user
- Name
variantProducts
- Type
- array
- Description
A list of all available variants of the current product
- Name
productName
- Type
- string
- Description
Product name of the variant product
- Name
variantAttributes
- Type
- array
- Description
List of variant attributes of the product e.g. Size, Color
- Name
variantProductsAttribute
- Type
- array
- Description
A list of variant attributes of the product
- Name
fieldName
- Type
- string
- Description
Name of the variant attribute
- Name
fieldCode
- Type
- string
- Description
Field code of the atrribute
- Name
fieldValues
- Type
- array
- Description
A list of values for the variant attribute
- Name
currentStock
- Type
- number
- Description
Number of products available in stock
Request
curl --location --request PUT 'https://api20.bettercommerce.io/api/v2/commerce/basket/dolore cillum sit/custom-info' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Accept: application/json' \
--header 'UserId;' \
--header 'Email: abc@abc.com' \
--data '{
"basketId": "",
"customInfo1": "cust info 1",
"customInfo2": "cust info 2",
"customInfo3": "cust info 3",
"customInfo4": "cust info 4",
"customInfo5": "cust info 5",
"lineInfo": [
{
"productId": "",
"parentProductId": "00000000-0000-0000-0000-000000000000",
"lineId": ,
"customInfo1": "cust info 1",
"customInfo2": "cust info 2",
"customInfo3": "cust info 3",
"customInfo4": "cust info 4",
"customInfo5": "cust info 5",
"customInfo1Formatted": "<b>cust info 1<b>",
"customInfo2Formatted": "<i>cust info 2<i>",
"customInfo3Formatted": "cust info 3",
"customInfo4Formatted": "cust info 4",
"customInfo5Formatted": "cust info 5",
"qty": 1,
"additionalCharge": 0,
"serviceType": "",
"lengthMm": 0,
"additionalServiceCost": 0
}
]
}'
Response
{
"statusCode": 200,
"status": "OK",
"errors": [],
"success": true,
"message": "",
"messageCode": "",
"result": {
"id": "eebd515a-7997-4b8e-a66a-d3fc179c8862",
"currencySymbol": "€",
"currencyCode": "EUR",
"userId": "45471f86-ba0a-47ee-a583-f5e8bd4626e0",
"userEmail": "myemail@example.com",
"grandTotal": {
"currencySymbol": "€",
"formatted": {
"withTax": "€99.99000",
"withoutTax": "€99.99000",
"tax": "€.00000"
},
"raw": {
"withTax": 99.99,
"withoutTax": 99.99,
"tax": 0
}
},
"totalWithoutShipping": {
"currencySymbol": "€",
"formatted": {
"withTax": "€96.00000",
"withoutTax": "€96.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 96,
"withoutTax": 96,
"tax": 0
}
},
"shippingMethodId": "STD",
"shippingCharge": {
"currencySymbol": "€",
"formatted": {
"withTax": "€3.99000",
"withoutTax": "€3.99000",
"tax": "€.00000"
},
"raw": {
"withTax": 3.99,
"withoutTax": 3.99,
"tax": 0
}
},
"subTotal": {
"currencySymbol": "€",
"formatted": {
"withTax": "€99.99000",
"withoutTax": "€99.99000",
"tax": "€.00000"
},
"raw": {
"withTax": 99.99,
"withoutTax": 99.99,
"tax": 0
}
},
"discount": {
"currencySymbol": "€",
"formatted": {
"withTax": "€.00000",
"withoutTax": "€.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"taxPercent": 0,
"additionalCharge": {
"currencySymbol": "€",
"formatted": {
"withTax": "€.00000",
"withoutTax": "€.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"lineItems": [
{
"id": "0",
"stockCode": "SKU-0001",
"name": "Polo Shirt",
"productId": "1C5D16AB-0497-462D-A0D2-B2F8F67335A1",
"productIid": "0",
"parentProductId": "",
"brand": "Tommy Hilfiger",
"subbrand": "Tommy Hilfiger",
"price": {
"currencySymbol": "€",
"formatted": {
"withTax": "€24.00000",
"withoutTax": "€24.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 24,
"withoutTax": 24,
"tax": 0
}
},
"subTotal": {
"currencySymbol": "€",
"formatted": {
"withTax": "€96.00000",
"withoutTax": "€96.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 96,
"withoutTax": 96,
"tax": 0
}
},
"totalPrice": {
"currencySymbol": "€",
"formatted": {
"withTax": "€96.00000",
"withoutTax": "€96.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 96,
"withoutTax": 96,
"tax": 0
}
},
"image": "image1.jeg",
"qty": 4,
"displayOrder": 1,
"slug": "/product/SKU-0001",
"itemType": 1,
"displayInBasket": false,
"categoryItems": [
{
"categoryId": "ff3e6ddf-2a27-4a5e-9c97-fff002530ca3",
"categoryName": "Shirt",
"parentCategoryId": "37f91ae5-a7fa-43dc-affb-cb19d72d3789",
"parentCategoryName": "Clothings"
}
],
"attributesJson": "",
"customInfo1": "cust info 1",
"customInfo2": "cust info 2",
"customInfo3": "cust info 3",
"customInfo4": "cust info 4",
"customInfo5": "cust info 5",
"discount": {
"currencySymbol": "€",
"formatted": {
"withTax": "€.00000",
"withoutTax": "€.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"additionalCharge": {
"currencySymbol": "€",
"formatted": {
"withTax": "€.00000",
"withoutTax": "€.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"shortDescription": "Polo Shirt Description",
"companyDiscount": {
"currencySymbol": "€",
"formatted": {
"withTax": "€.00000",
"withoutTax": "€.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"listPrice": {
"currencySymbol": "€",
"formatted": {
"withTax": "€24.00000",
"withoutTax": "€24.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 24,
"withoutTax": 24,
"tax": 0
}
},
"isSubscription": false,
"isMembership": false,
"subscriptionUserSettings": {
"subscriptionPlanId": "00000000-0000-0000-0000-000000000000",
"subscriptionTermId": "00000000-0000-0000-0000-000000000000",
"userPricingType": 0,
"subscriptionJson": null,
"authorizationAmount": 0
},
"promotionsApplied": [
{
"voucherCode": "DISCOUNT15",
"discountPct": 0,
"discountAmt": {
"minPrice": 0,
"minPriceWithoutTax": 0,
"maxPrice": 0,
"maxPriceWithoutTax": 0,
"currencyDecimalSeparator": ".",
"currencyDigitsAfterDecimal": 2,
"currencySymbol": "€",
"formatted": {
"withTax": "€.00000",
"withoutTax": "€.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"autoApply": false,
"promoCode": "DISCOUNT15",
"name": "Dummy Promo"
}
],
"isGiftWrapApplied": false,
"giftWrapId": "00000000-0000-0000-0000-000000000000",
"itemGroupId": 0,
"couponProvider": "",
"isManualPrice": false,
"priceMatchReqId": "00000000-0000-0000-0000-000000000000",
"deliveryMessage": " delivery message",
"variantProducts": [
{
"stockCode": null,
"productId": "00000000-0000-0000-0000-000000000000",
"price": {
"minPrice": 0,
"minPriceWithoutTax": 0,
"maxPrice": 0,
"maxPriceWithoutTax": 0,
"currencyDecimalSeparator": ".",
"currencyDigitsAfterDecimal": 2,
"currencySymbol": "€",
"formatted": {
"withTax": "€15.99000",
"withoutTax": "€15.99000",
"tax": "€.00000"
},
"raw": {
"withTax": 15.99,
"withoutTax": 15.99,
"tax": 0
}
},
"slug": null,
"image": "img.jpg",
"productName": "Variant SKU",
"variantAttributes": []
}
],
"variantProductsAttribute": [
{
"fieldName": "color",
"fieldCode": "global.color",
"fieldValues": []
}
],
"currentStock": 999
}
],
"promotionsApplied": [
{
"voucherCode": null,
"discountPct": 0,
"discountAmt": null,
"autoApply": false,
"promoCode": null,
"name": null
}
],
"shippingMethods": [
{
"id": "00000000-0000-0000-0000-000000000000",
"enabled": false,
"systemName": null,
"shippingCode": null,
"displayName": null,
"description": null,
"displayOrder": 0,
"expectedDaysToDeliver": 0,
"expectedDeliveryDate": "0001-01-01T00:00:00",
"deliveryOnOrBefore": null,
"price": {
"currencySymbol": "£",
"formatted": {
"withTax": "£0.00",
"withoutTax": "£0.00",
"tax": "£0.00"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"isDefault": false,
"isNominated": false,
"type": 0,
"carrierCode": null,
"countryCode": null,
"isPriceOnRequest": false,
"showRecomendation": false,
"recomendation": null,
"isTaxable": false,
"shippingCostMethod": 0,
"cutOffTimes": null,
"countryCsv": null
}
],
"created": "0001-01-01T00:00:00",
"lastUpdated": "0001-01-01T00:00:00",
"isQuote": false,
"quoteStatus": 0,
"customInfo1": "cust info 1",
"customInfo2": "cust info 2",
"customInfo3": "cust info 3",
"customInfo4": "cust info 4",
"customInfo5": "cust info 5",
"shippingAddress": {
"id": 0,
"title": "Mr.",
"firstName": "FName",
"lastName": "LName",
"address1": "Address Line 1",
"address2": "Address Line 2",
"address3": "Address Line 3",
"city": "London",
"state": "London",
"country": "United Kingdom",
"countryCode": "UK",
"postCode": null,
"phoneNo": "9999999999",
"mobileNo": null,
"companyName": "My Company"
},
"billingAddress": {
"id": 0,
"title": "Mr.",
"firstName": "FName",
"lastName": "LName",
"address1": "Address Line 1",
"address2": "Address Line 2",
"address3": "Address Line 3",
"city": "London",
"state": "London",
"country": "United Kingdom",
"countryCode": "UK",
"postCode": null,
"phoneNo": "9999999999",
"mobileNo": null,
"companyName": "My Company"
},
"postCode": "XX55YY",
"maxDimensionMm": 0,
"companyDiscount": {
"currencySymbol": "€",
"formatted": {
"withTax": "€.00000",
"withoutTax": "€.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"validUntil": "0001-01-01T00:00:00",
"isLocked": false,
"createdByAdmin": false,
"poNumber": "PO00001",
"deliveryInstruction": "Please read the give instructions",
"deliveryPlans": [
{
"fulfilmentChannel": 0,
"deliveryType": 0,
"deliveryCenter": {
"recordId": "00000000-0000-0000-0000-000000000000",
"code": null,
"name": null,
"type": 0,
"postCode": null,
"latitude": null,
"longitude": null
},
"items": [],
"distanceInMiles": null,
"shippingMethodId": "00000000-0000-0000-0000-000000000000",
"shippingMethodName": null,
"cost": 0,
"shippingSpeed": " - ",
"deliveryDateTarget": "2022-03-15T07:25:35.0394846Z",
"deliveryDateActual": "0001-01-01T00:00:00",
"leadTime": 0,
"leadTimeUom": 0,
"leadTimeMin": 0,
"leadTimeMax": 0,
"pickupStoreId": "00000000-0000-0000-0000-000000000000",
"refStoreId": null,
"pickupStoreCode": null,
"shippingType": 0,
"lineItems": null,
"created": null,
"recordId": "00000000-0000-0000-0000-000000000000"
}
],
"hasSubscription": false,
"subscriptionTotal": {
"currencySymbol": "€",
"formatted": {
"withTax": "€.00000",
"withoutTax": "€.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"isGiftWrapApplied": false,
"giftWrapId": "00000000-0000-0000-0000-000000000000",
"giftWrapOption": null,
"membershipPlanId": "00000000-0000-0000-0000-000000000000",
"hasMembership": false,
"exchangeRate": 1,
"baseCurrency": "EUR",
"microSiteId": "00000000-0000-0000-0000-000000000000",
"baseCurrencyTotal": 99.99,
"membershipDiscount": {
"currencySymbol": "€",
"formatted": {
"withTax": "€.00000",
"withoutTax": "€.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
}
}
}
Update item specific subscription info
This endpoint allows you to get a basket based on Id.
Developers - API Operations:
Operation | Endpoint | Response |
---|---|---|
Update subscription | /api/v2/commerce/basket/:id/subscription/:productId | Update item specific subscription info. |
Required attributes
- Name
Id
- Type
- string
- Description
Id to identify the basket
- Name
productId
- Type
- string
- Description
Product Id to identify the product
- Name
userSetting
- Type
- model
- Description
New Subscription details of the user to be updated
Model attributes
- Name
subscriptionPlanId
- Type
- string
- Description
Subscription plan Id used to identify the subscription plan
- Name
subscriptionTermId
- Type
- string
- Description
Subscription Term Id used to identify the subscription term
- Name
userPricingType
- Type
- number
- Description
Subscription pricing type for the user
- Name
subscriptionJson
- Type
- string
- Description
JSON object with subscription data
- Name
authorizationAmount
- Type
- number
- Description
Amount to be authorized for the subscription
Response Properties
- Name
statusCode
- Type
- number
- Description
Status code of the response
- Name
status
- Type
- string
- Description
Status of the response
- Name
errors
- Type
- array
- Description
List of errors in the response
- Name
success
- Type
- boolean
- Description
Success status of the response
- Name
message
- Type
- string
- Description
Message of the response
- Name
messageCode
- Type
- string
- Description
Message code of the response
- Name
result
- Type
- object
- Description
Result of the response
- Name
id
- Type
- number
- Description
Id to identify the user
- Name
currencySymbol
- Type
- string
- Description
Currency Symbol for Price e.g £
- Name
currencyCode
- Type
- string
- Description
Currency code according to the region e.g. GBP:'Great Britain Pound'
- Name
userId
- Type
- string
- Description
User Id to identify the User
- Name
userEmail
- Type
- string
- Description
User email provided by the user
- Name
shippingMethodId
- Type
- string
- Description
Shipping method Id to identify the shipping method
- Name
subTotal
- Type
- object
- Description
Sub total of the total price
- Name
shippingCharge
- Type
- object
- Description
Shipping charges of the product in basket
- Name
formatted
- Type
- object
- Description
Formatted price with and without tax
- Name
withTax
- Type
- string
- Description
Price of basket item with Tax
- Name
withoutTax
- Type
- string
- Description
Price of basket item without Tax
- Name
tax
- Type
- string
- Description
Tax amount of basket item
- Name
raw
- Type
- object
- Description
Raw price without discount
- Name
discount
- Type
- object
- Description
Discount amount on the basket item
- Name
additionalCharge
- Type
- object
- Description
Additional charges applied on the basket item
- Name
grandTotal
- Type
- object
- Description
Grand total price of basket items
- Name
isLocked
- Type
- boolean
- Description
Flag to check if the basket is locked
- Name
createdByAdmin
- Type
- boolean
- Description
Flag to check if the basket is created by Admin
- Name
poNumber
- Type
- string
- Description
P O Number of the basket
- Name
isQuote
- Type
- boolean
- Description
Flag to check if the basket is a Quote
- Name
quoteStatus
- Type
- number
- Description
Quote status of the basket
- Name
postCode
- Type
- string
- Description
Post code of the user
- Name
hasMembership
- Type
- boolean
- Description
Flag to check if the user has a membership
- Name
exchangeRate
- Type
- number
- Description
Exchange rate of the currency
- Name
baseCurrency
- Type
- string
- Description
Base currency of the region
- Name
microSiteId
- Type
- string
- Description
Micro site Id of the site
- Name
baseCurrencyTotal
- Type
- number
- Description
Total amount of the basket in base currency
- Name
membershipDiscount
- Type
- string
- Description
Discount given to the user under their membership
- Name
created
- Type
- string
- Description
Date and time when the basket was created
- Name
lastUpdated
- Type
- string
- Description
Date and time when the basket was last updated
- Name
lineItems
- Type
- array
- Description
Array of all the products added in to basket
- Name
stockCode
- Type
- string
- Description
Stock code of the product
- Name
name
- Type
- string
- Description
Name of the product
- Name
slug
- Type
- string
- Description
Slug of the product used to navigate to the product
- Name
shortDescription
- Type
- string
- Description
A short description of the product
- Name
productId
- Type
- string
- Description
Product Id used to identify the product
- Name
productIid
- Type
- string
- Description
Product Iid used to identify the product
- Name
parentProductId
- Type
- string
- Description
Id of the parent product product, used to map personalized products with their parent product
- Name
price
- Type
- string
- Description
Price of the product
- Name
totalPrice
- Type
- object
- Description
Total price of the product
- Name
minPrice
- Type
- number
- Description
Minimum price for the company
- Name
minPriceWithoutTax
- Type
- number
- Description
Minimum price for the company without tax
- Name
maxPrice
- Type
- number
- Description
Maximum price for the company
- Name
maxPriceWithoutTax
- Type
- number
- Description
Maximum price for the company wihtout tax
- Name
currencyDecimalSeparator
- Type
- string
- Description
Currency decimal separator for the region
- Name
currencyDigitsAfterDecimal
- Type
- number
- Description
Digits after decimal for the currency
- Name
id
- Type
- string
- Description
id to identify the user
- Name
title
- Type
- string
- Description
Title of the user e.g. Miss./Mrs./Mr.
- Name
firstName
- Type
- string
- Description
First name of the user
- Name
lastName
- Type
- string
- Description
Last name of the user
- Name
address1
- Type
- string
- Description
Address Line 1 provided by the user
- Name
address2
- Type
- string
- Description
Address Line 2 provided by the user
- Name
address3
- Type
- string
- Description
Address Line 3 provided by the user
- Name
city
- Type
- string
- Description
City name provided by the user
- Name
state
- Type
- string
- Description
State name provided by the user
- Name
country
- Type
- string
- Description
Country name provided by the user
- Name
countryCode
- Type
- string
- Description
Country code provided by the user
- Name
postCode
- Type
- string
- Description
Post code provided by the user
- Name
phoneNo
- Type
- string
- Description
Phone number of the user
- Name
mobileNo
- Type
- string
- Description
Mobile number of the user
- Name
companyName
- Type
- string
- Description
Name of the company provided by the user
- Name
displayOrder
- Type
- number
- Description
Order of the display associated with the product
- Name
totalWithoutShipping
- Type
- object
- Description
Total price of the basket without shipping charges
- Name
taxPercent
- Type
- number
- Description
Amount of tax applied in percentage
- Name
brand
- Type
- string
- Description
Brand name of the product
- Name
subbrand
- Type
- string
- Description
Sub brand name of the product
- Name
image
- Type
- string
- Description
File name of the image of the product
- Name
qty
- Type
- number
- Description
Quantity of product in the basket
- Name
displayOrder
- Type
- number
- Description
Display order of the product in the basket
- Name
itemType
- Type
- number
- Description
Type of item in the basket
- Name
displayInBasket
- Type
- boolean
- Description
Flag to check if the product should be displayed in the basket
- Name
categoryItems
- Type
- array
- Description
List of all the categories available
- Name
categoryId
- Type
- string
- Description
Category Id to identify the cateogories
- Name
categoryName
- Type
- string
- Description
Name of the category e.g. 'Shirts','Joggers', etc
- Name
parentCategoryId
- Type
- string
- Description
Parent category Id to identify the parent category
- Name
parentCategoryName
- Type
- string
- Description
Name of the Parent category e.g. 'Clothings'
- Name
attributesJson
- Type
- string
- Description
JSON attributes of the product
- Name
customInfo1
- Type
- string
- Description
Custom Information of the product in the basket
- Name
customInfo2
- Type
- string
- Description
Custom Information of the product in the basket
- Name
customInfo3
- Type
- string
- Description
Custom Information of the product in the basket
- Name
customInfo4
- Type
- string
- Description
Custom Information of the product in the basket
- Name
customInfo5
- Type
- string
- Description
Custom Information of the product in the basket
- Name
isSubscription
- Type
- boolean
- Description
Flag to check if the user has an active subscription
- Name
isMembership
- Type
- boolean
- Description
Flag to check if the user has an active membership
- Name
subscriptionUserSettings
- Type
- object
- Description
Settings for the users's subscription
- Name
subscriptionPlanId
- Type
- string
- Description
Plan Id of the subscription
- Name
subscriptionTermId
- Type
- string
- Description
Term Id of the subscription
- Name
userPricingType
- Type
- number
- Description
Type of pricing for the user
- Name
subscriptionJson
- Type
- string
- Description
JSON values for the subscription
- Name
authorizationAmount
- Type
- number
- Description
Amount to be authorized for this subscription
- Name
shippingMethods
- Type
- array
- Description
A List of shipping methods available for the products
- Name
id
- Type
- string
- Description
Id to identify the shipping method
- Name
enabled
- Type
- boolean
- Description
Flag to check if the shipping method is enabled
- Name
systemName
- Type
- string
- Description
System name of the shipping methods
- Name
shippingCode
- Type
- string
- Description
Shipping code used by the shipping method
- Name
displayName
- Type
- string
- Description
Display name of the shipping method
- Name
description
- Type
- string
- Description
Description of the shipping method
- Name
displayOrder
- Type
- number
- Description
Display order of this shipping method in the list of shipping methods
- Name
expectedDaysToDeliver
- Type
- number
- Description
Number of days before the expected delivery date
- Name
expectedDeliveryDate
- Type
- string
- Description
Date and time of expected delivery of the product
- Name
deliveryOnOrBefore
- Type
- string
- Description
The date on or before which date the product should be delivered
- Name
isDefault
- Type
- boolean
- Description
Flag to check if this shipping method is the default shipping method
- Name
isNominated
- Type
- boolean
- Description
Flag to check if this shipping method is the nominated shipping method
- Name
type
- Type
- number
- Description
Type of this shipping mehtod
- Name
carrierCode
- Type
- string
- Description
Carrier code of the delivery carrier
- Name
countryCode
- Type
- string
- Description
Country code of the region of delivery
- Name
isPriceOnRequest
- Type
- boolean
- Description
Flag to check if product is produced only for editorials and is never actually put into production for consumer purchase
- Name
showRecomendation
- Type
- boolean
- Description
Flag to check if the recommendations for this product should be shown
- Name
recomendation
- Type
- string
- Description
The recommendations for this product
- Name
isTaxable
- Type
- boolean
- Description
Flag to check if this shipping method is taxable
- Name
shippingCostMethod
- Type
- number
- Description
Used to select the type of shipping cost to be applied
- Name
cutOffTimes
- Type
- string
- Description
It is the latest time in any Business Day that we can process a particular Transaction, request or instruction on that Business Day.
- Name
countryCsv
- Type
- string
- Description
File name for the csv file having data of the countries
- Name
maxDimensionMm
- Type
- number
- Description
Maximum dimensions of the package to be delivered in Millimeters
- Name
companyDiscount
- Type
- object
- Description
The discount given on the original price of the products by the company to their employees
- Name
validUntil
- Type
- string
- Description
The date time of the validity of the order for delivery
- Name
deliveryInstruction
- Type
- string
- Description
Instructions for the delivery agent regarding the delivery
- Name
deliveryPlans
- Type
- array
- Description
A list of delivery plans for the delivery of the order
- Name
fulfilmentChannel
- Type
- number
- Description
The method by which sellers can sell items through various sales channels and have the company handle the packaging and shipping aspects for them
- Name
deliveryType
- Type
- number
- Description
The type of delivery for the order
- Name
deliveryCenter
- Type
- object
- Description
The details of the delivery center which will handle the delivery for this order
- Name
recordId
- Type
- string
- Description
Record Id to identify the delivery center records
- Name
code
- Type
- string
- Description
A code used by the delivery center
- Name
name
- Type
- string
- Description
Name of the delivery center
- Name
type
- Type
- number
- Description
Type of the delivery center
- Name
postCode
- Type
- string
- Description
Postal code of the delivery center
- Name
latitude
- Type
- string
- Description
Latitute of the geographical location of the delivery center
- Name
longitude
- Type
- string
- Description
Longitute of the geographical location of the delivery center
- Name
items
- Type
- array
- Description
The list of items to be delivered
- Name
distanceInMiles
- Type
- string
- Description
The distance to the the delivery location in miles
- Name
shippingMethodName
- Type
- string
- Description
The name of the shipping method used for shipping the product
- Name
cost
- Type
- number
- Description
The cost of shipping the product
- Name
shippingSpeed
- Type
- string
- Description
The rate at which the order will be shipped for deliery
- Name
deliveryDateTarget
- Type
- string
- Description
The date and time target for the delivery of the order
- Name
deliveryDateActual
- Type
- string
- Description
The date and time of the actual delivery of the order
- Name
leadTime
- Type
- number
- Description
The amount of time that passes from the start of a process until its conclusion
- Name
leadTimeUom
- Type
- number
- Description
The unit of measurement for the lead time
- Name
leadTimeMin
- Type
- number
- Description
The minimum lead time for the order to be delivered
- Name
leadTimeMax
- Type
- number
- Description
The maximum lead time for the order to be delivered
- Name
pickupStoreId
- Type
- string
- Description
The id of stores from which the order can be collected
- Name
refStoreId
- Type
- string
- Description
Reference Id of the store
- Name
pickupStoreCode
- Type
- string
- Description
The store code for a pickup store
- Name
shippingType
- Type
- number
- Description
The type of shipping used for delivery of the order
- Name
hasSubscription
- Type
- boolean
- Description
Flag to check if the user has a subscription
- Name
subscriptionTotal
- Type
- object
- Description
The total amount that must be paid by the user for the subscription
- Name
isGiftWrapApplied
- Type
- boolean
- Description
Flag to check if Gift wrap is applied to the products
- Name
giftWrapId
- Type
- string
- Description
Gift wrap Id to identify the gift warpped products in the basket
- Name
giftWrapOption
- Type
- string
- Description
The gift wrapping options available for the products in the basket
- Name
membershipPlanId
- Type
- string
- Description
Membership plan Id to identify the membership plan of the user
- Name
promotionsApplied
- Type
- array
- Description
List of promotions applied on the products in the basket
- Name
voucherCode
- Type
- string
- Description
Voucher code used to validate the offer and claim the benefits e.g. 'DISCOUNT15'
- Name
discountPct
- Type
- number
- Description
Discount value applied on the product in Percentage
- Name
discountAmt
- Type
- object
- Description
The amount of discount to be applied on the products in the basket
- Name
autoApply
- Type
- boolean
- Description
Flag to check if the promotion has to be auto applied on the products
- Name
promoCode
- Type
- string
- Description
Promotion code used to validate the offer e.g. 'DISCOUNT15'
- Name
name
- Type
- string
- Description
Name of the promotion to be applied
- Name
itemGroupId
- Type
- number
- Description
Id used to identify the group of items
- Name
couponProvider
- Type
- string
- Description
The entity that provides the coupon to create an offer
- Name
isManualPrice
- Type
- boolean
- Description
Flag to check if the Price is set Manually
- Name
priceMatchReqId
- Type
- string
- Description
Id used to match the price requests
- Name
deliveryMessage
- Type
- string
- Description
Message for the delivery agent provided by the user
- Name
variantProducts
- Type
- array
- Description
A list of all available variants of the current product
- Name
productName
- Type
- string
- Description
Product name of the variant product
- Name
variantAttributes
- Type
- array
- Description
List of variant attributes of the product e.g. Size, Color
- Name
variantProductsAttribute
- Type
- array
- Description
A list of variant attributes of the product
- Name
fieldName
- Type
- string
- Description
Name of the variant attribute
- Name
fieldCode
- Type
- string
- Description
Field code of the atrribute
- Name
fieldValues
- Type
- array
- Description
A list of values for the variant attribute
- Name
currentStock
- Type
- number
- Description
Number of products available in stock
Request
curl --location --request PUT 'https://api20.bettercommerce.io/api/v2/commerce/basket/:id/subscription/:productId' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Accept: application/json' \
--header 'UserId;' \
--header 'Email: abc@abc.com' \
--data-urlencode 'subscriptionPlanId=1a2e9e33-a675-4e23-8dc9-e6c24491b04d' \
--data-urlencode 'subscriptionTermId=83209399-0fa2-45ed-bb55-152d4b978897' \
--data-urlencode 'userPricingType=1' \
--data-urlencode 'subscriptionJson={}' \
--data-urlencode 'authorizationAmount=0'
Response
{
"statusCode": 200,
"status": "OK",
"errors": [],
"success": true,
"message": "",
"messageCode": "",
"result": {
"id": "b7dbd32b-56ba-47e6-be6b-83fb82943564",
"currencySymbol": "€",
"currencyCode": "EUR",
"userId": "8b55c612-0b64-406f-95c7-1afe4da96af6",
"userEmail": "myemail@example.com",
"grandTotal": {
"currencySymbol": "€",
"formatted": {
"withTax": "€99.99000",
"withoutTax": "€99.99000",
"tax": "€.00000"
},
"raw": {
"withTax": 99.99,
"withoutTax": 99.99,
"tax": 0
}
},
"totalWithoutShipping": {
"currencySymbol": "€",
"formatted": {
"withTax": "€96.00000",
"withoutTax": "€96.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 96,
"withoutTax": 96,
"tax": 0
}
},
"shippingMethodId": "STD",
"shippingCharge": {
"currencySymbol": "€",
"formatted": {
"withTax": "€3.99000",
"withoutTax": "€3.99000",
"tax": "€.00000"
},
"raw": {
"withTax": 3.99,
"withoutTax": 3.99,
"tax": 0
}
},
"subTotal": {
"currencySymbol": "€",
"formatted": {
"withTax": "€99.99000",
"withoutTax": "€99.99000",
"tax": "€.00000"
},
"raw": {
"withTax": 99.99,
"withoutTax": 99.99,
"tax": 0
}
},
"discount": {
"currencySymbol": "€",
"formatted": {
"withTax": "€.00000",
"withoutTax": "€.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"taxPercent": 0,
"additionalCharge": {
"currencySymbol": "€",
"formatted": {
"withTax": "€.00000",
"withoutTax": "€.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"lineItems": [
{
"id": "0",
"stockCode": "SKU-0001",
"name": "Polo Shirt",
"productId": "1C5D16AB-0497-462D-A0D2-B2F8F67335A1",
"productIid": "0",
"parentProductId": "",
"brand": "Tommy Hilfiger",
"subbrand": "Tommy Hilfiger",
"price": {
"currencySymbol": "€",
"formatted": {
"withTax": "€24.00000",
"withoutTax": "€24.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 24,
"withoutTax": 24,
"tax": 0
}
},
"subTotal": {
"currencySymbol": "€",
"formatted": {
"withTax": "€96.00000",
"withoutTax": "€96.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 96,
"withoutTax": 96,
"tax": 0
}
},
"totalPrice": {
"currencySymbol": "€",
"formatted": {
"withTax": "€96.00000",
"withoutTax": "€96.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 96,
"withoutTax": 96,
"tax": 0
}
},
"image": "image1.jeg",
"qty": 4,
"displayOrder": 1,
"slug": "/product/SKU-0001",
"itemType": 1,
"displayInBasket": false,
"categoryItems": [
{
"categoryId": "cb50c16b-bb62-495f-bd9a-cb77d3063dc5",
"categoryName": "Shirt",
"parentCategoryId": "1d279825-4c93-4fec-a665-30a7c36a353a",
"parentCategoryName": "Clothings"
}
],
"attributesJson": "",
"customInfo1": "cust info 1",
"customInfo2": "cust info 2",
"customInfo3": "cust info 3",
"customInfo4": "cust info 4",
"customInfo5": "cust info 5",
"discount": {
"currencySymbol": "€",
"formatted": {
"withTax": "€.00000",
"withoutTax": "€.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"additionalCharge": {
"currencySymbol": "€",
"formatted": {
"withTax": "€.00000",
"withoutTax": "€.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"shortDescription": "Polo Shirt Description",
"companyDiscount": {
"currencySymbol": "€",
"formatted": {
"withTax": "€.00000",
"withoutTax": "€.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"listPrice": {
"currencySymbol": "€",
"formatted": {
"withTax": "€24.00000",
"withoutTax": "€24.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 24,
"withoutTax": 24,
"tax": 0
}
},
"isSubscription": false,
"isMembership": false,
"subscriptionUserSettings": {
"subscriptionPlanId": "00000000-0000-0000-0000-000000000000",
"subscriptionTermId": "00000000-0000-0000-0000-000000000000",
"userPricingType": 0,
"subscriptionJson": null,
"authorizationAmount": 0
},
"promotionsApplied": [
{
"voucherCode": "DISCOUNT15",
"discountPct": 0,
"discountAmt": {
"minPrice": 0,
"minPriceWithoutTax": 0,
"maxPrice": 0,
"maxPriceWithoutTax": 0,
"currencyDecimalSeparator": ".",
"currencyDigitsAfterDecimal": 2,
"currencySymbol": "€",
"formatted": {
"withTax": "€.00000",
"withoutTax": "€.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"autoApply": false,
"promoCode": "DISCOUNT15",
"name": "Dummy Promo"
}
],
"isGiftWrapApplied": false,
"giftWrapId": "00000000-0000-0000-0000-000000000000",
"itemGroupId": 0,
"couponProvider": "",
"isManualPrice": false,
"priceMatchReqId": "00000000-0000-0000-0000-000000000000",
"deliveryMessage": " delivery message",
"variantProducts": [
{
"stockCode": null,
"productId": "00000000-0000-0000-0000-000000000000",
"price": {
"minPrice": 0,
"minPriceWithoutTax": 0,
"maxPrice": 0,
"maxPriceWithoutTax": 0,
"currencyDecimalSeparator": ".",
"currencyDigitsAfterDecimal": 2,
"currencySymbol": "€",
"formatted": {
"withTax": "€15.99000",
"withoutTax": "€15.99000",
"tax": "€.00000"
},
"raw": {
"withTax": 15.99,
"withoutTax": 15.99,
"tax": 0
}
},
"slug": null,
"image": "img.jpg",
"productName": "Variant SKU",
"variantAttributes": []
}
],
"variantProductsAttribute": [
{
"fieldName": "color",
"fieldCode": "global.color",
"fieldValues": []
}
],
"currentStock": 999
}
],
"promotionsApplied": [
{
"voucherCode": null,
"discountPct": 0,
"discountAmt": null,
"autoApply": false,
"promoCode": null,
"name": null
}
],
"shippingMethods": [
{
"id": "00000000-0000-0000-0000-000000000000",
"enabled": false,
"systemName": null,
"shippingCode": null,
"displayName": null,
"description": null,
"displayOrder": 0,
"expectedDaysToDeliver": 0,
"expectedDeliveryDate": "0001-01-01T00:00:00",
"deliveryOnOrBefore": null,
"price": {
"currencySymbol": "£",
"formatted": {
"withTax": "£0.00",
"withoutTax": "£0.00",
"tax": "£0.00"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"isDefault": false,
"isNominated": false,
"type": 0,
"carrierCode": null,
"countryCode": null,
"isPriceOnRequest": false,
"showRecomendation": false,
"recomendation": null,
"isTaxable": false,
"shippingCostMethod": 0,
"cutOffTimes": null,
"countryCsv": null
}
],
"created": "0001-01-01T00:00:00",
"lastUpdated": "0001-01-01T00:00:00",
"isQuote": false,
"quoteStatus": 0,
"customInfo1": "cust info 1",
"customInfo2": "cust info 2",
"customInfo3": "cust info 3",
"customInfo4": "cust info 4",
"customInfo5": "cust info 5",
"shippingAddress": {
"id": 0,
"title": "Mr.",
"firstName": "FName",
"lastName": "LName",
"address1": "Address Line 1",
"address2": "Address Line 2",
"address3": "Address Line 3",
"city": "London",
"state": "London",
"country": "United Kingdom",
"countryCode": "UK",
"postCode": null,
"phoneNo": "9999999999",
"mobileNo": null,
"companyName": "My Company"
},
"billingAddress": {
"id": 0,
"title": "Mr.",
"firstName": "FName",
"lastName": "LName",
"address1": "Address Line 1",
"address2": "Address Line 2",
"address3": "Address Line 3",
"city": "London",
"state": "London",
"country": "United Kingdom",
"countryCode": "UK",
"postCode": null,
"phoneNo": "9999999999",
"mobileNo": null,
"companyName": "My Company"
},
"postCode": "XX55YY",
"maxDimensionMm": 0,
"companyDiscount": {
"currencySymbol": "€",
"formatted": {
"withTax": "€.00000",
"withoutTax": "€.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"validUntil": "0001-01-01T00:00:00",
"isLocked": false,
"createdByAdmin": false,
"poNumber": "PO00001",
"deliveryInstruction": "Please read the give instructions",
"deliveryPlans": [
{
"fulfilmentChannel": 0,
"deliveryType": 0,
"deliveryCenter": {
"recordId": "00000000-0000-0000-0000-000000000000",
"code": null,
"name": null,
"type": 0,
"postCode": null,
"latitude": null,
"longitude": null
},
"items": [],
"distanceInMiles": null,
"shippingMethodId": "00000000-0000-0000-0000-000000000000",
"shippingMethodName": null,
"cost": 0,
"shippingSpeed": " - ",
"deliveryDateTarget": "2022-03-15T07:25:35.0394846Z",
"deliveryDateActual": "0001-01-01T00:00:00",
"leadTime": 0,
"leadTimeUom": 0,
"leadTimeMin": 0,
"leadTimeMax": 0,
"pickupStoreId": "00000000-0000-0000-0000-000000000000",
"refStoreId": null,
"pickupStoreCode": null,
"shippingType": 0,
"lineItems": null,
"created": null,
"recordId": "00000000-0000-0000-0000-000000000000"
}
],
"hasSubscription": false,
"subscriptionTotal": {
"currencySymbol": "€",
"formatted": {
"withTax": "€.00000",
"withoutTax": "€.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
},
"isGiftWrapApplied": false,
"giftWrapId": "00000000-0000-0000-0000-000000000000",
"giftWrapOption": null,
"membershipPlanId": "00000000-0000-0000-0000-000000000000",
"hasMembership": false,
"exchangeRate": 1,
"baseCurrency": "EUR",
"microSiteId": "00000000-0000-0000-0000-000000000000",
"baseCurrencyTotal": 99.99,
"membershipDiscount": {
"currencySymbol": "€",
"formatted": {
"withTax": "€.00000",
"withoutTax": "€.00000",
"tax": "€.00000"
},
"raw": {
"withTax": 0,
"withoutTax": 0,
"tax": 0
}
}
}
}
Delete basket
This endpoint allows you to delete a basket using its Id.
Developers - API Operations:
Operation | Endpoint | Response |
---|---|---|
Delete basket | /api/v2/commerce/basket/:id/delete | Delete basket. |
Required attributes
- Name
basketId
- Type
- string
- Description
Basket Id to identify the basket
- Name
Id
- Type
- string
- Description
Id to identify the user
Response Properties
- Name
statusCode
- Type
- number
- Description
Status code of the response
- Name
status
- Type
- string
- Description
Status of the response
- Name
errors
- Type
- array
- Description
List of errors in the response
- Name
success
- Type
- boolean
- Description
Success status of the response
- Name
message
- Type
- string
- Description
Message of the response
- Name
messageCode
- Type
- string
- Description
Message code of the response
- Name
result
- Type
- boolean
- Description
Result of the response
Request
curl --location --request DELETE 'https://api20.bettercommerce.io/api/v2/commerce/basket/:id/delete' \
--header 'Accept: application/json' \
--header 'UserId;' \
--header 'Email: abc@abc.com'
Response
{
"statusCode": null,
"status": "minim nisi voluptate proident",
"errors": [
"eu occaecat",
"qui sunt Ut"
],
"success": true,
"message": "reprehenderit Lorem",
"messageCode": "dolor qui irure culpa",
"result": true
}
Get related products based on items in basket.
This endpoint allows you to get a get related products based on items in the basket.
Developers - API Operations:
Operation | Endpoint | Response |
---|---|---|
Get Related products | /api/v2/commerce/basket/:id/related-products | Get related products based on items in basket. |
Required attributes
- Name
Id
- Type
- string
- Description
Id to identify the product
Response Properties
- Name
statusCode
- Type
- number
- Description
Status code of the response
- Name
status
- Type
- string
- Description
Status of the response
- Name
errors
- Type
- array
- Description
List of errors in the response
- Name
success
- Type
- boolean
- Description
Success status of the response
- Name
message
- Type
- string
- Description
Message of the response
- Name
messageCode
- Type
- string
- Description
Message code of the response
- Name
result
- Type
- array
- Description
Result of the response
- Name
id
- Type
- number
- Description
Id to identify the user
- Name
seoName
- Type
- string
- Description
SEO Name
- Name
barcode
- Type
- string
- Description
Unique value for each product
- Name
isFeatured
- Type
- boolean
- Description
Flag to check is category featured or not
- Name
variant
- Type
- string
- Description
Name of the variant
- Name
metaTitle
- Type
- string
- Description
MetaTitle associated with the product
- Name
metaDescription
- Type
- string
- Description
MetaDescription associated with the product
- Name
canonicalTags
- Type
- string
- Description
Cannonical Tags associated with the product
- Name
metaKeywords
- Type
- string
- Description
MetaKeywords associated with the product
- Name
variantProducts
- Type
- array
- Description
Array of objects containing variant products for each variant
- Name
isDiscontinued
- Type
- boolean
- Description
Flag to check is discontinued or not
- Name
attributeSet
- Type
- string
- Description
Set of attributes of the product variant
- Name
relatedProducts
- Type
- array
- Description
Array of objects containing related products
- Name
displayOrder
- Type
- number
- Description
Order of the display associated with the product
- Name
link
- Type
- string
- Description
Link of the product
- Name
subscriptionEnabled
- Type
- boolean
- Description
Flag to check is subscription enabled or not
- Name
minPrice
- Type
- number
- Description
Minimum price of the product
- Name
maxPrice
- Type
- number
- Description
Maximum price of the product
- Name
displayTemplate
- Type
- string
- Description
Template for display of attribute
- Name
brandLogo
- Type
- string
- Description
Logo of the brand
- Name
recordId
- Type
- string
- Description
Id of the Brand Record
- Name
stockCode
- Type
- string
- Description
Unique id of the stock
- Name
images
- Type
- array
- Description
Array of Images.
- Name
image
- Type
- string
- Description
URL of the product image
- Name
itemType
- Type
- string
- Description
Type of the item
- Name
shortDescription
- Type
- string
- Description
Short description of the product
- Name
subscriptionPlanType
- Type
- string
- Description
Type of the subscription plan
- Name
brand
- Type
- string
- Description
Name of the brand
- Name
brandSlug
- Type
- string
- Description
Slug of the brand
- Name
subBrand
- Type
- string
- Description
SubBrand of parent Brand
- Name
description
- Type
- string
- Description
Description of the product
- Name
fulfillFromStore
- Type
- boolean
- Description
Flag to check if product will be fulfilled from Store
- Name
fulfillFromSupplier
- Type
- boolean
- Description
Flag to check if product will be fulfilled from Supplier
- Name
fulfilFromWarehouse
- Type
- boolean
- Description
Flag to check if the product will be fulfilled from the warehouse
- Name
deliveryMessage
- Type
- string
- Description
Message for the delivery
- Name
stockAvailabilityMessage
- Type
- string
- Description
Message to check stock availability
- Name
trending
- Type
- boolean
- Description
Is Product trending or not
- Name
bestSeller
- Type
- boolean
- Description
Is Product bestSeller or not
- Name
onSale
- Type
- boolean
- Description
Is Product onSale or not
- Name
newLaunch
- Type
- boolean
- Description
Is Product newly launched or not
- Name
exclusive
- Type
- boolean
- Description
Is Product exclusiv or not
- Name
extendedDescription
- Type
- string
- Description
Extended description of the product
- Name
variantProductsMinimal
- Type
- array
- Description
Minimal variant products array
- Name
isMasterStock
- Type
- boolean
- Description
Flag to check Is master stock or not
- Name
hasVariant
- Type
- boolean
- Description
Flag to check Is variant available or not
- Name
promotions
- Type
- array
- Description
Array containing attributes for promotions
- Name
preOrder
- Type
- array
- Description
Array containing attributes for order
- Name
isActive
- Type
- boolean
- Description
Flag to check the Active status
- Name
isVisible
- Type
- boolean
- Description
Flag to check is visible enabled or not
- Name
uom
- Type
- string
- Description
A unit of measure (UoM)
- Name
uomValue
- Type
- number
- Description
Uom value is the standard units of measurements used when accounting for stock, and expressing them in quantities.
- Name
flags
- Type
- string
- Description
The flags used in the basket
- Name
freeProducts
- Type
- string
- Description
The names of free products in the basket
- Name
componentProducts
- Type
- string
- Description
The names of component products in the basket
- Name
componentsInStock
- Type
- boolean
- Description
Flag to check if the components in the basket are available in stock
- Name
variantProductsAttribute
- Type
- string
- Description
Variant product attributes of the products in the basket
- Name
attributes
- Type
- string
- Description
Attributes of the products in the basket
- Name
name
- Type
- string
- Description
Name of the product in the basket
- Name
slug
- Type
- string
- Description
Slug of the product in the basket
- Name
listPrice
- Type
- string
- Description
Price of the products in the list
- Name
price
- Type
- string
- Description
Price of the product in the basket
- Name
groupName
- Type
- string
- Description
Group name of the product in the basket
- Name
sku
- Type
- string
- Description
Stock keeping unit of the product in the basket
- Name
priceFrom
- Type
- string
- Description
The price of the product
- Name
classification
- Type
- string
- Description
Classification of the product in the basket
- Name
currentStock
- Type
- number
- Description
Current stock of the product in the inverntory
Request
curl --location 'https://api20.bettercommerce.io/api/v2/commerce/basket/:id/related-products' \
--header 'Accept: application/json' \
--header 'UserId;' \
--header 'Email: abc@abc.com'
Response
{
"statusCode": 200,
"status": "OK",
"errors": [],
"success": true,
"message": "",
"messageCode": "",
"result": [
{
"id": null,
"seoName": null,
"barcode": null,
"isFeatured": false,
"uom": null,
"uomValue": 0,
"variant": null,
"attributeSet": null,
"relatedProducts": null,
"displayOrder": 0,
"metaTitle": null,
"metaDescription": null,
"metaKeywords": null,
"canonicalTags": null,
"flags": null,
"isDiscontinued": false,
"freeProducts": null,
"link": null,
"componentProducts": null,
"componentsInStock": false,
"variantProducts": null,
"variantProductsAttribute": null,
"subscriptionEnabled": false,
"minPrice": null,
"maxPrice": null,
"displayTemplate": null,
"brandLogo": null,
"attributes": null,
"recordId": null,
"name": null,
"slug": null,
"stockCode": null,
"listPrice": null,
"price": null,
"images": null,
"image": null,
"itemType": 0,
"shortDescription": null,
"subscriptionPlanType": 0,
"groupName": null,
"brand": null,
"brandSlug": null,
"subBrand": null,
"sku": null,
"priceFrom": null,
"classification": null,
"currentStock": 0,
"description": null,
"fulfilFromWarehouse": false,
"fulfilFromStore": false,
"fulfilFromSupplier": false,
"deliveryMessage": null,
"stockAvailabilityMessage": null,
"trending": false,
"bestSeller": false,
"onSale": false,
"newLaunch": false,
"exclusive": false,
"extendedDescription": null,
"variantProductsMinimal": null,
"variantProductsAttributeMinimal": null,
"isVisible": false,
"isActive": false,
"isMasterStock": false,
"hasVariant": false,
"promotions": null,
"preOrder": null
}
]
}
Merge 2 different baskets into one basket
This endpoint allows you to merge two different baskets into one basket.
Developers - API Operations:
Operation | Endpoint | Response |
---|---|---|
Merge baskets | /api/v2/commerce/basket/:id/merge?sourceBasketId={{bc_source_basket_id}} | Merge 2 different baskets into one basket. |
Required attributes
- Name
Id
- Type
- string
- Description
Target basket Id to merge the basket into
- Name
sourceBasketId
- Type
- string
- Description
Source basket Id to merge the basket from
Response Properties
- Name
statusCode
- Type
- number
- Description
Status code of the response
- Name
status
- Type
- string
- Description
Status of the response
- Name
errors
- Type
- array
- Description
List of errors in the response
- Name
success
- Type
- boolean
- Description
Success status of the response
- Name
message
- Type
- string
- Description
Message of the response
- Name
messageCode
- Type
- string
- Description
Message code of the response
- Name
result
- Type
- object
- Description
Result of the response
- Name
id
- Type
- number
- Description
Id to identify the user
- Name
currencySymbol
- Type
- string
- Description
Currency Symbol for Price e.g £
- Name
currencyCode
- Type
- string
- Description
Currency code according to the region e.g. GBP:'Great Britain Pound'
- Name
userId
- Type
- string
- Description
User Id to identify the User
- Name
userEmail
- Type
- string
- Description
User email provided by the user
- Name
shippingMethodId
- Type
- string
- Description
Shipping method Id to identify the shipping method
- Name
subTotal
- Type
- object
- Description
Sub total of the total price
- Name
shippingCharge
- Type
- object
- Description
Shipping charges of the product in basket
- Name
formatted
- Type
- object
- Description
Formatted price with and without tax
- Name
withTax
- Type
- string
- Description
Price of basket item with Tax
- Name
withoutTax
- Type
- string
- Description
Price of basket item without Tax
- Name
tax
- Type
- string
- Description
Tax amount of basket item
- Name
raw
- Type
- object
- Description
Raw price without discount
- Name
discount
- Type
- object
- Description
Discount amount on the basket item
- Name
additionalCharge
- Type
- object
- Description
Additional charges applied on the basket item
- Name
grandTotal
- Type
- object
- Description
Grand total price of basket items
- Name
isLocked
- Type
- boolean
- Description
Flag to check if the basket is locked
- Name
createdByAdmin
- Type
- boolean
- Description
Flag to check if the basket is created by Admin
- Name
poNumber
- Type
- string
- Description
P O Number of the basket
- Name
isQuote
- Type
- boolean
- Description
Flag to check if the basket is a Quote
- Name
quoteStatus
- Type
- number
- Description
Quote status of the basket
- Name
postCode
- Type
- string
- Description
Post code of the user
- Name
hasMembership
- Type
- boolean
- Description
Flag to check if the user has a membership
- Name
exchangeRate
- Type
- number
- Description
Exchange rate of the currency
- Name
baseCurrency
- Type
- string
- Description
Base currency of the region
- Name
microSiteId
- Type
- string
- Description
Micro site Id of the site
- Name
baseCurrencyTotal
- Type
- number
- Description
Total amount of the basket in base currency
- Name
membershipDiscount
- Type
- string
- Description
Discount given to the user under their membership
- Name
created
- Type
- string
- Description
Date and time when the basket was created
- Name
lastUpdated
- Type
- string
- Description
Date and time when the basket was last updated
- Name
lineItems
- Type
- array
- Description
Array of all the products added in to basket
- Name
stockCode
- Type
- string
- Description
Stock code of the product
- Name
name
- Type
- string
- Description
Name of the product
- Name
slug
- Type
- string
- Description
Slug of the product used to navigate to the product
- Name
shortDescription
- Type
- string
- Description
A short description of the product
- Name
productId
- Type
- string
- Description
Product Id used to identify the product
- Name
productIid
- Type
- string
- Description
Product Iid used to identify the product
- Name
parentProductId
- Type
- string
- Description
Id of the parent product product, used to map personalized products with their parent product
- Name
price
- Type
- string
- Description
Price of the product
- Name
totalPrice
- Type
- object
- Description
Total price of the product
- Name
minPrice
- Type
- number
- Description
Minimum price for the company
- Name
minPriceWithoutTax
- Type
- number
- Description
Minimum price for the company without tax
- Name
maxPrice
- Type
- number
- Description
Maximum price for the company
- Name
maxPriceWithoutTax
- Type
- number
- Description
Maximum price for the company wihtout tax
- Name
currencyDecimalSeparator
- Type
- string
- Description
Currency decimal separator for the region
- Name
currencyDigitsAfterDecimal
- Type
- number
- Description
Digits after decimal for the currency
- Name
id
- Type
- string
- Description
id to identify the user
- Name
title
- Type
- string
- Description
Title of the user e.g. Miss./Mrs./Mr.
- Name
firstName
- Type
- string
- Description
First name of the user
- Name
lastName
- Type
- string
- Description
Last name of the user
- Name
address1
- Type
- string
- Description
Address Line 1 provided by the user
- Name
address2
- Type
- string
- Description
Address Line 2 provided by the user
- Name
address3
- Type
- string
- Description
Address Line 3 provided by the user
- Name
city
- Type
- string
- Description
City name provided by the user
- Name
state
- Type
- string
- Description
State name provided by the user
- Name
country
- Type
- string
- Description
Country name provided by the user
- Name
countryCode
- Type
- string
- Description
Country code provided by the user
- Name
postCode
- Type
- string
- Description
Post code provided by the user
- Name
phoneNo
- Type
- string
- Description
Phone number of the user
- Name
mobileNo
- Type
- string
- Description
Mobile number of the user
- Name
companyName
- Type
- string
- Description
Name of the company provided by the user
- Name
displayOrder
- Type
- number
- Description
Order of the display associated with the product
- Name
totalWithoutShipping
- Type
- object
- Description
Total price of the basket without shipping charges
- Name
taxPercent
- Type
- number
- Description
Amount of tax applied in percentage
- Name
brand
- Type
- string
- Description
Brand name of the product
- Name
subbrand
- Type
- string
- Description
Sub brand name of the product
- Name
image
- Type
- string
- Description
File name of the image of the product
- Name
qty
- Type
- number
- Description
Quantity of product in the basket
- Name
displayOrder
- Type
- number
- Description
Display order of the product in the basket
- Name
itemType
- Type
- number
- Description
Type of item in the basket
- Name
displayInBasket
- Type
- boolean
- Description
Flag to check if the product should be displayed in the basket
- Name
categoryItems
- Type
- array
- Description
List of all the categories available
- Name
categoryId
- Type
- string
- Description
Category Id to identify the cateogories
- Name
categoryName
- Type
- string
- Description
Name of the category e.g. 'Shirts','Joggers', etc
- Name
parentCategoryId
- Type
- string
- Description
Parent category Id to identify the parent category
- Name
parentCategoryName
- Type
- string
- Description
Name of the Parent category e.g. 'Clothings'
- Name
attributesJson
- Type
- string
- Description
JSON attributes of the product
- Name
customInfo1
- Type
- string
- Description
Custom Information of the product in the basket
- Name
customInfo2
- Type
- string
- Description
Custom Information of the product in the basket
- Name
customInfo3
- Type
- string
- Description
Custom Information of the product in the basket
- Name
customInfo4
- Type
- string
- Description
Custom Information of the product in the basket
- Name
customInfo5
- Type
- string
- Description
Custom Information of the product in the basket
- Name
isSubscription
- Type
- boolean
- Description
Flag to check if the user has an active subscription
- Name
isMembership
- Type
- boolean
- Description
Flag to check if the user has an active membership
- Name
subscriptionUserSettings
- Type
- object
- Description
Settings for the users's subscription
- Name
subscriptionPlanId
- Type
- string
- Description
Plan Id of the subscription
- Name
subscriptionTermId
- Type
- string
- Description
Term Id of the subscription
- Name
userPricingType
- Type
- number
- Description
Type of pricing for the user
- Name
subscriptionJson
- Type
- string
- Description
JSON values for the subscription
- Name
authorizationAmount
- Type
- number
- Description
Amount to be authorized for this subscription
- Name
shippingMethods
- Type
- array
- Description
A List of shipping methods available for the products
- Name
id
- Type
- string
- Description
Id to identify the shipping method
- Name
enabled
- Type
- boolean
- Description
Flag to check if the shipping method is enabled
- Name
systemName
- Type
- string
- Description
System name of the shipping methods
- Name
shippingCode
- Type
- string
- Description
Shipping code used by the shipping method
- Name
displayName
- Type
- string
- Description
Display name of the shipping method
- Name
description
- Type
- string
- Description
Description of the shipping method
- Name
displayOrder
- Type
- number
- Description
Display order of this shipping method in the list of shipping methods
- Name
expectedDaysToDeliver
- Type
- number
- Description
Number of days before the expected delivery date
- Name
expectedDeliveryDate
- Type
- string
- Description
Date and time of expected delivery of the product
- Name
deliveryOnOrBefore
- Type
- string
- Description
The date on or before which date the product should be delivered
- Name
isDefault
- Type
- boolean
- Description
Flag to check if this shipping method is the default shipping method
- Name
isNominated
- Type
- boolean
- Description
Flag to check if this shipping method is the nominated shipping method
- Name
type
- Type
- number
- Description
Type of this shipping mehtod
- Name
carrierCode
- Type
- string
- Description
Carrier code of the delivery carrier
- Name
countryCode
- Type
- string
- Description
Country code of the region of delivery
- Name
isPriceOnRequest
- Type
- boolean
- Description
Flag to check if product is produced only for editorials and is never actually put into production for consumer purchase
- Name
showRecomendation
- Type
- boolean
- Description
Flag to check if the recommendations for this product should be shown
- Name
recomendation
- Type
- string
- Description
The recommendations for this product
- Name
isTaxable
- Type
- boolean
- Description
Flag to check if this shipping method is taxable
- Name
shippingCostMethod
- Type
- number
- Description
Used to select the type of shipping cost to be applied
- Name
cutOffTimes
- Type
- string
- Description
It is the latest time in any Business Day that we can process a particular Transaction, request or instruction on that Business Day.
- Name
countryCsv
- Type
- string
- Description
File name for the csv file having data of the countries
- Name
maxDimensionMm
- Type
- number
- Description
Maximum dimensions of the package to be delivered in Millimeters
- Name
companyDiscount
- Type
- object
- Description
The discount given on the original price of the products by the company to their employees
- Name
validUntil
- Type
- string
- Description
The date time of the validity of the order for delivery
- Name
deliveryInstruction
- Type
- string
- Description
Instructions for the delivery agent regarding the delivery
- Name
deliveryPlans
- Type
- array
- Description
A list of delivery plans for the delivery of the order
- Name
fulfilmentChannel
- Type
- number
- Description
The method by which sellers can sell items through various sales channels and have the company handle the packaging and shipping aspects for them
- Name
deliveryType
- Type
- number
- Description
The type of delivery for the order
- Name
deliveryCenter
- Type
- object
- Description
The details of the delivery center which will handle the delivery for this order
- Name
recordId
- Type
- string
- Description
Record Id to identify the delivery center records
- Name
code
- Type
- string
- Description
A code used by the delivery center
- Name
postCode
- Type
- string
- Description
Postal code of the delivery center
- Name
latitude
- Type
- string
- Description
Latitute of the geographical location of the delivery center
- Name
longitude
- Type
- string
- Description
Longitute of the geographical location of the delivery center
- Name
items
- Type
- array
- Description
The list of items to be delivered
- Name
distanceInMiles
- Type
- string
- Description
The distance to the the delivery location in miles
- Name
shippingMethodName
- Type
- string
- Description
The name of the shipping method used for shipping the product
- Name
cost
- Type
- number
- Description
The cost of shipping the product
- Name
shippingSpeed
- Type
- string
- Description
The rate at which the order will be shipped for deliery
- Name
deliveryDateTarget
- Type
- string
- Description
The date and time target for the delivery of the order
- Name
deliveryDateActual
- Type
- string
- Description
The date and time of the actual delivery of the order
- Name
leadTime
- Type
- number
- Description
The amount of time that passes from the start of a process until its conclusion
- Name
leadTimeUom
- Type
- number
- Description
The unit of measurement for the lead time
- Name
leadTimeMin
- Type
- number
- Description
The minimum lead time for the order to be delivered
- Name
leadTimeMax
- Type
- number
- Description
The maximum lead time for the order to be delivered
- Name
pickupStoreId
- Type
- string
- Description
The id of stores from which the order can be collected
- Name
refStoreId
- Type
- string
- Description
Reference Id of the store
- Name
pickupStoreCode
- Type
- string
- Description
The store code for a pickup store
- Name
shippingType
- Type
- number
- Description
The type of shipping used for delivery of the order
- Name
hasSubscription
- Type
- boolean
- Description
Flag to check if the user has a subscription
- Name
subscriptionTotal
- Type
- object
- Description
The total amount that must be paid by the user for the subscription
- Name
isGiftWrapApplied
- Type
- boolean
- Description
Flag to check if Gift wrap is applied to the products
- Name
giftWrapId
- Type
- string
- Description
Gift wrap Id to identify the gift warpped products in the basket
- Name
giftWrapOption
- Type
- string
- Description
The gift wrapping options available for the products in the basket
- Name
membershipPlanId
- Type
- string
- Description
Membership plan Id to identify the membership plan of the user
- Name
promotionsApplied
- Type
- array
- Description
List of promotions applied on the products in the basket
- Name
voucherCode
- Type
- string
- Description
Voucher code used to validate the offer and claim the benefits e.g. 'DISCOUNT15'
- Name
discountPct
- Type
- number
- Description
Discount value applied on the product in Percentage
- Name
discountAmt
- Type
- object
- Description
The amount of discount to be applied on the products in the basket
- Name
autoApply
- Type
- boolean
- Description
Flag to check if the promotion has to be auto applied on the products
- Name
promoCode
- Type
- string
- Description
Promotion code used to validate the offer e.g. 'DISCOUNT15'
- Name
itemGroupId
- Type
- number
- Description
Id used to identify the group of items
- Name
couponProvider
- Type
- string
- Description
The entity that provides the coupon to create an offer
- Name
isManualPrice
- Type
- boolean
- Description
Flag to check if the Price is set Manually
- Name
priceMatchReqId
- Type
- string
- Description
Id used to match the price requests
- Name
deliveryMessage
- Type
- string
- Description
Message for the delivery agent provided by the user
- Name
variantProducts
- Type
- array
- Description
A list of all available variants of the current product
- Name
productName
- Type
- string
- Description
Product name of the variant product