---
title: "Create reporting period"
---

> 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

`POST /v2/entities/{id}/periods`

## Path parameters

- `id` (`entity-create-reporting-period.path.id`; string, required)
  - format `uuid`

## Request body

_Required._

- `name` (`entity-create-reporting-period.name`; string, required)
  - minLength 1
- `startDate` (`entity-create-reporting-period.startDate`; string, required)
  - format `date-time`
- `endDate` (`entity-create-reporting-period.endDate`; string, required)
  - format `date-time`
- `periodType` (`entity-create-reporting-period.periodType`; string, required)
  - minLength 1

## Example request

```json
{
  "name": "string",
  "startDate": "2019-08-24T14:15:22Z",
  "endDate": "2019-08-24T14:15:22Z",
  "periodType": "string"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.sureshake.com/v2/entities/<id>/periods' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "string",
  "startDate": "2019-08-24T14:15:22Z",
  "endDate": "2019-08-24T14:15:22Z",
  "periodType": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://api.sureshake.com/v2/entities/<id>/periods';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    name: 'string',
    startDate: '2019-08-24T14:15:22Z',
    endDate: '2019-08-24T14:15:22Z',
    periodType: 'string'
  })
};

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>/periods"

payload = {
    "name": "string",
    "startDate": "2019-08-24T14:15:22Z",
    "endDate": "2019-08-24T14:15:22Z",
    "periodType": "string"
}
headers = {"Content-Type": "application/json"}

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

print(response.text)
```

## Responses

### 200

Default Response

#### Example

```json
{
  "name": "string",
  "startDate": "2019-08-24T14:15:22Z",
  "endDate": "2019-08-24T14:15:22Z",
  "periodType": "string",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5",
  "createdAt": "2019-08-24T14:15:22Z"
}
```

- `name` (`entity-create-reporting-period.response.200.name`; string, required)
  - minLength 1
- `startDate` (`entity-create-reporting-period.response.200.startDate`; string, required)
  - format `date-time`
- `endDate` (`entity-create-reporting-period.response.200.endDate`; string, required)
  - format `date-time`
- `periodType` (`entity-create-reporting-period.response.200.periodType`; string, required)
  - minLength 1
- `id` (`entity-create-reporting-period.response.200.id`; string, required)
  - format `uuid`
- `entityId` (`entity-create-reporting-period.response.200.entityId`; string, required)
  - format `uuid`
- `createdAt` (`entity-create-reporting-period.response.200.createdAt`; string, required)
  - format `date-time`

### 400

Default Response

#### Example

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

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


Source: https://docs.sureshake.com/reference/entity-create-reporting-period/index.md
