Customer

Requests related to Customers allows you to manipulate a list of Customers that you can get and update whenever you want to perform any action.

diagram_customer_1

1 - Save a Customer

Let's save a Customer for future interactions

Request

Definitions Example

{
    "requestType": String,
    "actionType": String,
    "customer": {
        "phone": String,
        "name": String,
        ...
    }
}                
            

{
    "requestType": "customer",
    "actionType": "save",
    "customer": {
        "phone": "1234567890",
        "name": "JANE DOE"
        ...
    }
}    
            

See definitions

Response

Definitions Example

{
    "status": String,
    "customer": {
        "phone": String,
        "name": String,
        "terminal_number": String,
        "user_id": String
        ... (record-related data such as: 
        modified, created, user_name, etc.)
    }
}                
                

{
    "status": "OK",
    "customer": {
        "phone": "1234567890",
        "name": "JANE DOE",
        "terminal_number": "3",
        "user_id": "4"
        ...
    }
}    
            

See definitions


2 - Get a Customer

Now let's get that Customer. For that we use the phone number.

Request

Definitions Example

{
    "requestType": String,
    "actionType": String,
    "phone": String
}                
                

{
    "requestType": "customer",
    "actionType": "get",
    "phone": "1234567890"
}    
            

See definitions

Response

Definitions Example

{
    "status": String,
    "customer": {
        "phone": String,
        "name": String
        ... (customer-data-related fields 
        such as: street, city, state, etc.)
    }
}                
                

{
    "status": "OK",
    "customer": {
        "phone": "12345567890",
        "name": "David",
        "state": "IL",
        "email": "davidemail@email.com"
    }
}      
            

See definitions

Definitions

Request Definitions
Definition Type Description
requestType String ("customer") Unique request identifier.
actionType String (["get", "save"]) Unique action identifier for your request.
phone String The customer's phone number. (used for "customer get" request, as id)
customer Object The data or information related to a customer, including details like name and contact info. (used for "customer save" request)
Response Definitions
Definition Type Description
status String (["OK", "ERROR"]) Request status.
customer Object The data or information related to a customer, including details like name and contact info.