# Update Size Guide Endpoint

<p class="callout warning">This endpoint is only available if `aerocargo/size-guides` is installed.</p>

## Structure

### Size Guide

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td><td>**Version**  
</td></tr><tr><td>`type`  
</td><td>string</td><td>The type of the size guide</td><td>No</td><td>`>=2.0.0`  
</td></tr><tr><td>`name`</td><td>string</td><td>The name for the size guide</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`heading`  
</td><td>string</td><td>The heading of the size guide</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`view`  
</td><td>string</td><td>The view of the size guide</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`content`  
</td><td>string</td><td>The content of the size guide</td><td>No</td><td>`>=2.0.0`</td></tr><tr><td>`small_image`</td><td>object</td><td>The Small [Image](https://support.aerocommerce.com/books/api/page/create-size-guide-endpoint#bkmrk-image)</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`medium_image`</td><td>object</td><td>The Medium [Image](https://support.aerocommerce.com/books/api/page/create-size-guide-endpoint#bkmrk-image)</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`large_image`</td><td>object</td><td>The Large [Image](https://support.aerocommerce.com/books/api/page/create-size-guide-endpoint#bkmrk-image)</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`products`  
</td><td>array</td><td>An array of product ids or models</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`manufacturers`  
</td><td>array</td><td>An array of manufacturer ids or names</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`categories`  
</td><td>array</td><td>An array of category ids or breadcrumbs</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`tags`  
</td><td>array</td><td>An array of tag ids or names</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`groups`  
</td><td>array</td><td>An array of [Group](https://support.aerocommerce.com/books/api/page/create-size-guide-endpoint#bkmrk-group) objects</td><td>No</td><td>`>=0.1.0`</td></tr></tbody></table>

**Valid Types:** `image`, `rich_text` &amp; `legacy` (resolved from payload structure if not provided).

### Group

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td><td>**Version**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the size guide group</td><td>No</td><td>`>=0.1.0`  
</td></tr><tr><td>`heading`  
</td><td>string</td><td>The heading of the size guide</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`sections`  
</td><td>array</td><td>An array of [Section](https://support.aerocommerce.com/books/api/page/update-size-guide-endpoint#bkmrk-section) objects</td><td>No</td><td>`>=0.1.0`</td></tr></tbody></table>

### Section

<table border="1" id="bkmrk-name-type-descriptio-2" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td><td>**Version**  
</td></tr><tr><td style="height: 46.5938px;">`id`</td><td style="height: 46.5938px;">int</td><td style="height: 46.5938px;">The id of the size guide section</td><td style="height: 46.5938px;">No</td><td>`>=0.1.0`  
</td></tr><tr><td style="height: 46.5938px;">`heading`  
</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The heading of the size guide section</td><td style="height: 46.5938px;">No</td><td>`>=0.1.0`</td></tr><tr><td style="height: 46.5938px;">`content`  
</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The content of the size guide section</td><td style="height: 46.5938px;">No</td><td>`>=0.1.0`</td></tr></tbody></table>

### Image

<table border="1" id="bkmrk-name-type-descriptio-3" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td><td>**Version**  
</td></tr><tr><td>`src`</td><td>string</td><td>The source url of the image</td><td>Yes</td><td>`>=0.1.0`  
</td></tr></tbody></table>


## Example Request

<details id="bkmrk-example---version-1."><summary>Example - Version 1.x</summary>

```
PUT /api/size-guides/{id}
```

```json
{
    "name": "API Test",
    "heading": "Test",
    "view": "test",
    "products": [],
    "manufacturers": [
        "Burberry"
    ],
    "categories": [
        "Mens > Coats"
    ],
    "tags": [
        "Blue"
    ],
    "groups": [
        {
            "heading": "Group Heading",
            "sections": [
                {
                    "heading": "Section Heading",
                    "content": "Section Content"
                }
            ]
        }
    ]
}
```

</details><details id="bkmrk-example---version-2."><summary>Example - Version 2.x</summary>

```
PUT /api/size-guides/{id}
```

```json
{
    "name": "API Test",
    "heading": "Test",
    "view": "test",
    "content": "Section Content"
    "products": [],
    "manufacturers": [
        "Burberry"
    ],
    "categories": [
        "Mens > Coats"
    ],
    "tags": [
        "Blue"
    ]
}
```

</details>## Example Response

```json
{
    "sizeGuide": {
        "id": 1
    }
}
```