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:

JSON

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

Response Body:

JSON

{ 
 command: 'CustomerInSale', 
 method: 'get', 
 version: '1.0',  
 status: 200, 
 data: {  
      email: "example@email.com", 
      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 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 a customer into a sale.

Request Body:

JSON

{ 
command: 'CustomerInSale', 
method: 'post', 
version: '1.0', 
email: 'scully99@gmail.com' 
}

Response Body:

JSON

{ 
command: 'CustomerInSale', 
method: 'post', 
version: '1.0', 
status: 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

email

string

Customer email address, must be unique

null

1

Did this answer your question?
😞
😐
😁