> For the complete documentation index, see [llms.txt](https://synconics.gitbook.io/rest-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://synconics.gitbook.io/rest-api/report-printing/print-single-report.md).

# Print Single Report

The report can be printed by giving the name of the report(<mark style="color:orange;">`report_name`</mark>) and a single record id.

**`GET /restapi/1.0/report/{report_name}/{id}`**

**Request:**

<mark style="background-color:orange;">Warning</mark>

<mark style="background-color:orange;">this example needs</mark> <mark style="background-color:orange;"></mark><mark style="background-color:orange;">`account`</mark> <mark style="background-color:orange;"></mark><mark style="background-color:orange;">module installed</mark>

```
GET /restapi/1.0/report/account.report_invoice/12 HTTP/1.1
Host: {your_Odoo_server_url}
```

**JSON Response:**

<mark style="background-color:blue;">**Note**</mark>

<mark style="background-color:blue;">the report is sent as PDF binary data encoded in</mark> [<mark style="background-color:blue;">base64</mark>](https://en.wikipedia.org/wiki/Base64)<mark style="background-color:blue;">, it must be decoded and may need to be saved to disk before use</mark>

```
HTTP/1.1 200 OK

{
  'report': {
      'id': 12,
      'state': 'true',
      'format': 'pdf',
      'result': 'R0lGODlhbgCMAPf\/APbr48VySrxTO7IgKt2qmKQdJeK8lsFjROG5p\
      /nz7Zg3\nMNmnd7Q1MLNVS9GId71hSJMZIuzTu4UtKbeEeakhKMl8U8WYjfr18YQaIbAf\n
      KKwhKdKzqpQtLebFortOOejKrOjZ1Mt7aMNpVbAqLLV7bsNqR+3WwMqEWenN\n
      sZYxL\/Ddy\/Pm2e7ZxLlUQrIjNPXp3bU5MbhENbEtLtqhj5ZQTfHh0bMxL7Ip\n
      NsNyUYkZIrZJPcqGdYIUHb5aPKkeJnoUHd2yiJkiLKYiKLRFOsyJXKVDO8up\n
      osFaS+TBnK4kKti5sNaYg\/z49aqYl5kqLrljUtORfMOlo\/36+H4ZH
      ...
      ...
      ...'
  }
}
```

**XML Response:**

```
HTTP/1.1 200 OK

<report type="dict">
	<id type="int">12</id>
	<state type="bool">true</state>
	<format type="str">pdf</format>
	<result type="str">R0lGODlhbgCMAPf\/APbr48VySrxTO7IgKt2qmKQdJeK8lsFjROG5p\
      /nz7Zg3\nMNmnd7Q1MLNVS9GId71hSJMZIuzTu4UtKbeEeakhKMl8U8WYjfr18YQaIbAf\n
      KKwhKdKzqpQtLebFortOOejKrOjZ1Mt7aMNpVbAqLLV7bsNqR+3WwMqEWenN\n
      sZYxL\/Ddy\/Pm2e7ZxLlUQrIjNPXp3bU5MbhENbEtLtqhj5ZQTfHh0bMxL7Ip\n
      NsNyUYkZIrZJPcqGdYIUHb5aPKkeJnoUHd2yiJkiLKYiKLRFOsyJXKVDO8up\n
      osFaS+TBnK4kKti5sNaYg\/z49aqYl5kqLrljUtORfMOlo\/36+H4ZH
      ...
      ...
       </result>
</report>
```

| 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> |
