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

# Response shapes

> Choose which properties each object returns with the shape parameter

Every object in a response comes back in full by default: its `id`, its `object` type and all of its `data`. When you need fewer properties, send the `shape` query parameter. The shape sets which properties each object returns, and the shapes with fewer properties allow more objects per page.

| Shape | Returns | Objects per page |
| - | - | - |
| `full` | The object in full. This is the default. | Up to 15 |
| `minimal` | The object's `id` and `object`, without its `data`. | Up to 1,000 |
| `display` | The object's `id` and `object`, and only the fields of its `data` needed to display it in a select list, menu or label, such as its display name. | Up to 1,000 |

Most endpoints that return objects accept `full` and `minimal`, and many also accept `display`. Each endpoint's `shape` parameter in the API reference lists the shapes it accepts, and its response shows the fields each shape returns.

## Minimal

Use `minimal` when you only need IDs, for example to collect every employee's ID before you fetch details for some of them.

**Request**

```bash theme={null}
curl 'https://sandbox.nmbr.co/services/payroll/employees?shape=minimal&per_page=1000' \
--header 'Authorization: Bearer <access_token>'
```

**Response**

```json theme={null}
{
  "object": "list",
  "data": [
    {
      "id": "emp_01JAV10D4QJ3500QANBTTBW9DW",
      "object": "employee"
    },
    {
      "id": "emp_01JAV10F2M8V7K3S6Q9ZPXN4RT",
      "object": "employee"
    }
  ],
  "links": {
    "first": "/employees?page=1",
    "last": "/employees?page=1",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": 1,
    "last_page": 1,
    "per_page": 1000,
    "total": 2,
    "has_more": false
  }
}
```

## Display

Use `display` to show objects by name, for example to fill a select list with a company's pay schedules.

**Request**

```bash theme={null}
curl 'https://sandbox.nmbr.co/services/payroll/pay_schedules?shape=display&per_page=1000' \
--header 'Authorization: Bearer <access_token>'
```

**Response**

```json theme={null}
{
  "object": "list",
  "data": [
    {
      "id": "paysc_01JAV11013A9V4V0F30099BVGH",
      "object": "pay_schedule",
      "data": {
        "title_translated": "Bi-weekly hourly"
      }
    },
    {
      "id": "paysc_01JAV1139RZ2M4D8WQ7X5KHB6N",
      "object": "pay_schedule",
      "data": {
        "title_translated": "Monthly salaried"
      }
    }
  ],
  "links": {
    "first": "/pay_schedules?page=1",
    "last": "/pay_schedules?page=1",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": 1,
    "last_page": 1,
    "per_page": 1000,
    "total": 2,
    "has_more": false
  }
}
```

The fields in `display` depend on the object: a pay schedule returns its title, and an employee returns their first and last names. Each field has the same name and value as in the full object.

## Page size

A list returns 15 objects per page unless you send `per_page`. With the `full` shape, `per_page` can be up to 15. With the `minimal` or `display` shape, it can be up to 1,000. A larger `per_page` returns a `422`. See [Pagination](https://docs.nmbr.co/api/overview/pagination.md).

## What `minimal` and `display` leave out

Neither `minimal` nor `display` includes `created_at`, `updated_at` or related objects, and both ignore `expand`.

## Which endpoints accept `display`

Only `GET` endpoints and search endpoints, such as `POST /work_assignments/search`, can accept `display`. Every other endpoint, such as one that creates, updates or deletes an object, accepts only `full` and `minimal`. Any other shape returns a `422`, and the request changes nothing.

When you create or update an object and only need its `id` back, send `shape=minimal`.

## Errors

An endpoint returns a `422` with an error on `shape` when you send a shape the endpoint doesn't accept.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.