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

Miva Developer Docs

This function allows you to update an existing template branch.


Description#

This function allows you to update an existing template branch.

Requirements#

Miva version 10.00.00 or later.

Request Body Parameters#

Parameter Type Required Description
edit_branch
branch_name
branch_id
String
String
Number
One of these Branch Name set as primary
Branch Name set as primary
Branch ID set as primary
Branch_Color String No Hex value of the color chip associated with the branch, including # (for example #ffeb00). Must be a valid 7-character hex color.

Response Parameters#

Parameter Type Description
success Number 1 indicating a successful request.
0 indicating an unsuccessful request.
id Number Id of newly created Branch.
immutable Boolean Boolean flag for immutable. Every store has a branch with cannot be deleted and is immutable.
branchkey String Unique identifier for the branch. Used to generate a preview link.
name String Name of Branch.
color String Hex Value for Branch Color Chip. Used as a visual identifier in the Miva admin.
preview_url String Preview URL for this specific Branch.

Example Request#

{
    "Store_Code": "{{Store_Code}}",
    "Miva_Request_Timestamp": "{{$timestamp}}",
    "Function": "Branch_Update",
    "Edit_Branch": "My Custom Branch",
    "Branch_Name": "My Custom Branch - 2",
    "Branch_Color": "#ffeb00"
}

Example Response#

{
    "success": 1,
    "data": {
        "id": 6,
        "immutable": false,
        "branchkey": "33748876cde6f220b66582ac10adfcca",
        "name": "My Custom Branch - 2",
        "color": "#ffeb00",
        "preview_url": "https://mivadevtest.com/storefront.html?BranchKey=33748876cde6f220b66582ac10adfcca"
    }
}