This is an old documentation. Go to the latest Customer's Canvas docs

IStateSurfaces Interface

A structure holding a state file name and an array of surface names.

    // When we get the product.
    .then(function(product) {
        // Add the first three pages to the product.
                stateId: "3c040958-bfa8-4a3e-b3af-cff9257e7fa1",
                surfaces: ["0", "surface_1", "surface_2"]
        // If there was an error while adding pages to the product.
        .catch(function (error) {
            console.error("Adding surfaces failed with exception: ", error);



stateId: string

The name of a state file.

Optional surfaces

surfaces: string []

An array of surface names or indexes starting from 0. When you skip this array, all pages of the state file are added to a product.