@mobify/commerce-integrations/dist/types
Commerce Integrations data types
CartItem
Property | Type | Description |
---|
.id | String | The cart id. |
.productId | String | The product id. |
.productName | String | The product name. |
.quantity | PositiveInteger | The quantity of this product in the cart. |
.baseItemPrice | Number | The price for one unit of this product before discounts. |
.baseLinePrice | Number | The price for all units of this product before discounts (usually baseItemPrice multiplied by quantity). |
.itemPrice | Number | The price for one unit of this product after discounts. |
.linePrice | Number | The price for all units of this product in the cart, after discounts (usually baseItemPrice multiplied by quantity). |
Cart
Property | Type | Description |
---|
.id | String | The cart id. |
.customerInfo | CustomerInformation | The information about the cart owner. |
.items | Array.<CartItem> | The cart items. |
.shippingAddress | OrderAddress | The destination shipping address. |
.billingAddress | OrderAddress | The billing address. |
.shippingMethods | Array.<ShippingMethod> | All the possible shipping methods for the cart. |
.paymentMethods | Array.<PaymentMethod> | All the possible payment methods for the cart. |
.selectedShippingMethodId | String | The selected shipping method for the cart. |
.payments | Array.<Payment> | All the current payments applied to the cart (such as credit card or gift card). |
.couponEntries | Array.<CouponEntry> | All the current coupons applied to the cart. |
.subtotal | Number | The subtotal before shipping, discounts, and tax. |
.shipping | Number | The shipping cost. |
.discounts | Number | The total of all discounts applied to the cart. |
.tax | Number | The total tax of the cart. |
.total | Number | The total cost of all the items in the cart after discounts, shipping, and tax. |
CategoryList
Property | Type |
---|
.data | Array.<Category> |
.count | Number |
.total | Number |
Category
Property | Type | Description |
---|
.id | String | The category id. |
.name | String | The category name. |
.description | String | The category description. |
.thumbnailImage | Image | The category thumbnail image. |
.backgroundImage | Image | The category background image. |
.categories | Array.<Category> | The subcategories. |
CountryCode
CouponEntry
Property | Type | Description |
---|
.id | String | The coupon id. |
.active | Boolean | The coupon status, whether it’s active or not. |
.code | String | The coupon code. |
.name | String | The coupon name. |
.description | String | The coupon description. |
Property | Type | Description |
---|
.id | String | The customer id. |
.email | Email | The customer’s email. |
CustomerRegistration
Property | Type | Description |
---|
.firstName | String | The customer’s first name. |
.lastName | String | The customer’s last name. |
.email | String | The customer’s email address. |
.password | String | The customer’s password. |
HybrisCustomerRegistration
Property | Type | Description |
---|
.firstName | String | The customer’s first name. |
.lastName | String | The customer’s last name. |
.email | String | The customer’s email address. |
.password | String | The customer’s password. |
.titleCode | String | The customer’s title, such as Mr. or Mrs. |
Customer
Property | Type | Description |
---|
.id | String | The customer’s id. |
.firstName | String | The customer’s first name. |
.lastName | String | The customer’s last name. |
.email | String | The customer’s email address. |
Email
FilterValue
Property | Type | Description |
---|
.count | Integer | The filter value hit count. (For example, 10.) |
.label | String | The filter value label text (For example, ‘Red’.) |
.value | String | The filter value (For example, ‘red’.) |
Filter
Property | Type | Description |
---|
.propertyId | String | The filter’s property id. (For example, color or size.) |
.label | String | The filter’s text used for labels. (For example, the filter color may have a label attribute of “Color”.) |
.values | Array.<FilterValue> | The filter values. |
ImageSet
Property | Type | Description |
---|
.images | Array.<Image> | The images. |
.variationProperties | Array.<VariationProperty> | The variation properties that apply to the images. |
.sizeType | String | The images size type (such as ‘small’, ‘medium’, ‘large’, or ‘swatch’). |
Image
Property | Type | Description |
---|
.alt | String | The image alt text. |
.description | String | The image description. |
.src | String | The image src. |
.title | String | The image title. |
Integer
Latitude
Link
Property | Type | Description |
---|
.href | URL | The link’s url. |
.text | String | The link’s text. |
.title | String | The link’s title. |
Longitude
OrderAddress
Property | Type | Description |
---|
.id | String | The id of the order address. |
.titleCode | String | The title code of the customer. (For example, ‘Mr.’ or ‘Mrs.’.) |
.firstName | String | The customer’s first name. |
.lastName | String | The customer’s last name. |
.phone | PhoneNumber | The customer’s phone number. |
.addressLine1 | String | The customer’s street name, street number, and suite/unit. |
.addressLine2 | String | Any additional addressing information. (For example, a company name, or “Attn:”.) |
.countryCode | CountryCode | The country code. |
.stateCode | String | The state code. |
.city | String | The city name. |
.postalCode | PostalCode | The postal code. |
OrderList
Property | Type |
---|
.count. | Number |
.data. | Array.<Product> |
.total. | Number |
Order
Property | Type | Description |
---|
.id | String | The order id. |
.creationDate | String | The date when the order was created. |
.status | String | The status of the order (such as validated, processed, shipped, or cancelled). |
.customerInfo | CustomerInformation | Information about the customer. |
.items | Array.<CartItem> | The order items. |
.shippingAddress | OrderAddress | The order’s destination shipping address. |
.billingAddress | OrderAddress | The order’s billing address. |
.selectedShippingMethodId | String | The selected shipping method for the order. |
.payments | Array.<Payment> | All the current payments for the order. |
.subtotal | Number | The subtotal before shipping, discounts, and tax. |
.shipping | Number | The shipping cost. |
.discounts | Number | The total discounts applied to the order. |
.tax | Number | The order’s total tax. |
.total | Number | The order’s total cost after discounts, shipping, and tax. |
PaymentDetails
Details of the payment method (such as credit card, Paypal, or gift card).
Property | Type | Description |
---|
.type | String | The type of payment method (such as Visa or Mastercard). |
.holderName | String | The name of the account holder. |
.number | String | The card/account number or code (such as credit card number, or gift card code). |
.maskedNumber | String | The card/account number or code, masked. |
.username | String | The card/account username. (For example, Paypal username.) |
.expiryMonth | PositiveInteger | The month when the card/account expires, in number form. |
.expiryYear | PositiveInteger | The year when the card/account expires. |
.ccv | String | The credit card’s cvv (card verification value). |
PaymentMethod
Property | Type | Description |
---|
.id | String | The payment method id. |
.name | String | The payment method name. |
.types | Array.<Object> | The different types of the particular payment method. (For example, a credit card payment method can have types Visa and Mastercard.) |
Payment
Property | Type | Description |
---|
.id | String | The payment id. |
.amount | Number | The payment amount. |
.methodId | String | The payment method id. |
.details | PaymentDetails | The customer’s payment details for the specified payment method. |
PhoneNumber
PositiveInteger
PostalCode
ProductList
Property | Type |
---|
.count. | Number |
.data. | Array.<Product> |
.total. | Number |
ProductSearchRequest
Property | Type | Description |
---|
.count | Integer | The number of products to return. |
.filters | Object | The search result filters. |
.query | String | The search query. |
.start | Integer | The starting position. |
.sort | String | The sorting method. |
ProductSearchResult
Property | Type | Description |
---|
.available | Boolean | Whether the product is available for order. |
.productId | String | The product id. |
.productName | String | The product name. |
.price | Number | The product price. |
.rating | Number | The product rating. |
.defaultImage | Image | The product main image. |
.variationProperties | Array.<VariationProperty> | The product variations. |
ProductSearch
Property | Type | Description |
---|
.count | Integer | The number of products returned. |
.filters | Array.<Filter> | The available search filters. |
.results | Array.<ProductSearchResult> | The product search results. |
.query | String | The search query. |
.selectedFilters | Object | The selected filters applied to the results as a propertyId and value map. |
.selectedSortingOption | String | The selected sorting option. NOTE: Only single sorting is supported. |
.sortingOptions | Array.<SortOption> | The available sorting options. |
.start | Integer | The search start index. |
.total | Integer | The search hit count. |
Product
Property | Type | Description |
---|
.id | String | The product id. |
.name | String | The product name. |
.imageSets | Array.<ImageSet> | The product’s image-sets. |
.description | String | The product’s description. |
.categoryId | String | The product’s main category id. |
.brand | String | The product’s brand name. |
.minimumOrderQuantity | Integer | The product’s minimum order quantity. |
.stepQuantity | Integer | The product’s step quantity. |
.upc | String | The product’s universal product code. |
.unit | String | The product’s units, such as ‘each’, ‘ea’, or ‘pair’. |
.price | Number | The default price. |
.prices | Object | The map of price type label and value. For example: {‘Regular’: 99.99, ‘Sale’: 69.99} |
.variations | Array.<Variation> | The different variations of the product. |
.variationProperties | Array.<VariationProperty> | All the product variations’ different properties. |
.variationValues | Object | The product’s property values. |
ShippingMethod
Property | Type | Description |
---|
.id | String | The shipping method id. |
.name | String | The shipping method name. |
.cost | Number | The cost of shipping. |
SortOption
Property | Type | Description |
---|
.id | String | The unique sort identifier. |
.label | String | The sort label. |
StoreSearchRequest
Property | Type | Description |
---|
.count | Integer | The number of stores to return. Default is 20. |
.start | Integer | The zero-based index page number. Default is 0. |
.latlon | Object | The geographic coordinates informing the store search location. |
.latlon.latitude | Latitude | |
.latlon.Longitude | Longitude | |
StoreSearchResult
Property | Type | Description |
---|
.count | Integer | The number of stores returned. |
.start | Integer | A zero-based index page number. |
.total | Integer | The total number of search hits. |
.stores | Array.<Store> | The list of stores returned. |
Store
Property | Type | Description |
---|
.addressLine1 | String | The store address. |
.addressLine2 | String | A secondary store address. |
.city | String | The city where the store is located. |
.country | String | The country where the store is located. |
.description | String | The store description. |
.features | String | The various features of a store. |
.email | String | The store email. |
.id | String | The store unique identifier. |
.name | String | The store name. |
.phone | String | The store phone number. |
.postalCode | String | The store postal code. |
.hours | String | The store hours. |
.images | String | The store logo. |
URL
VariationPropertyValue
Represents values for properties (e.g. size property would have the individual sizes).
Property | Type |
---|
.name | String |
.value | String |
.mainImage | Image |
.swatchImage | Image |
VariationProperty
Represents things like “color”, “size”, “width”, etc.
Property | Type | Description |
---|
.id | String | The variation property id. |
.label | String | The variation property label. |
.values | Array.<VariationPropertyValue> | The variation property values. |
Variation
Property | Type | Description |
---|
.id | String | The variation id (NOTE: In some cases this value may have to be generated). |
.price | Number | The product price. |
.orderable | Boolean | Whether this variation of the product can be ordered. |
.values | Object | The variation values. |