Pardomart
  1. Cart
Pardomart
  • auth
    • Register User
      POST
    • Initiate Login
      POST
    • Verify And Login
      POST
    • Resend Verification Code
      POST
    • Get All Time Zones
      GET
  • user
    • Get All Users
      GET
    • Get Verification Codes
      GET
    • Delete user by ID
      DELETE
  • vendor
    • Get All Vendors
      GET
    • Get Vendor By ID
      GET
    • Get vendors by User ID
      GET
    • Create Vendor profile
      POST
    • Update Vendor Profile
      PATCH
    • Delete vendor by Id
      DELETE
  • openingHours
    • Update Opening Hours
      PATCH
  • product
    • Get all Products
      GET
    • Get all vendor products
      GET
    • Create Vendor Product
      POST
    • Get Product By Barcode
      GET
    • Get Vendor Product By Barcode
      GET
    • Delete product by ID
      DELETE
    • Delete Vendor Product By ID
      DELETE
    • Update vendor product
      PATCH
  • category
    • Create Bulk Categories
    • Get All Categories
    • Create One Category
    • Delete One Category
  • tags
    • Create Bulk Tags
    • Get All Tags
    • Create One Tag
    • Update Tag
    • Delete One Tag
  • general search
    • General Search Product
    • General Search Vendors
    • General Search Category
    • Search vendors, categories and products
  • Cart
    • Add to Cart
      POST
    • Get cart by userId
      GET
    • Delete Cart Item
      DELETE
  • Order
    • Create Order
    • Get order by Id
    • Get Orders By User Id
    • Update Order
    • Update order status
  • Fees
    • Fetch All Fees
    • Create a fee (For Admin)
    • Get Fees by type
    • Update Fee data
    • Calculate Fees
  • Delivery Address
    • Add New Address
    • Get Delivery Address By Id
    • Get All User Delivery Addresses
    • Get Default Delivery Address
    • Update Delivery Address
    • Delete Delivery Address
  1. Cart

Add to Cart

Developing
POST
/cartItem

Request

Header Params

Body Params application/json

Example
{
    "vendorProductId": "14922cc6-2901-4ea4-983f-a90798b08e65",
    "quantity": 3,
    "totalPrice": 24.99
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/cartItem' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJmZjg3ZjJiNS0wYmIxLTRjYjUtODc1OS1mNWY0MzAzZTZmM2IiLCJyb2xlIjoiY3VzdG9tZXIiLCJpYXQiOjE3NDcyOTA1MDAsImV4cCI6MTc0OTg4MjUwMH0.XXZWvDaZxKoL3ZLUoiLlYpzFVh_b0LNz1oqhCC1_MSs' \
--header 'Content-Type: application/json' \
--data-raw '{
    "vendorProductId": "14922cc6-2901-4ea4-983f-a90798b08e65",
    "quantity": 3,
    "totalPrice": 24.99
}'

Responses

🟢201Created
application/json
Body

Example
{
    "id": "string",
    "cartId": "string",
    "vendorProductId": "string",
    "quantity": 0,
    "totalPrice": 0,
    "createdAt": "string",
    "updatedAt": "string",
    "orderId": null,
    "vendorProduct": {
        "id": "string",
        "vendorId": "string",
        "productId": "string",
        "price": 0,
        "name": "string",
        "description": "string",
        "discountedPrice": null,
        "images": [
            "string"
        ],
        "stock": 0,
        "isAvailable": true,
        "isAlcohol": true,
        "isAgeRestricted": true,
        "attributes": null,
        "categoryIds": [
            null
        ],
        "createdAt": "string",
        "updatedAt": "string"
    }
}
Modified at 2025-05-15 22:48:40
Previous
Search vendors, categories and products
Next
Get cart by userId
Built with