A table in the API is an exported table from Position Green where you can design the contents of the table. The format of the response is always the same only varying on the number of columns you have set up when designing the table.
Design a table in Position Green
After receiving a link from Position Green to a table you can select what columns and what filters you require to create a table you want to get using the API.
In the example below all organizational units are exported with their corresponding scope 1, 2 and 3 in each column.

Position Green API Swagger
Below you'll find a description of the tables endpoints. To test the endpoints please go to our Swagger page.
Query tables in API
Returns a list of available tables
GET https://api.positiongreen.com/v1/tables
Retrieves a list of all available tables accessible to the authenticated tenant.
Example Response (200 OK)
[
{
"id": "201b9192-e565-4680-ad64-30fd78dc4b6d",
"name": "API Table 1",
"description": "Scope 1, 2 and 3 overview"
}
]Get data for table (JSON)
Returns data for a specific table with optional date filtering
GET https://api.positiongreen.com/v1/tables/{id}Path Parameters
| Name | Type | Description |
| id* | string (uuid) | Required. The unique identifier of the table. |
Query Parameters
| Name | Type | Description |
| DateFrom | string (date) | Start date for filtering results (inclusive, format: yyyy-MM-dd, e.g. 2023-01-01) |
| DateTo | string (date) | End date for filtering results (inclusive, format: yyyy-MM-dd, e.g. 2023-12-31) |
Example response below for a table. Each row in the table is returned as an object where the column name is the key and the cell value is the property value.
[
{
"Organisatorisk enhet": "Supplier 2",
"Scope 1": 2000,
"Scope 2": 5200,
"Scope 3": 15700
},
{
"Organisatorisk enhet": "Supplier 1",
"Scope 1": 1500,
"Scope 2": 4300,
"Scope 3": 5800
}
]Export table data as CSV
Exports table data in CSV format (.csv) with optional date filtering
GET https://api.positiongreen.com/v1/tables/csv/{id}Path Parameters
| Name | Type | Description |
| id* | string (uuid) | Required. The unique identifier of the table to export. |
Query Parameters
| Name | Type | Description |
| DateFrom | string (date) | Start date for filtering results (inclusive, e.g. 2023-01-01) |
| DateTo | string (date) | End date for filtering results (inclusive, e.g. 2023-12-31) |
Responses
| 200: OK Success | Returns generated CSV file stream (binary content). |
| 400: Bad Request | Invalid date range filter or application error. |
| 401: Unauthorized | Authentication required. |
| 404: Not Found | Table not found with the specified ID. |
| 500: Server Error | Internal server error occurred while generating the export. |
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article