Cart

This app command allows users to manipulate items in the cart. Each item object consists of product id, quantity, name, amount of discount applied and product type.

GET

Description:
Get all items inside a cart and their information such as product id, quantity, name, discount applied and type of product.

Request Body:

JSON

{ 
command: 'Cart', 
method: 'get', 
version: '1.0' 
}

Response Body:

JSON

{ 
command: 'Cart', 
method: 'get', 
version: '1.0', 
status_code: 200, 
error: null, 
data: { 
 items:[ 
0: { 
Price: 35 
Sku: "1234568999" 
TaxClass: "" 
TaxStatus: "taxable" 
Title: "Black Framed Sunglasses" 
addons_meta_data: "" 
discount_amount: 0 
excl_tax: 0 
incl_tax: 4.565217391304344  isTaxable: true product_id: 16425 psummary: "" quantity: 1 variation_id: 0 } ] } }

Parameters:

Attribute Name

Attribute Type

Description

Enum

Required (Binary)

command

string

High level command name to interact with Oliver

null

1

method

string

These correspond to create, read, update, and delete (or CRUD) operations

null

1

version

string

The version of the command used

null

1

POST

Description:
Add new item(s) into the cart.

Request Body:

JSON

{ command: 'Cart', method: 'post', version: '1.0', data: { { product_id: 3341, qty: 1, name: 'Samsung Galaxy Z Flip', discount: 0, type: ‘variable’ }, { product_id: 1120, qty: 1, name: 'Samsung Galaxy Buds', discount: 0, type: 'variable' } } }

Response Body:

JSON

{ command: 'Cart', method: 'post', version: '1.0', status_code: 200, error: null }

Parameters:

Attribute Name

Attribute Type

Description

Enum

Required (Binary)

command

string

High level command name to interact with Oliver

null

1

method

string

These correspond to create, read, update, and delete (or CRUD) operations

null

1

version

string

The version of the command used

null

1

data

JS object

Product object

null

1

product_id

integer

Product ID

null

1

qty

integer

Quantity of product

null

1

name

string

Product name

null

0

discount

float, 2 decimal places

Amount of discount ($) applied on product

null

0

type

string

Product type

'simple', 'variable', 'composite'

0

Did this answer your question?
😞
😐
😁