WEBCentralizedShoppingCartApplySourceCode

 
 

WEBCentralizedShoppingCartApplySourceCode

Initial Build 2008.01
xWeb Web Method
Response Type object

This method can be used to apply a source code and reprice an existing shopping cart.

Parameters

This method accepts a Shopping Cart Object and a string for source code to be applied to it, which may cause the prices to change.

Response

The updated Shopping Cart object is returned.

Sample Request

<WEBCentralizedShoppingCartApplySourceCode xmlns="http://www.avectra.com/2005/">
<oCentralizedOrderEntry>
    [[Shopping Cart Object]]
</oCentralizedOrderEntry>
<szSourceCode>string</szSourceCode>
</WEBCentralizedShoppingCartApplySourceCode>

Sample Response

<WEBCentralizedShoppingCartApplySourceCodeResponse xmlns="http://www.avectra.com/2005/">
<WEBCentralizedShoppingCartApplySourceCodeResult>
    [[Shopping Cart Object]]
</WEBCentralizedShoppingCartApplySourceCodeResult>
</WEBCentralizedShoppingCartApplySourceCodeResponse>

 

JSON Method

Applies the source code to the cart.

This method returns a Shopping Cart object with the price corresponding to the source code applied to it.

Returns an error message if the source code is not valid.

See WEBCentralizedShoppingCartGetNew or WEBCentralizedShoppingCartRefresh for examples of the shopping cart POST and response objects.

 

GET n/a

POST /xweb/JSON/WEBCentralizedShoppingCartApplySourceCode

DATA: JSON
{
    "WEBCentralizedShoppingCartApplySourceCode": {
        "szSourceCode": "source_code",
            "oCentralizedOrderEntry": {
                <<Shopping_Cart_Object>>
            }
      }
}

 


SAMPLE RESULT: Invalid source code
HTTP STATUS: 200
DATA: JSON
{
    "Message": "An error has occurred",
    "Exception": {
        "Message": "Source Code fake_code is not valid."
    }
}

 


SAMPLE RESULT
HTTP STATUS: 200
DATA: JSON
<<Updated_Shopping_Cart_Object>>

 

 

Was this article helpful?
0 out of 0 found this helpful