CustomerInSale

This app command can either retrieve or add a customer into a sale. Oliver will respond with the name and email of a customer currently added to a sale when a GET method is used. Alternatively, adding a customer using a POST method requires the email address of a customer, name is optional.

GET

Description:
Retrieves a customer that is added to sale.

Request Body:

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

Response Body:

{
    command: 'CustomerInSale',
    method: 'get',
    version: '1.0',
    status: 200,
    data: {
        email: "[email protected]",
        first_name: "John",
        last_name: "Doe",
        phone: "(555) 555-1234",
        address_line_one: "456 Example Rd.",
        address_line_two: null,
        country: "USA",
        state: "New York",
        city: "Brooklyn",
        postal_code: "10065",
        credit: 36, 
        notes: null
     },
    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

POST

Description:
Add a customer into a sale.

Request Body:

{
    command: 'CustomerInSale',
    method: 'post',
    version: '1.0',
    email: '[email protected]'
}

Response Body:

{
    command: 'CustomerInSale',
    method: 'post',
    version: '1.0',
    status: 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
emailstringCustomer email address, must be uniquenull1