---
title: "addSurfaces Method"
canonical: https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.product.addsurfaces.htm
archived: true
applies_to:
  - product: "Customer's Canvas On-Premises"
  - product: "Design Editor"
    versions: ["6.15.0", "6.x (may differ)"]
---

**You’re viewing outdated documentation.** [View the latest Customer’s Canvas On-Premises documentation](https://customerscanvas.com/docs/on-premises/).

# addSurfaces Method

**Applies to:** Customer's Canvas On-Premises; Design Editor 6.15.0, 6.x (may differ) · **Archived documentation**
 
### Callable
 
- addSurfaces(surfaces:  [SurfaceTypes](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.htm.md) []  |  [IStateSurfaces](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.istatesurfaces.htm.md), position?:  number ) :  Promise &lt; [Product](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.product.htm.md) &gt;

- Adds a number of surfaces (pages) to the product.
  
 - example
     - ```
    editor.getProduct()
        // When we get the product.
        .then(function(product) {
            // Add an empty page and the "postcard" template to the beginning.
            product.addSurfaces(
                [{ width: 300, height: 300 }, { designFile: "postcard" }],
                0
            )
            // If there was an error while adding pages to the product.
            .catch(function (error) {
                console.error("Adding surfaces failed with exception: ", error);
            });
        });
    ```

#### Parameters

    - ##### surfaces: [SurfaceTypes](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.htm.md) []  |  [IStateSurfaces](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.istatesurfaces.htm.md) 
  
        An array of surfaces (pages) to add.
    - #####  Optional position: number 
  
        A position in the surface array where new surfaces should be added. The index of the first surface is `0`. By default, this method adds pages to the end of the surface array.

#### Returns Promise &lt; Product &gt;
 
    The product instance where the surfaces (pages) were added.
