Returns CPO companies.
This API follows the https://jsonapi.org specification.
API-Key: <your_api_key> (contact sales@chargeprice.net to get access)Content-Type: application/jsonReadSimpleTariffs
The following query parameters are available.
| Name | Type | Presence | Example | Description |
|---|---|---|---|---|
| filter[user_country] | String | optional | “AT” | ISO 3166 country code of the location. If set, promotion info is added to the CPO, if promoted in the country. |
A response contains hundreds of CPO companies.
The following table lists the attributes of a company:
| Name | Type | Example | Description |
|---|---|---|---|
| name | String | “EnBW” | Name of the company |
| meta.promoted | Boolean | true | Indicates if the company is promoted. |
| meta.branding | Hash or null | See below | Branding information of the CPO. |
| meta.branding.logo_url | String | http://cp.com/logo.png | URL to the logo of the CPO. |
GET http://example-base-url.com/v1/companies/cpos?filter[user_country]=AT
Content-Type: application/json
Api-Key: my-secret-key
Body:
{
"data": [
{
"id": "1e49b853-36fc-47ed-9826-97828b5b2fdd",
"type": "company",
"attributes": {
"name": "EnBW"
},
"meta": {
"promoted": true,
"branding": {
"logo_url": "http://cp.com/logo.png"
}
}
},
{
"id": "2a49b853-36fc-47ed-9826-97828b5b2faa",
"type": "company",
"attributes": {
"name": "IONITY"
},
"meta": {
"promoted": false,
"branding": null
}
}
],
"meta": {
"overall_count": 2
}
}
Client provided invalid request body.
{
"errors": [
{
"status": "400",
"code": "BAD_REQUEST",
"title": "..."
}
]
}
{
"errors": [
{
"status": "403",
"code": "FORBIDDEN",
"title": "api_key missing"
}
]
}
An unexpected error happened.
{
"errors": [
{
"status": "500",
"code": "INTERNAL_SERVER_ERROR",
"title": "some error"
}
]
}