CartValue

This app command allows users to manipulate the transactional data in the cart such as the sub-total, total tax, discount, balance, tender amount and currency used.

GET

Description:
Get the transaction data of a cart.

Request Body:

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

Response Body:

{
    command: 'CartValue',
    method: 'get',
    version: '1.0',
    status_code: 200,
    error: null,
    data: {
        sub_total: 13.50,
        total_tax: 1.35,
        discount: 0,
        discount_unit: '%',
        balance: 14.85,
        tender_amt: 0,
        currency: 'USD'
    }
}

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

PUT

Description:
Modify the transaction data of a cart such as discount, tender amount and currency used.

Request Body:

{
    command: 'CartValue',
    method: 'put',
    version: '1.0',
    data: {
        discount: 5.00,
        discount_unit: '$',
        tender_amt: 12.00
    }
}

Response Body:

{
    command: 'CartValue',
    method: 'put',
    version: '1.0',
    status_code: 200,
    error: null,
    data: {
        sub_total: 25.00,
        total_tax: 2.50,
        discount: 5.00,
        discount_unit: '$',
        balance: 10.50,
        tender_amt: 12.00,
        currency: 'USD'   
    }    
}

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

discount

Float, 2 decimal places

Amount of discount applied

null

0

discount_unit

string

Unit of discount used

‘%’, ‘$’

1 if discount != 0

0 otherwise

tender_amt

Float, 2 decimal places

Amount of money paid

null

0

currency

string

Currency used

null

0


Did this page help you?