Top
Developers Your place to code all things handmade

Welcome to the Shopclues Developer Platform

We believe in code as craft. Join the community of developers, creators and build tools that enrich the ways you can shop, sell and connect with the India's largest merchant base most easily.

Get Started

Register, Upload, Search and Connect

Explore Shopclues' marketplace of over 8.5 million products from over 3.5 lakh merchants. Connect buyers with the items they'll love.

Learn More About Catalog Management

Login, Integrate and Create

Build the best tools for Shopclues merchants. Simply login, Integrate and start developing you own apps.

Learn More About Start Developing
<
>
Jump to: navigation, search

Clear Cart

This API use for clear cart.

Method= POST

Headers

Field name Description Mandatory
Header - “Authorization” Access token is passed to identify the user. Eg- ”Bearer bc1f461de4f193" Yes
Header - “Content-Type” Input Content Type here it would be “application/json" Yes

Headers

Authorization : “Bearer bc1f461de4f193”
Content-Type : ”application/json”

Field Description:

Field name Description Mandatory
cart_service_id always 1 Yes
plateform user plateform Yes

Details of return parameters :

Variable Description
status Api status if 1: implies success , 0:implies fail error.
message Text response message
data Array of user with basic parameters. For detailed information about a user.

  • JSON
  • PHP
Production Url:
 https://developer.shopclues.com/api/v2/cart/clearCart
Sandbox Url:
https://sandbox.shopclues.com/api/v2/cart/clearCart

Sample request:

{'cart_service_id' : 1, platform : 'M'}

Sample response:

{
    "status": 1,
    "code": 200,
    "message": "True",
    "data": {
        
    },
    "extra": null
}

Click here for access token documentation.

<?php
$curl = curl_init();
  $token="<token>";
  curl_setopt_array($curl, array(
  CURLOPT_URL => "https://sandbox.shopclues.com/api/v2/cart/clearCart",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => '{
    cart_service_id : 1,
     platform : "M"
   }',
        

  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer .$token",
    "content-type: application/json",
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}




?>

Looking for ShopClues Apps?

Check out our new
App Gallery!

It's the best way to find cool and useful tools built upon Shopclues's API.