# Organization API: Org Staff Views

> Every Organization API operation tagged Org Staff Views.

Source: https://www.coritan.com/docs/api/reference/organizations/org-staff-views/

Base URL: `https://api.coritan.com/api/v1`. Paths below are complete.

To try these requests in the browser, open the [interactive Organization API reference](https://api.coritan.com/docs/org).

## Operations

| Method | Path | Summary |
| --- | --- | --- |
| GET | [`/api/v1/orgs/{org_slug}/staff/views`](#op-get-api-v1-orgs-org-slug-staff-views) | List the saved views you can use: your own, then every view the team shared |
| POST | [`/api/v1/orgs/{org_slug}/staff/views`](#op-post-api-v1-orgs-org-slug-staff-views) | Save the filters of a list under a name |
| PATCH | [`/api/v1/orgs/{org_slug}/staff/views/{view_id}`](#op-patch-api-v1-orgs-org-slug-staff-views-view-id) | Change a view you saved: its name, filters, sharing, pin, schedule or recipients |
| DELETE | [`/api/v1/orgs/{org_slug}/staff/views/{view_id}`](#op-delete-api-v1-orgs-org-slug-staff-views-view-id) | Delete a view you saved |

### List the saved views you can use: your own, then every view the team shared {#op-get-api-v1-orgs-org-slug-staff-views}

`GET /api/v1/orgs/{org_slug}/staff/views`

List the saved views you can use: your own, then every view the team shared.

Each view is `{ id, entity, name, query, shared, pinned, mine, owner_name,
schedule, recipients, created_at, updated_at }`. Your views come first, then
the rest, each group by name. Any member of the organization can read them.
The `recipients` of a report you did not save are shown to billing and
higher only.

#### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `org_slug` | path | string | yes |  |
| `entity` | query | string or null | no | Only the views of one list: customers, servers, orders, invoices, inbox, refunds, coupons, activity, report. Left out, every list. |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Save the filters of a list under a name {#op-post-api-v1-orgs-org-slug-staff-views}

`POST /api/v1/orgs/{org_slug}/staff/views`

Save the filters of a list under a name.

Any member can save a view for themselves, read-only members included.
Sharing a view with the team needs Tier 3 support or higher. Mailing a
report (`schedule` and `recipients`, for `entity` `report` only) needs billing
or higher. You can keep 50 views for each list.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `org_slug` | path | string | yes |

#### Request body

`application/json` (required)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `entity` | string | yes | The list the view belongs to: customers, servers, orders, invoices, inbox, refunds, coupons, activity, report. |
| `name` | string | yes | What the view is called in the menu. |
| `query` | Query | yes | The filters the console keeps in the address for that list, without paging. |
| `shared` | boolean | no | Show the view to the whole team. Needs Tier 3 support or higher. |
| `pinned` | boolean | no | Show the view as a tab beside the menu. |
| `schedule` | string or null | no | `daily` or `weekly`: mail the report. Report views only; needs billing or higher. |
| `recipients` | array of string or null | no | Up to 20 email addresses that get the scheduled report. Report views only; needs billing or higher. |

#### Responses

| Status | Meaning |
| --- | --- |
| `201` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Change a view you saved: its name, filters, sharing, pin, schedule or recipients {#op-patch-api-v1-orgs-org-slug-staff-views-view-id}

`PATCH /api/v1/orgs/{org_slug}/staff/views/{view_id}`

Change a view you saved: its name, filters, sharing, pin, schedule or recipients.

Only the person who saved a view can change it; anyone else gets a 404.
The same rules as saving apply: sharing needs Tier 3 support and mailing a
report needs billing. Send `schedule` as `null` to stop mailing.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `view_id` | path | integer | yes |
| `org_slug` | path | string | yes |

#### Request body

`application/json` (required)

| Field | Type | Required |
| --- | --- | --- |
| `name` | string or null | no |
| `query` | object or null | no |
| `shared` | boolean or null | no |
| `pinned` | boolean or null | no |
| `schedule` | string or null | no |
| `recipients` | array of string or null | no |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Delete a view you saved {#op-delete-api-v1-orgs-org-slug-staff-views-view-id}

`DELETE /api/v1/orgs/{org_slug}/staff/views/{view_id}`

Delete a view you saved. Only the person who saved it can; anyone else gets a 404.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `view_id` | path | integer | yes |
| `org_slug` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |
