---
title: "Update one of your saved model scenarios"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.sureshake.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Sureshake API › entities

`PATCH /v2/entities/{id}/models/{templateKey}/scenarios/{scenarioId}`

## Path parameters

- `id` (`company-model-scenarios-update.path.id`; string, required)
  - format `uuid`
- `templateKey` (`company-model-scenarios-update.path.templateKey`; string, required)
  - minLength 1; maxLength 64
- `scenarioId` (`company-model-scenarios-update.path.scenarioId`; string, required)
  - format `uuid`

## Request body

- `name` (`company-model-scenarios-update.name`; string, optional)
  - minLength 1; maxLength 120
- `assumptions` (`company-model-scenarios-update.assumptions`; map<number>, optional)
- `drivers` (`company-model-scenarios-update.drivers`; object, optional)
  - `revenue_growth` (`company-model-scenarios-update.drivers.revenue_growth`; map<number>, required)
  - `ebitda_margin` (`company-model-scenarios-update.drivers.ebitda_margin`; map<number>, required)
  - `other_income` (`company-model-scenarios-update.drivers.other_income`; map<number>, required)
  - `capex_pct_revenue` (`company-model-scenarios-update.drivers.capex_pct_revenue`; map<number>, required)
  - `nwc_pct_revenue` (`company-model-scenarios-update.drivers.nwc_pct_revenue`; map<number>, required)
  - `da_pct_revenue` (`company-model-scenarios-update.drivers.da_pct_revenue`; map<number>, required)
  - `tax_rate` (`company-model-scenarios-update.drivers.tax_rate`; map<number>, required)

## Example request

```json
{
  "name": "string",
  "assumptions": {
    "property1": 0,
    "property2": 0
  },
  "drivers": {
    "revenue_growth": {
      "property1": 0,
      "property2": 0
    },
    "ebitda_margin": {
      "property1": 0,
      "property2": 0
    },
    "other_income": {
      "property1": 0,
      "property2": 0
    },
    "capex_pct_revenue": {
      "property1": 0,
      "property2": 0
    },
    "nwc_pct_revenue": {
      "property1": 0,
      "property2": 0
    },
    "da_pct_revenue": {
      "property1": 0,
      "property2": 0
    },
    "tax_rate": {
      "property1": 0,
      "property2": 0
    }
  }
}
```

## Code samples

### cURL

```bash
curl --request PATCH \
  --url 'https://api.sureshake.com/v2/entities/<id>/models/<templateKey>/scenarios/<scenarioId>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "string",
  "assumptions": {
    "property1": 0,
    "property2": 0
  },
  "drivers": {
    "revenue_growth": {
      "property1": 0,
      "property2": 0
    },
    "ebitda_margin": {
      "property1": 0,
      "property2": 0
    },
    "other_income": {
      "property1": 0,
      "property2": 0
    },
    "capex_pct_revenue": {
      "property1": 0,
      "property2": 0
    },
    "nwc_pct_revenue": {
      "property1": 0,
      "property2": 0
    },
    "da_pct_revenue": {
      "property1": 0,
      "property2": 0
    },
    "tax_rate": {
      "property1": 0,
      "property2": 0
    }
  }
}
'
```

### TypeScript

```typescript
const url = 'https://api.sureshake.com/v2/entities/<id>/models/<templateKey>/scenarios/<scenarioId>';
const options = {
  method: 'PATCH',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    name: 'string',
    assumptions: {property1: 0, property2: 0},
    drivers: {
      revenue_growth: {property1: 0, property2: 0},
      ebitda_margin: {property1: 0, property2: 0},
      other_income: {property1: 0, property2: 0},
      capex_pct_revenue: {property1: 0, property2: 0},
      nwc_pct_revenue: {property1: 0, property2: 0},
      da_pct_revenue: {property1: 0, property2: 0},
      tax_rate: {property1: 0, property2: 0}
    }
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sureshake.com/v2/entities/<id>/models/<templateKey>/scenarios/<scenarioId>"

payload = {
    "name": "string",
    "assumptions": {
        "property1": 0,
        "property2": 0
    },
    "drivers": {
        "revenue_growth": {
            "property1": 0,
            "property2": 0
        },
        "ebitda_margin": {
            "property1": 0,
            "property2": 0
        },
        "other_income": {
            "property1": 0,
            "property2": 0
        },
        "capex_pct_revenue": {
            "property1": 0,
            "property2": 0
        },
        "nwc_pct_revenue": {
            "property1": 0,
            "property2": 0
        },
        "da_pct_revenue": {
            "property1": 0,
            "property2": 0
        },
        "tax_rate": {
            "property1": 0,
            "property2": 0
        }
    }
}
headers = {"Content-Type": "application/json"}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Default Response

#### Example

```json
{
  "data": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5",
    "templateKey": "string",
    "name": "string",
    "assumptions": {
      "property1": 0,
      "property2": 0
    },
    "drivers": {
      "revenue_growth": {
        "property1": 0,
        "property2": 0
      },
      "ebitda_margin": {
        "property1": 0,
        "property2": 0
      },
      "other_income": {
        "property1": 0,
        "property2": 0
      },
      "capex_pct_revenue": {
        "property1": 0,
        "property2": 0
      },
      "nwc_pct_revenue": {
        "property1": 0,
        "property2": 0
      },
      "da_pct_revenue": {
        "property1": 0,
        "property2": 0
      },
      "tax_rate": {
        "property1": 0,
        "property2": 0
      }
    },
    "shareToken": "string",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  },
  "meta": {
    "timestamp": "2019-08-24T14:15:22Z"
  }
}
```

- `data` (`company-model-scenarios-update.response.200.data`; object, required)
  - `id` (`company-model-scenarios-update.response.200.data.id`; string, required)
    - format `uuid`
  - `entityId` (`company-model-scenarios-update.response.200.data.entityId`; string, required)
    - format `uuid`
  - `templateKey` (`company-model-scenarios-update.response.200.data.templateKey`; string, required)
  - `name` (`company-model-scenarios-update.response.200.data.name`; string, required)
  - `assumptions` (`company-model-scenarios-update.response.200.data.assumptions`; map<number>, required)
  - `drivers` (`company-model-scenarios-update.response.200.data.drivers`; object, required)
    - `revenue_growth` (`company-model-scenarios-update.response.200.data.drivers.revenue_growth`; map<number>, required)
    - `ebitda_margin` (`company-model-scenarios-update.response.200.data.drivers.ebitda_margin`; map<number>, required)
    - `other_income` (`company-model-scenarios-update.response.200.data.drivers.other_income`; map<number>, required)
    - `capex_pct_revenue` (`company-model-scenarios-update.response.200.data.drivers.capex_pct_revenue`; map<number>, required)
    - `nwc_pct_revenue` (`company-model-scenarios-update.response.200.data.drivers.nwc_pct_revenue`; map<number>, required)
    - `da_pct_revenue` (`company-model-scenarios-update.response.200.data.drivers.da_pct_revenue`; map<number>, required)
    - `tax_rate` (`company-model-scenarios-update.response.200.data.drivers.tax_rate`; map<number>, required)
  - `shareToken` (`company-model-scenarios-update.response.200.data.shareToken`; string, required)
  - `createdAt` (`company-model-scenarios-update.response.200.data.createdAt`; string, required)
    - format `date-time`
  - `updatedAt` (`company-model-scenarios-update.response.200.data.updatedAt`; string, required)
    - format `date-time`
- `meta` (`company-model-scenarios-update.response.200.meta`; object, optional)
  - `timestamp` (`company-model-scenarios-update.response.200.meta.timestamp`; string, required)
    - format `date-time`

### 400

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`company-model-scenarios-update.response.400.error`; object, required)
  - `code` (`company-model-scenarios-update.response.400.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`company-model-scenarios-update.response.400.error.message`; string, required) — Human-readable error message
  - `details` (`company-model-scenarios-update.response.400.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`company-model-scenarios-update.response.400.error.traceId`; string, optional) — Unique ID for log correlation

### 401

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`company-model-scenarios-update.response.401.error`; object, required)
  - `code` (`company-model-scenarios-update.response.401.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`company-model-scenarios-update.response.401.error.message`; string, required) — Human-readable error message
  - `details` (`company-model-scenarios-update.response.401.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`company-model-scenarios-update.response.401.error.traceId`; string, optional) — Unique ID for log correlation

### 403

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`company-model-scenarios-update.response.403.error`; object, required)
  - `code` (`company-model-scenarios-update.response.403.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`company-model-scenarios-update.response.403.error.message`; string, required) — Human-readable error message
  - `details` (`company-model-scenarios-update.response.403.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`company-model-scenarios-update.response.403.error.traceId`; string, optional) — Unique ID for log correlation

### 404

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`company-model-scenarios-update.response.404.error`; object, required)
  - `code` (`company-model-scenarios-update.response.404.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`company-model-scenarios-update.response.404.error.message`; string, required) — Human-readable error message
  - `details` (`company-model-scenarios-update.response.404.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`company-model-scenarios-update.response.404.error.traceId`; string, optional) — Unique ID for log correlation

### 409

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`company-model-scenarios-update.response.409.error`; object, required)
  - `code` (`company-model-scenarios-update.response.409.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`company-model-scenarios-update.response.409.error.message`; string, required) — Human-readable error message
  - `details` (`company-model-scenarios-update.response.409.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`company-model-scenarios-update.response.409.error.traceId`; string, optional) — Unique ID for log correlation

### 500

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`company-model-scenarios-update.response.500.error`; object, required)
  - `code` (`company-model-scenarios-update.response.500.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`company-model-scenarios-update.response.500.error.message`; string, required) — Human-readable error message
  - `details` (`company-model-scenarios-update.response.500.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`company-model-scenarios-update.response.500.error.traceId`; string, optional) — Unique ID for log correlation


Source: https://docs.sureshake.com/reference/company-model-scenarios-update/index.md
