- Introduction
-
Catalog
-
Catalog Category
- catalog_category.assignedProducts
- catalog_category.assignProduct
- catalog_category.create
- catalog_category.currentStore
- catalog_category.delete
- catalog_category.info
- catalog_category.level
- catalog_category.move
- catalog_category.removeProduct
- catalog_category.tree
- catalog_category.update
- catalog_category.updateProduct
- Catalog Category Attributes
- Catalog Product
- Catalog Product Attribute
-
Catalog Product Attribute
Media - Catalog Product Attribute Set
-
Catalog Product Custom
Option - Catalog Product Custom Option Value
- Catalog Product Downloadable Link
- Catalog Product Link
- Catalog Product Tag
- Catalog Product Tier Price
- Catalog Product Types
-
Catalog Category
- Catalog Inventory
- Checkout
- Create Your Own API
- Customer
- Directory
- Sales
- Enterprise Customer Balance
- Enterprise Gift Card
- Enterprise Gift Message
- Miscellaneous
- WS-I Compliance
Module: Customer Balance Quote API
enterprise_customerbalance_quote
Aliases: storecredit_quote
Method:
- enterprise_customerbalance_quote.setAmount (SOAP V1)
- shoppingCartCustomerbalanceSetAmount (SOAP V2)
Allows you to set amount from the customer store credit to the shopping cart.
Arguments:
Type | Name | Description |
---|---|---|
string | sessionId | Session ID |
string | quoteId | Shopping cart ID (quote ID) |
string | store | Store view code or ID (optional) |
Return:
Type | Description |
---|---|
float | Customer balance amount used in the shopping cart (quote) |
Faults:
Fault Code | Fault Message |
---|---|
100 | Provided data is invalid. |
103 | No quote found with requested id. |
104 | Store credit can not be used for quote created by guest. |
105 | No store found with requested id or code. |
Examples
Request Example SOAP V1
$proxy = new SoapClient('http://magentohost/api/soap/?wsdl'); $sessionId = $proxy->login('apiUser', 'apiKey'); $quoteId = 2; $store = 'default'; $balanceAmountUsedInQuote = $proxy->call($sessionId, 'storecredit_quote.setAmount', array($quoteId, $store));
Request Example SOAP V2
$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); // TODO : change url $sessionId = $proxy->login('apiUser', 'apiKey'); // TODO : change login and pwd if necessary $result = $proxy->shoppingCartCustomerbalanceSetAmount($sessionId, '15'); var_dump($result);
Request Example SOAP V2 (WS-I Compliance Mode)
$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); $sessionId = $proxy->login((object)array('username' => 'apiUser', 'apiKey' => 'apiKey')); $result = $proxy->shoppingCartCustomerbalanceSetAmount((object)array('sessionId' => $sessionId->result, 'quoteId' => '15', 'store' => null)); var_dump($result->result);