Api
Store Cart_add Item
Add an item to the cart. If the variant already exists in the cart, increments the quantity. Validates that the variant exists and is active in the scoped shop.
Path Parameters
cartId*string
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://loading/v1/store/cart/string/items" \ -H "Content-Type: application/json" \ -d '{ "quantity": 1, "variantId": "string" }'{
"billingAddress": {
"city": "string",
"country": "string",
"district": "string",
"division": "string",
"house": "string",
"name": "string",
"note": "string",
"phone": "string",
"postcode": "string",
"road": "string",
"thana": "string"
},
"codFee": 0,
"couponCode": "string",
"couponDiscount": 0,
"createdAt": "2019-08-24T14:15:22Z",
"customerId": "string",
"customerNote": "string",
"discountTotal": 0,
"expiresAt": "2019-08-24T14:15:22Z",
"id": "string",
"itemCount": 0,
"items": [
{
"compareAtPrice": 0,
"id": "string",
"lineTotal": 0,
"product": {
"name": "string",
"slug": "string",
"thumbnail": "string"
},
"productId": "string",
"quantity": 0,
"unitPrice": 0,
"variant": {
"images": [
"string"
],
"inStock": true,
"lowStock": true,
"optionValues": {
"property1": "string",
"property2": "string"
}
},
"variantId": "string"
}
],
"paymentMethod": "string",
"shippingAddress": {
"city": "string",
"country": "string",
"district": "string",
"division": "string",
"house": "string",
"name": "string",
"note": "string",
"phone": "string",
"postcode": "string",
"road": "string",
"thana": "string"
},
"shippingFee": 0,
"shippingMethodId": "string",
"shippingMethodName": "string",
"shopId": "string",
"status": "string",
"subtotal": 0,
"total": 0,
"updatedAt": "2019-08-24T14:15:22Z"
}