Created by potrace 1.16, written by Peter Selinger 2001-2019

Miva Developer Docs

Adds an address to an existing customer.


Adds a new address to an existing customer’s address book. Use it to save extra shipping or billing addresses for a customer.

Before you begin#

  • The API token needs CustomerAddress_Insert, either assigned directly under Functions or through a group. See Create an API token.
  • Requests must be signed if the token requires it. See Make a signed request with HMAC.
  • You need the customer’s Customer_ID.

Example requests#

Add an address to a customer#

Saves a new address to the customer with this ID.

{
    "Store_Code": "{{Store_Code}}",
    "Miva_Request_Timestamp": "{{$timestamp}}",
    "Function": "CustomerAddress_Insert",
    "Address1": "2 Main St.",
    "Address2": "",
    "City": "Long Beach",
    "Company": "Bad",
    "Country": "US",
    "Customer_ID": "{{Customer_ID}}",
    "Description": "Sleeping Dog",
    "Email": "[email protected]",
    "Fax": "",
    "FirstName": "Sleep",
    "LastName": "Dogg",
    "Phone": "1234567890",
    "Residential": false,
    "State": "CA",
    "Zip": "92000"
}

Request parameters#

Parameter Type Required Description
address1 String No The first address field
address2 String No The second address field
city String No The city for the address
company String No The company name for the address
country String No The country for the address
customer_id Number The id number of the customer
description String No The description for the address
email String No The email for the address
fax String No The fax number for the address
firstname String No The first name for the address
lastname String No The last name for the address
phone String No The phone number for the address
residential Boolean No Boolean value indicating if the address is residential
state String No The state for the address
zip String No The zip code for the address

Example response#

{
    "success": 1
}

Response parameters#

Parameter Type Description
success Boolean Boolean value indicating if the API request was successful
Function Use it to
CustomerAddressList_Load_Query List a customer’s saved addresses
CustomerAddress_Update Change a saved address
CustomerAddress_Delete Delete a saved address
CustomerList_Load_Query Find the customer’s ID

Try in Postman#

In the Miva: JSON API: Authenticated collection, open Customers > CustomerAddress_Insert. See Set Up Postman.