
# List Fields

```
GET /api/v1/objects/:id/fields
```

Returns an object's fields in the order they show on a record. Retired fields are left out unless you ask for them.

CLI: [`fob-mdm fields list`](/docs/cli/fields#fields-list)

## Path Parameters

| Parameter | Type | Description |
|---|---|---|
| `id` | number | Object id |

## Query Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `include_retired` | boolean | `false` | `true` to include retired fields |
| `page` | number | `1` | Page number |
| `limit` | number | `100` | Items per page (max 500) |
| `fields` | string | `all` | Comma-separated fields to return |

## Example Request

```bash
curl -X GET "https://mdm.finopsbricks.com/api/v1/objects/1/fields" \
  -H "api-key: $MDM_API_KEY" \
  -H "api-secret: $MDM_API_SECRET"
```

## Response

`200 OK`

```json
{
  "data": [
    {
      "id": 11,
      "object": 1,
      "key": "gstin",
      "label": "GSTIN",
      "type": "text",
      "required": false,
      "is_identity": true,
      "position": 2,
      "retired_at": null,
      "created_at": "2026-11-26T07:20:08.000Z",
      "updated_at": "2026-11-26T07:20:08.000Z"
    }
  ],
  "page_context": {
    "count": 1,
    "page": 1,
    "per_page": 100,
    "total": 1,
    "has_more": false
  }
}
```

## Errors

| Status | Code | When |
|---|---|---|
| 401 | `UNAUTHORIZED` | Missing, wrong or expired API credentials |
| 403 | `FORBIDDEN` | The key lacks `fields:read` permission |
| 404 | `NOT_FOUND` | No such object in your organization |

See [Errors](/docs/api/errors) for the envelope.
