Customer_Insert
#
Description#
This function allows you to insert a new customer.
Request Parameters#
Parameter |
Type | Description |
---|---|---|
Customer_Login |
String | Login to assign to a customer |
Customer_PasswordEmail |
String | Forgot Password Email. This is also used as the email address to log into the account |
Customer_Password |
String | Customer Password. This password will get encrypted when the record is created. |
Customer_ShipResidential |
Boolean | Boolean flag used to determine if commercial or residential rates are returned. |
Customer_ShipFirstName |
String | Shipping First Name to assign to a customer |
Customer_ShipLastName |
String | Shipping Last Name to assign to a customer |
Customer_ShipEmail |
String | Shipping Email address to assign to a customer |
Customer_ShipCompany |
String | Shipping Company name to assign to a customer |
Customer_ShipPhone |
String | Shipping Phone Number to assign to a customer |
Customer_ShipFax |
String | Shipping Fax Number to assign to a customer |
Customer_ShipAddress1 |
String | Shipping Address 1 to assign to a customer |
Customer_ShipAddress2 |
String | Shipping Address 2 to assign to a customer |
Customer_ShipCity |
String | Shipping City to assign to a customer |
Customer_ShipState |
String | Shipping State to assign to a customer. 2 digit state code |
Customer_ShipZip |
String | Shipping Zip Code to assign to a customer |
Customer_ShipCountry |
String | Shipping Country to assign to a customer. 2 digit country code |
Customer_BillFirstName |
String | Billing First Name to assign to a customer |
Customer_BillLastName |
String | Billing Last Name to assign to a customer |
Customer_BillEmail |
String | Billing Email Address to assign to a customer |
Customer_BillCompany |
String | Billing Company to assign to a customer |
Customer_BillPhone |
String | Billing Phone Number to assign to a customer |
Customer_BillFax |
String | Billing Fax Number to assign to a customer |
Customer_BillAddress1 |
String | Billing Address 1 to assign to a customer |
Customer_BillAddress2 |
String | Billing Address 2 to assign to a customer |
Customer_BillCity |
String | Billing City to assign to a customer |
Customer_BillState |
String | Billing State to assign to a customer. 2 digit state code |
Customer_BillZip |
String | Billing Zip Code to assign to a customer |
Customer_BillCountry |
String | Billing Country to assign to a customer. 2 digit country code |
Customer_Tax_Exempt |
Boolean | Flag to determine if customer is tax exempt |
Customer_BusinessAccount |
String | Name of the business account the customer will be assigned |
CustomField_Values |
Object | Object containing custom field modules |
Response Parameters#
Parameter |
Type | Description |
---|---|---|
id |
Number | Customer Id |
account_id |
Number | Business Account Id |
login |
String | Customer Login |
pw_email |
String | Forgot Password Email |
ship_id |
Number | Address Book Shipping Address ID |
ship_res |
Boolean | Customer Ship Residential Flag |
ship_fname |
String | Shipping First Name |
ship_lname |
String | Shipping Last Name |
ship_email |
String | Shipping Email Address |
ship_comp |
String | Shipping Company |
ship_phone |
String | Shipping Phone Number |
ship_fax |
String | Shipping Fax Number |
ship_addr1 |
String | Shipping Address 1 |
ship_addr2 |
String | Shipping Address 2 |
ship_city |
String | Shipping City |
ship_state |
String | Shipping State. 2 digit state code |
ship_zip |
String | Shipping Zip Code |
ship_cntry |
String | Shipping Country. 2 digit country code |
bill_id |
Number | Billing Address ID |
bill_fname |
String | Billing First Name |
bill_lname |
String | Billing Last Name |
bill_email |
String | Billing Email Address |
bill_comp |
String | Billing Company |
bill_phone |
String | Billing Phone Number |
bill_fax |
String | Billing Fax Number |
bill_addr1 |
String | Billing Address 1 |
bill_addr2 |
String | Billing Address 2 |
bill_city |
String | Billing City |
bill_state |
String | Billing State. 2 digit state code |
bill_zip |
String | Billing Zip Code |
bill_cntry |
String | Billing Country. 2 digit country code |
note_count |
Number | Number of Notes assigned to customer record |
dt_created |
Unix TS | Unix timestamp of the date account was created |
dt_login |
Unix TS | Date Time of Last Login |
credit |
Number | Customer Account Credit |
formatted_credit |
String | Formatted Customer Account Credit |
Example Request#
{
"Store_Code": "{{Store_Code}}",
"Miva_Request_Timestamp": "{{$timestamp}}",
"Function": "Customer_Insert",
"Customer_Login": "test1234",
"Customer_PasswordEmail": "test@miva.com",
"Customer_Password": "miva@123",
"Customer_ShipResidential": 1,
"Customer_ShipFirstName": "Brennan",
"Customer_ShipLastName": "Heyde",
"Customer_ShipEmail": "test@miva.com",
"Customer_ShipCompany": "Miva, Inc",
"Customer_ShipPhone": "555-555-5555",
"Customer_ShipFax": "555-555-5555",
"Customer_ShipAddress1": "123 abc",
"Customer_ShipAddress2": "apt 123",
"Customer_ShipCity": "San Diego",
"Customer_ShipState": "CA",
"Customer_ShipZip": "92101",
"Customer_ShipCountry": "US",
"Customer_BillFirstName": "Brennan",
"Customer_BillLastName": "Heyde",
"Customer_BillEmail": "test@miva.com",
"Customer_BillCompany": "Miva, Inc",
"Customer_BillPhone": "555-555-5555",
"Customer_BillFax": "555-555-5555",
"Customer_BillAddress1": "123 abc",
"Customer_BillAddress2": "apt 123",
"Customer_BillCity": "San Diego",
"Customer_BillState": "CA",
"Customer_BillZip": "92101",
"Customer_BillCountry": "US",
"Customer_Tax_Exempt": 0,
"Customer_BusinessAccount": "",
"CustomField_Values": {}
}
Example Response#
{
"id": 24993,
"account_id": 1431,
"login": "test1234",
"pw_email": "test@miva.com",
"ship_id": 13046,
"ship_res": true,
"ship_fname": "Brennan",
"ship_lname": "Heyde",
"ship_email": "test@miva.com",
"ship_comp": "Miva, Inc",
"ship_phone": "555-555-5555",
"ship_fax": "555-555-5555",
"ship_addr1": "123 abc",
"ship_addr2": "apt 123",
"ship_city": "San Diego",
"ship_state": "CA",
"ship_zip": "92101",
"ship_cntry": "US",
"bill_id": 13047,
"bill_fname": "Brennan",
"bill_lname": "Heyde",
"bill_email": "test@miva.com",
"bill_comp": "Miva, Inc",
"bill_phone": "555-555-5555",
"bill_fax": "555-555-5555",
"bill_addr1": "123 abc",
"bill_addr2": "apt 123",
"bill_city": "San Diego",
"bill_state": "CA",
"bill_zip": "92101",
"bill_cntry": "US",
"note_count": 0,
"dt_created": 1645482414,
"dt_login": 0,
"credit": 0,
"formatted_credit": "$0.00"
}