# Read Single Record

Record data is accessible via the [read()](https://www.odoo.com/documentation/16.0/developer/reference/backend/orm.html#odoo.models.Model.read), which takes a single record id and optionally a list of fields to fetch. By default, it will fetch all the fields the current user can read, which tends to be a huge amount.

**`GET /restapi/1.0/object/{object_name}/{id}`**

**Request:**

```
GET /restapi/1.0/object/res.partner/12 HTTP/1.1
Host: {your_Odoo_server_url}
```

**JSON Response:**

```
HTTP/1.1 200 OK

{
  'Partner': {
      'id': 12,
      'name': 'Think Big Systems',
      'street': '89 Lingfield Tower',
      'street2': false,
      'city': 'London',
      'state_id': false,
      'zip': false,
      'country_id': [486, 'United Kingdom'],
      'create_date': '2017-07-10 11:02:57',
      'create_uid': [1, 'Administrator'],
      'write_date': '2017-07-11 15:08:45',
      'write_uid': [1, 'Administrator'],
      ...
      ...
      ...
  }
}
```

**XML Response:**

<pre><code>HTTP/1.1 200 OK

<strong>&#x3C;res.partner type="dict">
</strong>	&#x3C;id type="int">12&#x3C;/id>
	&#x3C;name type="str">Think Big Systems&#x3C;/name>
	&#x3C;street type="str">89 Lingfield Tower&#x3C;/street>
	&#x3C;street2 type="bool">false&#x3C;/street2>
	&#x3C;city type="str">London&#x3C;/city>
	&#x3C;state_id type="bool">false&#x3C;/state_id>
	&#x3C;zip type="bool">false&#x3C;/zip>
	&#x3C;country_id type="list">
		&#x3C;item type="int">486&#x3C;/item>
		&#x3C;item type="str">United Kingdom&#x3C;/item>
	&#x3C;/country_id>
	&#x3C;create_date type="str">2017-07-10 11:02:57&#x3C;/create_date>
	&#x3C;create_uid type="list">
		&#x3C;item type="int">1&#x3C;/item>
		&#x3C;item type="str">Administrator&#x3C;/item>
	&#x3C;/create_uid>
	&#x3C;write_date type="str">2017-07-10 15:02:57&#x3C;/write_date>
	&#x3C;write_uid type="list">
		&#x3C;item type="int">1&#x3C;/item>
		&#x3C;item type="str">Administrator&#x3C;/item>
	&#x3C;/write_uid>
&#x3C;/res.partner>
</code></pre>

**Query Parameters:**

* **fields** – OPTIONAL. list of field names to return (default is all fields).

| Headers and Status Codes | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|  Request Headers         | <ul><li><a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-accept">Accept</a> – the response content type depends on <em>Accept</em> header</li><li><a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-authorization">Authorization</a> – The OAuth protocol parameters to authenticate.</li></ul>                                                                                                                                                                            |
|  Response Headers        | <ul><li><a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type">Content-Type</a> – this depends on <em>Accept</em> header of the request</li></ul>                                                                                                                                                                                                                                                                                                                          |
| Status Codes             | <ul><li><a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok">200 OK</a> – no error</li><li><a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found">404 Not Found</a> – there’s no resource</li><li><a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-401-unauthorized">401 Unauthorized</a> – authentication failed</li><li><a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-403-forbidden">403 Forbidden</a> – if any error raise</li></ul> |

Conversely, picking only three fields deemed interesting.

> **Request:**
>
> ```
> GET /restapi/1.0/object/res.partner/12?fields=['name','country_id'] HTTP/1.1
> Host: {your_Odoo_server_url}
> ```

**JSON Response:**

```
HTTP/1.1 200 OK

{
  'Partner': {
      'id': 12,
      'name': 'Think Big Systems',
      'country_id': [486, 'United Kingdom']
  }
}
```

**Note**

> <mark style="background-color:blue;">even if the</mark> <mark style="background-color:blue;"></mark><mark style="background-color:blue;">`id`</mark> <mark style="background-color:blue;"></mark><mark style="background-color:blue;">field is not requested, it is always returned</mark>
