GET GetCart
Get a cart by its id or api_reference_id.
This feature must be enabled for your account.
Input and output parameters
Input Parameter Name |
Type/Info |
id |
id of the cart in the system |
api_reference_id |
Your cart reference id. |
|
Outputs: |
|
- id - unique identifier in our system
- api_integration - name of the integration
- api_resource - the integration resource name
- api_reference_id - your reference to identify the cart
- contact_id - contact assigned to the cart
- recover_cart_url - direct the contact to recover their cart
- order_id - system order id assigned to the cart
- external_order_id - your system order id.
- create_date - date cart was added to the system
- update_date - date cart was updated in the system
- cart_create_date - date cart was created in your system
- cart_update_date - date cart was updated in your system
- confirmed_is_abandoned - has been confirmed abandoned in our system.
- date_confirmed_is_abandoned - when the cart was declared abandoned.
- is_active - cart currently active.
- total - total cart value.
- total_inc_tax - total cart value including tax.
- iso_currency_code - cart iso currency.
- abandoned_total - Total cart value when abandoned.
- abandoned_total_with_discount - Total cart value with discount applied.
- abandoned_total_discount - Discount applied to abandoned cart.
- customer_email - customer's email.
- customer_firstname - customer's first name.
- customer_lastname - customer's last name.
- customer_gender - customer's gender.
- customer_telephone - customer's tel.
- customer_mobile - customer's mobile tel.
- customer_dob - customer's date of birth.
- customer_is_guest - is a guest account.
- customer_notes - notes associated with the cart.
- billing_first_name - billing person first name.
- billing_last_name - billing person last name.
- billing_address1 - billing person address line 1.
- billing_address2 - billing person address line 2.
- billing_city - billing person address city.
- billing_county - billing person address county.
- billing_post_code - billing person address post code.
- billing_country - billing person address country.
- shipping_first_name - shipping person first name.
- shipping_last_name - shipping person last name.
- shipping_address1 - shipping person address line 1.
- shipping_address2 - shipping person address line 2.
- shipping_city - shipping person address city.
- shipping_county - shipping person address county.
- shipping_post_code - shipping person address post code.
- shipping_country - shipping person address country.
cart_lines - array of cart products assigned.
- id - system identifier.
- cart_id - system cart identifier.
- create_date - date line added to system cart.
- update_date - date line updated to system cart.
- cart_line_id - your ID to represent the cart line.
- product_id - product id for the system.
- product_sku - product sku.
- product_name - name of the product.
- product_description - product description.
- tax_percent -percentage of tax.
- product_price_tax - tax applied to product price.
- product_original_price - original (rrp) price of the product.
- product_price - price of the product.
- product_price_inc_tax - price of the product with tax.
- quantity - number of products.
- row_total - total cost of the line.
- row_total_inc_tax - total cost of the line with tax.
- abandoned_row_total - total row value of abandoned cart line.
- abandoned_row_total_with_discount - total row value with discount applied.
- abandoned_row_total_discount - total row discount applied for abandoned row.
custom_fields - Custom fields for the cart.
- Key is the field name then value assigned:
field_name: field_value
|
Examples
curl --request GET \
--url https://api.wiredplus.com/v1/GetCart?id=abc \
--header 'content-type: application/json;'
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.wiredplus.com/v1/GetCart?api_reference_id=xyz",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"content-type: application/json;"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.wiredplus.com/v1/GetCart?id=abc",
"method": "GET",
"headers": {},
"processData": false,
"contentType": false,
"mimeType": "application/json"
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Result Format JSON