Sponsoring
update.json
method: POST
secured: true
url: /v1/promote/update.json
Adds or replaces the items in a cart.
| Field | Notes | ||||||||
|---|---|---|---|---|---|---|---|---|---|
action | 
                
                    Tells the endpoint how to treat the items being passed:
                    
 Type: String (append|adjust|replace|remove)  | 
            ||||||||
items | 
                
                    A JSON encoded array with the following structure:
                    {
    "SKU": "[Product SKU]",
    "Quantity": [Quantity of this item],
    "Autoship":[bool]
}
                    Type: JSON array (optional)  | 
            ||||||||
kit | 
                
                    The SKU of a Promoter Kit
                     Type: String (optional)  | 
            ||||||||
pack | 
                
                    A JSON encoded object with the following structure:
                    {
    "Guid": "[Pack GUID]",
    "Quantity": [Quantity of this configuration],
    "Autoship":[bool]
    "Berry": [Quantity of Vanilla],
    "Chocolate": [Quantity of Chocolate],
    "Vanilla": [Quantity of Berry],
}
                    This will take the quantites of each flavor, find the SKU that matches, and add the Quantity of this SKU to your Cart.  This is a convenience method to make implementing a UI easier.  It only works with Packs that have a Selector of FLAVOR_QUANTITIES_MAX_2 or FLAVOR_QUANTITIES_MAX_4.
                    Type: JSON Object (only evaluated if you do not pass an items field) (Optional)
                 | 
            
If sucessfull you will see a response like this:
{
    "Items": 1,
    "success": true,
    "error": null
}