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

Miva Developer Docs

Updates the custom order field values for a specific order.


Updates the custom order field values for a specific order. Values are grouped by the custom field module that owns them, usually customfields.

Before you begin#

Example requests#

Update a custom field#

Sets the rep field in the customfields module to Hello World on order 200107.

{
    "Store_Code": "{{Store_Code}}",
    "Miva_Request_Timestamp": "{{$timestamp}}",
    "Function": "OrderCustomFields_Update",
    "Order_ID": 200107,
    "CustomField_Values": {
        "customfields": {
            "rep": "Hello World"
        }
    }
}

Request parameters#

Parameter Type Required Description
Order_ID Number Order number to update
CustomField_Values Object Object containing individual custom field data. Each child object will be the module code (e.g., customfields, productimagecustomfields)
  • customfields: Module Code - Module Code of the custom field module to update. Typically will be “customfields” but other modules support the custom fields feature.
  • field_code1: String - This is the custom field code to update. Its value is the custom field value to update.

Example response#

{
    "success": 1
}

Response parameters#

Name Description
success Boolean value for if the request was successful
processed Boolean value if function was processed

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 ‘CustomField_Values:customfields:reps’ Failed to load custom field ‘reps’.
Function Use it to
OrderCustomFieldList_Load List the custom order fields and their modules
OrderList_Load_Query Read an order’s custom field values with the CustomField_Values on-demand column
Order_Update_Customer_Information Update the order’s bill to and ship to information

Try in Postman#

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