cartDiscount

This app commands allows users to add or retrieve discount into/from the cart.

GET

Description:
Get the discount information from the cart.

Request Body:

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

Response Body:

{
    command: 'cartDiscount',
    method: 'get',
    version: '1.0',
    status_code: 200,
    error: null,
    discount_name: 'Shravan Discount',
    amount_type:  '%',
    amount: 10.00
}

Parameters:

Attribute NameAttribute TypeDescriptionEnumRequired (Binary)
commandstringHigh level command name to interact with Olivernull1
methodstringThese correspond to create, read, update, and delete (or CRUD) operationsnull1
versionstringThe version of the command usednull1

POST

Description:
Add discount information to the cart.

Request Body:

{
    command: 'cartDiscount',
    method: 'post',
    version: '1.0',
    discount_name: 'Shravan Discount',
    amount_type: '%',
    amount: 10.00
}

Response Body:

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

Parameters:

Attribute NameAttribute TypeDescriptionEnumRequired (Binary)
commandstringHigh level command name to interact with Olivernull1
methodstringThese correspond to create, read, update, and delete (or CRUD) operationsnull1
versionstringThe version of the command usednull1
discount_namestringName of Discountnull1
amount_typestringUnit used for discount amount'%', '$'1
amountfloat, 2 decimal placesDiscount amountnull1