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

Miva Developer Docs

Updates the bill to and ship to information on an order.


Updates the bill to and ship to information on an order. You can also assign a customer to the order with Customer_ID.

Note

If a customer_id is specified, then that customer is assigned to the order.

Before you begin#

  • The API token needs Order_Update_Customer_Information, 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 order’s Order_ID. To assign a customer, you also need the customer’s Customer_ID.

Example requests#

Update the addresses and assign a customer#

Assigns customer 1 to order 200100 and replaces the ship to and bill to details.

{
    "Store_Code": "{{Store_Code}}",
    "Miva_Request_Timestamp": "{{$timestamp}}",
    "Function": "Order_Update_Customer_Information",
    "Order_ID": 200100,

    "Customer_ID": 1,
    "Ship_Residential": 0,
    "Ship_FirstName": "ShpFirstName",
    "Ship_LastName": "ShpLastName",
    "Ship_Email": "ShpEmail",
    "Ship_Phone": "ShpPhone",
    "Ship_Fax": "ShpFax",
    "Ship_Company": "ShpCompany",
    "Ship_Address1": "ShpAddr1",
    "Ship_Address2": "ShpAddr2",
    "Ship_City": "ShpCity",
    "Ship_State": "ShpState",
    "Ship_Zip": "ShpZip",
    "Ship_Country": "ShpCountry",
    "Bill_FirstName": "BillFName",
    "Bill_LastName": "BillLName",
    "Bill_Email": "BillEmail",
    "Bill_Phone": "BillPhone",
    "Bill_Fax": "BillFax",
    "Bill_Company": "BillCompany",
    "Bill_Address1": "BillAddr1",
    "Bill_Address2": "BillAddr2",
    "Bill_City": "BillCity",
    "Bill_State": "BillState",
    "Bill_Zip": "BillZip",
    "Bill_Country": "BillCountry"
}

Request parameters#

Parameter Type Required Description
Order_ID Number Order_ID to update
Customer_ID Number Yes Customer_ID to Assign to the order
Ship_Residential Boolean No Flag for whether the shipping address is residential or not.
Ship_FirstName String No FirstName for Ship To address
Ship_LastName String No LastName for Ship To address
Ship_Email String No Email for Ship To address
Ship_Phone String No Phone Number for Ship To address
Ship_Fax String No Fax Number for Ship To address
Ship_Company String No Company Name for Ship To address
Ship_Address1 String No Address line 1 for Ship To address
Ship_Address2 String No Address line 2 for Ship To address
Ship_City String No City for Ship To address
Ship_State String No State for Ship To Address
Ship_Zip String No Zip Code for Ship To address
Ship_Country String No Country for Ship To Address
Bill_FirstName String No FirstName for Bill To address
Bill_LastName String No LastName for Bill To address
Bill_Email String No Email for Bill To address
Bill_Phone String No Phone Number for Bill To address
Bill_Fax String No Fax Number for Bill To address
Bill_Company String No Company Name for Bill To address
Bill_Address1 String No Address line 1 for Bill To address
Bill_Address2 String No Address line 2 for Bill To address
Bill_City String No City for Bill To address
Bill_State String No State for Bill To Address
Bill_Zip String No Zip Code for Bill To address
Bill_Country String No Country for Bill To Address

Example response#

{
    "success": 1
}

Response parameters#

Parameter Type Description
success boolean boolean value for if the request was successful

Error responses#

Error Code Error Message Error Description
MER-JSN-ORD-00025 Order not found. Order number not found.
MER-JSN-00018 Invalid value for field ‘Customer_ID’: Customer not found Customer does not exist.
Function Use it to
OrderList_Load_Query Find the order and its current addresses
CustomerList_Load_Query Find the customer and their Customer_ID
OrderCustomFields_Update Update the order’s custom field values
Order_Create Create an order

Try in Postman#

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