/pdf to the endpoint the view reads from. The report shows the endpoint’s data the way the view lays it out - its sections, columns, order and wording - with the TIC header, the subject (for example the company name and organisation number) and the date it was produced.
- The report is rendered on request from the same endpoint, so access checks, masking (for example of protected persons) and the tier are the JSON endpoint’s.
- Reports are not stored and are not orders.
- The pages are in landscape, A4.
Two kinds of report
Views from a GET endpoint
Add/pdf to the path and send a GET request:
Views with a grid (POST endpoints)
Grid endpoints (see Pagination) take a POST with afilterModel and a sortModel. Their reports are a POST to the same path plus /pdf, with the same body, so the report holds the rows the grid shows:
startRow and endRow are ignored. An empty body (or none) means no filter and the endpoint’s default order.
Language
Reports come in
sv and en. A value starting with sv gives sv; any other value gives en.
Response
A successful call returns200 with Content-Type: application/pdf and a Content-Disposition header naming the file after the report and its subject, for example TIC representatives 556677-8899.pdf.
Errors are the JSON endpoint’s: 404 when the subject does not exist or is not accessible, 401 without a valid API key and 403 when the team’s tier does not include the endpoint.
Row limit
A report holds at most 1,000 rows per table. When a result has more, the report says so above the rows:- For a list, it gives the number of rows shown and the total.
- For a grid, whose total is not known in advance, it says that the result has more rows. Narrow the result with
filterModelto include the rest.