---
title: "Update reporting settings"
---

> 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

`PUT /v2/entities/{id}/settings`

## Path parameters

- `id` (`entity-update-reporting-settings.path.id`; string, required)
  - format `uuid`

## Request body

- `periodType` (`entity-update-reporting-settings.periodType`; string, optional)
  - one of `"weekly"`, `"monthly"`, `"quarterly"`, `"yearly"`
- `defaultPeriodLength` (`entity-update-reporting-settings.defaultPeriodLength`; integer, optional)
  - min 0
- `autoCreatePeriods` (`entity-update-reporting-settings.autoCreatePeriods`; boolean, optional, nullable)
- `periodNamingTemplate` (`entity-update-reporting-settings.periodNamingTemplate`; string, optional)
- `templateId` (`entity-update-reporting-settings.templateId`; string, optional, nullable)
  - format `uuid`
- `periodsInAdvance` (`entity-update-reporting-settings.periodsInAdvance`; integer, optional, nullable)
- `reminderDays` (`entity-update-reporting-settings.reminderDays`; integer, optional, nullable)

## Example request

```json
{
  "periodType": "weekly",
  "defaultPeriodLength": 0,
  "autoCreatePeriods": true,
  "periodNamingTemplate": "string",
  "templateId": "196100ac-4eec-4fb6-a7f7-86c8b584771d",
  "periodsInAdvance": 0,
  "reminderDays": 0
}
```

## Code samples

### cURL

```bash
curl --request PUT \
  --url 'https://api.sureshake.com/v2/entities/<id>/settings' \
  --header 'Content-Type: application/json' \
  --data '
{
  "periodType": "weekly",
  "defaultPeriodLength": 0,
  "autoCreatePeriods": true,
  "periodNamingTemplate": "string",
  "templateId": "196100ac-4eec-4fb6-a7f7-86c8b584771d",
  "periodsInAdvance": 0,
  "reminderDays": 0
}
'
```

### TypeScript

```typescript
const url = 'https://api.sureshake.com/v2/entities/<id>/settings';
const options = {
  method: 'PUT',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    periodType: 'weekly',
    defaultPeriodLength: 0,
    autoCreatePeriods: true,
    periodNamingTemplate: 'string',
    templateId: '196100ac-4eec-4fb6-a7f7-86c8b584771d',
    periodsInAdvance: 0,
    reminderDays: 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>/settings"

payload = {
    "periodType": "weekly",
    "defaultPeriodLength": 0,
    "autoCreatePeriods": True,
    "periodNamingTemplate": "string",
    "templateId": "196100ac-4eec-4fb6-a7f7-86c8b584771d",
    "periodsInAdvance": 0,
    "reminderDays": 0
}
headers = {"Content-Type": "application/json"}

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

print(response.text)
```

## Responses

### 200

Default Response

#### Example

```json
{
  "templateId": "196100ac-4eec-4fb6-a7f7-86c8b584771d",
  "autoCreatePeriods": true,
  "periodsInAdvance": 0,
  "reminderDays": 0,
  "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5",
  "updatedAt": "2019-08-24T14:15:22Z"
}
```

- `entityId` (`entity-update-reporting-settings.response.200.entityId`; string, required)
  - format `uuid`
- `updatedAt` (`entity-update-reporting-settings.response.200.updatedAt`; string, required)
  - format `date-time`
- `templateId` (`entity-update-reporting-settings.response.200.templateId`; string, optional, nullable)
  - format `uuid`
- `autoCreatePeriods` (`entity-update-reporting-settings.response.200.autoCreatePeriods`; boolean, optional, nullable)
- `periodsInAdvance` (`entity-update-reporting-settings.response.200.periodsInAdvance`; integer, optional, nullable)
- `reminderDays` (`entity-update-reporting-settings.response.200.reminderDays`; integer, optional, nullable)

### 400

Default Response

#### Example

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

- `error` (`entity-update-reporting-settings.response.400.error`; object, required)
  - `code` (`entity-update-reporting-settings.response.400.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-update-reporting-settings.response.400.error.message`; string, required) — Human-readable error message
  - `details` (`entity-update-reporting-settings.response.400.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-update-reporting-settings.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` (`entity-update-reporting-settings.response.401.error`; object, required)
  - `code` (`entity-update-reporting-settings.response.401.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-update-reporting-settings.response.401.error.message`; string, required) — Human-readable error message
  - `details` (`entity-update-reporting-settings.response.401.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-update-reporting-settings.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` (`entity-update-reporting-settings.response.403.error`; object, required)
  - `code` (`entity-update-reporting-settings.response.403.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-update-reporting-settings.response.403.error.message`; string, required) — Human-readable error message
  - `details` (`entity-update-reporting-settings.response.403.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-update-reporting-settings.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` (`entity-update-reporting-settings.response.404.error`; object, required)
  - `code` (`entity-update-reporting-settings.response.404.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-update-reporting-settings.response.404.error.message`; string, required) — Human-readable error message
  - `details` (`entity-update-reporting-settings.response.404.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-update-reporting-settings.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` (`entity-update-reporting-settings.response.409.error`; object, required)
  - `code` (`entity-update-reporting-settings.response.409.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-update-reporting-settings.response.409.error.message`; string, required) — Human-readable error message
  - `details` (`entity-update-reporting-settings.response.409.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-update-reporting-settings.response.409.error.traceId`; string, optional) — Unique ID for log correlation

### 422

Default Response

#### Example

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

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

### 429

Default Response

#### Example

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

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

### 500

Default Response

#### Example

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

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

### 503

Default Response

#### Example

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

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


Source: https://docs.sureshake.com/reference/entity-update-reporting-settings/index.md
