Skip to content

Branch_Update#


Description#

This function allows you to update an existing template branch.

Requirements#

Miva version 10.00.00 or later.

Request Body Parameters#

Parameter
Type Description
edit_branch
branch_name
branch_id
String
String
Number
Branch Name set as primary
Branch Name set as primary
Branch ID set as primary
color String Hex value of the color chip associated with the branch, including #. Cannot be blank. Default color is #20c171.

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": "beta",
    "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"
    }
}