### Example HTTP GET Request Source: https://github.com/chargeprice/chargeprice-api-docs/blob/master/api/v1/my_best_tariffs/show.md An example HTTP GET request to retrieve tariff information for a specific ID. Ensure to include the 'Api-Key' header for authentication. ```http GET http://example-base-url.com/v1/my_best_tariffs/682b8b0e-ae9d-45ca-9cac-fc46566538dd Content-Type: application/json Api-Key: my-secret-key ``` -------------------------------- ### Request Company List Source: https://github.com/chargeprice/chargeprice-api-docs/blob/master/api/v1/companies/index.md Example of a GET request to retrieve a paginated list of companies. ```http GET http://example-base-url.com/v1/companies?page[number]=1&page[size]=1 Content-Type: application/json Api-Key: my-secret-key ``` -------------------------------- ### Retrieve Vehicles via HTTP GET Source: https://github.com/chargeprice/chargeprice-api-docs/blob/master/api/v2/vehicles/index.md Example request to fetch vehicle data from the Chargeprice API using an API key. ```http GET http://example-base-url.com/v2/vehicles Content-Type: application/json Api-Key: my-secret-key ``` -------------------------------- ### GET /v1/advertisements Request Example Source: https://github.com/chargeprice/chargeprice-api-docs/blob/master/api/v1/advertisements/index.md Use this to fetch advertisements. Ensure the 'filter[country]' parameter is set to a valid ISO 3166 country code. The 'Api-Key' header is required for authentication. ```http GET http://example-base-url.com/v1/advertisements?filter[country]=AT Content-Type: application/json Api-Key: my-secret-key ``` -------------------------------- ### GET /v1/tariffs Source: https://context7.com/chargeprice/chargeprice-api-docs/llms.txt Retrieve all available charging tariffs. ```APIDOC ## GET /v1/tariffs ### Description Retrieve a list of all available charging tariffs with metadata. ### Method GET ### Endpoint https://api.chargeprice.app/v1/tariffs ``` -------------------------------- ### Retrieve Country Charging Statistics Source: https://context7.com/chargeprice/chargeprice-api-docs/llms.txt Get aggregated infrastructure data for specific countries, years, and months. ```bash curl -X GET "https://api.chargeprice.app/v1/country_statistics?\ filter[country]=DE,AT,FR&filter[year]=2024&filter[month]=6" \ -H "API-Key: your-api-key" ``` -------------------------------- ### Charging station photos response examples Source: https://github.com/chargeprice/chargeprice-api-docs/blob/master/api/v1/charging_stations/photos/index.md JSON response bodies for successful requests and various error scenarios. ```json { "data": [ { "id": "20006f18-3ed4-4715-92b5-08e37e6dd18c", "type": "charging_station_photo", "attributes": { "created_at": 1546297200000, "source": "chargeprice", "source_label": "Chargeprice Community", "source_url": "https://www.chargeprice.net", "url": "https://www.my-photos.com/20006f18-3ed4-4715-92b5-08e37e6dd18c.jpg", }, "relationships": { "author": { "data": { "type": "user", "id": "ae62cd2d-f29d-4107-b087-6d4f75261cca" } } } } ] } ``` ```json { "errors": [ { "status": "400", "code": "BAD_REQUEST", "title": "..." } ] } ``` ```json { "errors": [ { "status": "403", "code": "FORBIDDEN", "title": "api_key missing" } ] } ``` ```json { "errors": [ { "status": "500", "code": "INTERNAL_SERVER_ERROR", "title": "some error" } ] } ``` -------------------------------- ### API Response Examples Source: https://github.com/chargeprice/chargeprice-api-docs/blob/master/api/v1/tariff_details/index.md Standard JSON response formats for successful requests and various error conditions. ```json { "data": [ { "id": "40006f18-3ed4-4715-92b5-08e37e6dd18c", "type": "station_tariff_details", "attributes": { "updated_at": 1546300800000, "tariff_level": "country", "is_roaming": true, "restricted_segments": [ { "dimension": "kwh", "price": 2.0, "range_gte": null, "range_lt": null, "billing_increment": 0.01, "currency": "EUR", "time_of_day_start": null, "time_of_day_end": null, "charge_point_powers": [ 0.0, 22.0 ], "charge_point_energy_type": "ac", "car_ac_phase": 2, "charge_point_power_is_range": true, "use_consumed_charging_power": false, "is_average_price": false, "occupancy_gte": 20, "occupancy_lt": 80 } ], "no_price_reason": "prices_per_station", "prices_per_station_available": false }, "relationships": { "emp": { "data": { "type": "company", "id": "10006f18-3ed4-4715-92b5-08e37e6dd18c" } }, "tariff": { "data": { "type": "tariff", "id": "20006f18-3ed4-4715-92b5-08e37e6dd18c" } }, "cpo": { "data": { "type": "company", "id": "50006f18-3ed4-4715-92b5-08e37e6dd18c" } }, "station": { "data": { "type": "charging_station", "id": "95006f18-3ed4-4715-92b5-08e37e6dd1aa" } } } } ], "included": [ { "id": "10006f18-3ed4-4715-92b5-08e37e6dd18c", "type": "company", "attributes": { "name": "Energie Steiermark", } }, { "id": "20006f18-3ed4-4715-92b5-08e37e6dd18c", "type": "tariff", "attributes": { "name": "easyFlex", "total_monthly_fee": 5.0, "is_direct_payment": false, "is_card_payment": false, "provider_customer_only": false, "existing_customer_only": false, "allowed_customer_countries": ["AT"], "currency": "EUR", "url": "http://www.google.at" }, "relationships": { "vehicle_brands": { "data": [ { "id": "50006f11-3ed4-4715-92b5-08e37e6dd185", "type": "brand" } ] } } } ] } ``` ```json { "errors": [ { "status": "400", "code": "BAD_REQUEST", "title": "..." } ] } ``` ```json { "errors": [ { "status": "403", "code": "FORBIDDEN", "title": "api_key missing" } ] } ``` ```json { "errors": [ { "status": "500", "code": "INTERNAL_SERVER_ERROR", "title": "some error" } ] } ``` -------------------------------- ### Basic Authentication Header Source: https://github.com/chargeprice/chargeprice-api-docs/blob/master/imports/tariffs/csv_api.md Example of an Authorization header for basic authentication. This header might be used to protect the API. ```http Authorization: Basic ``` -------------------------------- ### Example 1: kWh price with blocking fee and session fee Source: https://github.com/chargeprice/chargeprice-api-docs/blob/master/imports/tariffs/csv_per_evse_party_api.md Demonstrates how to set up a pricing structure for DC energy with a session fee, energy fee, and time-based fee. ```APIDOC ## Example 1: kWh price with blocking fee and session fee ### Description This example illustrates a pricing configuration for DC charging, including a flat session fee, a per-kWh energy fee, and a per-minute fee after an initial duration. ### Tariff Details - EVSE Party ID: AT*ION - Energy Type: DC - Power Start & End: All - Country: Austria - Tariff Components: - 0.35€/session - 0.5€/kWh - 0.1€/min after 1h until 3h ### Request Body Example ```json [ { "evse_party_id": "AT*ION", "energy_type": "DC", "country_code": "AT", "currency": "EUR", "dimension": "FLAT", "price": 0.35 }, { "evse_party_id": "AT*ION", "energy_type": "DC", "country_code": "AT", "currency": "EUR", "dimension": "ENERGY", "price": 0.5 }, { "evse_party_id": "AT*ION", "energy_type": "DC", "country_code": "AT", "currency": "EUR", "dimension": "TIME", "price": 6, "min_duration": 3600, "max_duration": 10800 } ] ``` ``` -------------------------------- ### Example 2: Day and night price Source: https://github.com/chargeprice/chargeprice-api-docs/blob/master/imports/tariffs/csv_per_evse_party_api.md Shows how to configure different prices for AC charging based on the time of day (day vs. night rates). ```APIDOC ## Example 2: Day and night price ### Description This example demonstrates setting up time-based pricing for AC charging, with different rates for daytime (06:00-22:00) and nighttime (22:00-06:00). ### Tariff Details - EVSE Party ID: FR*FR1 - Energy Type: AC - Power Start & End: 11.1 - 22 kW - Country: France - Tariff Components: - 0.2€/min 06:00-22:00 - 0.1€/min 22:00-06:00 ### Request Body Example ```json [ { "evse_party_id": "FR*FR1", "energy_type": "AC", "power_start": 11.1, "power_end": 22, "country_code": "FR", "currency": "EUR", "dimension": "TIME", "price": 12, "start_time": "06:00:00", "end_time": "22:00:00" }, { "evse_party_id": "FR*FR1", "energy_type": "AC", "power_start": 11.1, "power_end": 22, "country_code": "FR", "currency": "EUR", "dimension": "TIME", "price": 6, "start_time": "22:00:00", "end_time": "06:00:00" } ] ``` ``` -------------------------------- ### Configure kWh price with blocking and session fees Source: https://github.com/chargeprice/chargeprice-api-docs/blob/master/imports/tariffs/csv_per_evse_party_api.md Example configuration for a DC charging session in Austria including a flat session fee, energy price, and a time-based blocking fee. ```markdown | evse_party_id | energy_type | power_start | power_end | country_code | currency | dimension | price | min_duration | max_duration | start_time | end_time | step_size | start_date | end_date | days_of_week | |---------------|-------------|-------------|-----------|--------------|----------|-----------|-------|--------------|--------------|------------|----------|-----------|------------|----------|--------------| | AT*ION | DC | | | AT | EUR | FLAT | 0.35 | | | | | | | | | | AT*ION | DC | | | AT | EUR | ENERGY | 0.5 | | | | | | | | | | AT*ION | DC | | | AT | EUR | TIME | 6 | 3600 | 10800 | | | | | | | ``` -------------------------------- ### Get bulk price previews Source: https://context7.com/chargeprice/chargeprice-api-docs/llms.txt Calculate the best charging prices for multiple stations by providing vehicle, tariff, and charging parameters. ```bash curl -X POST "https://api.chargeprice.app/v1/charge_prices/bulk" \ -H "API-Key: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "data": { "type": "bulk_price_preview_request", "attributes": { "battery_range": [20.0, 80.0], "start_time": 720, "currency": "EUR", "allow_unbalanced_load": true, "include_direct_payment": true, "charge_points_power_lte": 350 }, "relationships": { "tariffs": { "data": [ { "id": "14adf982-4e41-431b-833a-dfa89b484c75", "type": "tariff" }, { "id": "24adf982-4e41-431b-833a-dfa89b484c76", "type": "tariff" } ] }, "charging_stations": { "data": [ { "id": "c6adf982-4e41-431b-833a-dfa89b484c75", "type": "charging_station" }, { "id": "d7bef093-5f52-542c-944c-efb90c595d86", "type": "charging_station" } ] }, "vehicle": { "data": { "id": "46adf982-4e41-431b-833a-dfa89b484c71", "type": "car" } } } } }' ``` -------------------------------- ### GET /v1/country_statistics Source: https://context7.com/chargeprice/chargeprice-api-docs/llms.txt Get aggregated statistics about charging infrastructure per country including charge point counts and top CPOs. ```APIDOC ## GET /v1/country_statistics ### Description Get aggregated statistics about charging infrastructure per country including charge point counts and top CPOs. ### Method GET ### Endpoint https://api.chargeprice.app/v1/country_statistics ### Parameters #### Query Parameters - **filter[country]** (string) - Optional - Comma-separated list of country codes - **filter[year]** (integer) - Optional - Year for statistics - **filter[month]** (integer) - Optional - Month for statistics ### Response #### Success Response (200) - **data** (array) - List of country statistics objects - **meta** (object) - Metadata including overall_count ``` -------------------------------- ### Configure day and night time-based pricing Source: https://github.com/chargeprice/chargeprice-api-docs/blob/master/imports/tariffs/csv_per_evse_party_api.md Example configuration for AC charging in France with different time-based rates applied during day and night hours. ```markdown | evse_party_id | energy_type | power_start | power_end | country_code | currency | dimension | price | min_duration | max_duration | start_time | end_time | step_size | start_date | end_date | days_of_week | start_charging_link | |---------------|-------------|-------------|-----------|--------------|----------|-----------|-------|--------------|--------------|------------|----------|-----------|------------|----------|--------------|---------------------| | FR*FR1 | DC | 11.1 | 22 | FR | EUR | TIME | 12 | | | 06:00:00 | 22:00:00 | | | | | | | FR*FR1 | DC | 11.1 | 22 | FR | EUR | TIME | 6 | | | 22:00:00 | 06:00:00 | | | | | | ``` -------------------------------- ### Delete Tariff Request Example Source: https://github.com/chargeprice/chargeprice-api-docs/blob/master/api/internal/v2/tariffs/delete.md Example of an HTTP DELETE request to remove a specific tariff by its ID. Ensure to include the Content-Type and Api-Key headers. ```http DELETE http://example-base-url.com/v2/tariffs/2e49b853-36fc-47ed-9826-97828b5b2fdd Content-Type: application/json Api-Key: my-secret-key ``` -------------------------------- ### List all charging tariffs Source: https://context7.com/chargeprice/chargeprice-api-docs/llms.txt Fetch a list of all available charging tariffs including provider details and metadata. ```bash curl -X GET "https://api.chargeprice.app/v1/tariffs" \ -H "API-Key: your-api-key" \ -H "Content-Type: application/json" ``` -------------------------------- ### GET /v1/users/:user_id/settings Source: https://github.com/chargeprice/chargeprice-api-docs/blob/master/api/v1/users/settings/show.md Retrieves the settings for a specific user. ```APIDOC ## GET /v1/users/:user_id/settings ### Description Gets the settings of a user. This API follows the https://jsonapi.org specification. ### Method GET ### Endpoint /v1/users/:user_id/settings ### Headers * `API-Key: ` (contact sales@chargeprice.net to get access) * `Authorization: Bearer ` (Link to Authentication API docs **TBD**) * `Content-Type: application/json` ### Authorization Group `ReadWriteUserSettings` ``` -------------------------------- ### Export All Charging Stations with Pagination Source: https://github.com/chargeprice/chargeprice-api-docs/blob/master/guides/exporting_all_charging_stations.md Use `export=true` and `page[size]=1000` to fetch all charging stations. Increment `page[number]` sequentially until `meta.more_available` is false. Call requests sequentially, not in parallel. ```HTTP /v1/charging_stations?export=true&page[number]=1&page[size]=1000 ``` ```HTTP /v1/charging_stations?export=true&&page[number]=2&page[size]=1000 ``` ```HTTP /v1/charging_stations?export=true&&page[number]=3&page[size]=1000 ``` ```HTTP /v1/charging_stations?export=true&page[number]=123&page[size]=1000 ``` -------------------------------- ### GET /v1/companies Source: https://github.com/chargeprice/chargeprice-api-docs/blob/master/api/v1/companies/index.md Retrieves a list of companies. Supports pagination. ```APIDOC ## GET /v1/companies ### Description Retrieves a list of companies. Supports pagination. ### Method GET ### Endpoint /v1/companies ### Query Parameters - **page[number]** (integer) - Optional - The page number to retrieve. - **page[size]** (integer) - Optional - The number of items per page. ### Request Example ```http GET http://example-base-url.com/v1/companies?page[number]=1&page[size]=1 Content-Type: application/json Api-Key: my-secret-key ``` ### Response #### Success Response (200) - **data** (Array) - An array of company objects. - **id** (String) - Unique identifier for the company. - **type** (String) - The type of the resource, always "company". - **attributes** (Object) - Contains the company's attributes. - **name** (String) - Name of the company. - **created_at** (Timestamp) - Creation time of the resource (milliseconds since 1.1.1970). - **updated_at** (Timestamp) - Last update of the resource (milliseconds since 1.1.1970). - **version** (Integer) - Current lock version. - **url** (String) - E-Mobility website of the company. - **is_cpo** (Boolean) - True if the company is a charge point operator. - **is_emp** (Boolean) - True if the company is an e-mobility service provider. - **external_source_mapping** (Hash) - Names or IDs in external data sources. - **evse_operator_ids** (Array) - All eMI3 EVSE Operator (CPO) IDs of this company. - **supported_emps** (Array) - All EMP companies connected to this CPO. - **cpo_group** (Relationship) - When a company is part of a bigger charging network. - **emp_group** (Relationship) - When a company shares roaming partners. - **meta** (Object) - Metadata about the response. - **overall_count** (Integer) - Total number of companies available. #### Response Example ```json { "data": [ { "id": "1e49b853-36fc-47ed-9826-97828b5b2fdd", "type": "company", "attributes": { "name": "EnBW", "created_at": 1546297200000, "updated_at": 1546297200000, "version": 1, "url": "http://www.energy.com", "is_cpo": true, "is_emp": true, "external_source_mapping": { "plugsurfing_ids": null, "going_electric_names": [ "EnBW" ], "going_electric_charge_card_ids": null, "google_sheet_names": null, "open_charge_map_operator_ids": null, "evse_operator_ids": ["AT*ION"] } }, "relationships": { "supported_emps": { "data": [ { "type": "company", "id": "2e49b853-36fc-47ed-9826-97828b5b2fdd" } ] }, "cpo_group": { "data": { "id": "1c49b853-36fc-47ed-9826-97828b5b2faa", "type": "company" } }, "emp_group": { "data": { "id": "1c49b853-36fc-47ed-9826-97828b5b2faa", "type": "company" } } } } ], "meta": { "overall_count": 3 } } ``` #### Error Response (400 Bad Request) Client provided invalid request body. ```json { "errors": [ { "status": "400", "code": "BAD_REQUEST", "title": "..." } ] } ``` ``` -------------------------------- ### POST /user_settings Source: https://github.com/chargeprice/chargeprice-api-docs/blob/master/api/v1/users/settings/upsert.md Create or update user settings including purchase information and vehicle data. ```APIDOC ## POST /user_settings ### Description Create or update user settings, including active Android/iOS purchases and vehicle configurations. ### Method POST ### Endpoint /user_settings ### Request Body - **id** (UUID) - Required - Client-side generated UUIDv4 for create, or existing resource ID for update. - **type** (String) - Required - Must be 'user_settings'. - **android_purchases** (Array) - Optional - List of active Android purchases. - **android_purchases.purchase_token** (String) - Required - purchaseToken from Google Play Store. - **android_purchases.product_id** (String) - Required - productId from Google Play Store (e.g., 'premium'). - **ios_purchases** (Array) - Optional - List of active iOS purchases. - **ios_purchases.receipt_data** (String) - Required - receiptData from Apple App Store. - **ios_purchases.original_transaction_id** (String) - Required - original_transaction_id from Apple App Store. - **version** (Integer) - Required - Lock version. 1 on create, incremented for updates. - **vehicle** (Relationship) - Required - The current selected vehicle of the user. - **available_vehicles** (Relationship) - Required - All vehicles added to the user profile (max 20). ### Request Example { "id": "1e49b853-36fc-47ed-9826-97828b5b2fdd", "type": "user_settings", "version": 1, "vehicle": {"id": "some-uuid", "type": "car"}, "available_vehicles": [{"id": "some-uuid", "type": "car"}] } ``` -------------------------------- ### Response Body (201 Created) Source: https://github.com/chargeprice/chargeprice-api-docs/blob/master/api/v1/users/product/create.md The successful response containing the created user product details. ```json { "data": { "id": "20006f18-3ed4-4715-92b5-08e37e6dd18c", "type": "user_products", "attributes": { "products" : [ "web_pro", "mobile_premium" ] } } } ``` -------------------------------- ### API Error Handling Examples Source: https://context7.com/chargeprice/chargeprice-api-docs/llms.txt Examples of common API error responses following the JSON:API format. Includes status codes, error codes, and titles for various issues like bad requests, forbidden access, not found resources, and internal server errors. ```json # 400 Bad Request - Invalid request body or parameters # { # "errors": [{ # "status": "400", # "code": "BAD_REQUEST", # "title": "Invalid battery_range format" # }] # } ``` ```json # 403 Forbidden - API key missing, invalid, or unauthorized # { # "errors": [{ # "status": "403", # "code": "FORBIDDEN", # "title": "api_key missing" # }] # } ``` ```json # 404 Not Found - Resource not found # { # "errors": [{ # "status": "404", # "code": "NOT_FOUND", # "title": "No currency with iso ATS" # }] # } ``` ```json # 500 Internal Server Error - Unexpected server error # { # "errors": [{ # "status": "500", # "code": "INTERNAL_SERVER_ERROR", # "title": "An unexpected error occurred" # }] # } ``` -------------------------------- ### GET /v2/vehicle_brands Source: https://github.com/chargeprice/chargeprice-api-docs/blob/master/api/v2/vehicle_brands/index.md Retrieves a list of all supported electric vehicle brands. ```APIDOC ## GET /v2/vehicle_brands ### Description Returns all brands of all supported electric vehicles. This API follows the https://jsonapi.org specification. ### Method GET ### Endpoint /v2/vehicle_brands ### Request Example ```http GET http://example-base-url.com/v2/vehicle_brands Content-Type: application/json Api-Key: my-secret-key ``` ### Response #### Success Response (200) - **data** (array) - List of vehicle brand objects - **id** (string) - Unique identifier for the brand - **type** (string) - Resource type (vehicle_brand) - **attributes** (object) - Contains brand details - **name** (string) - Name of the vehicle brand - **meta** (object) - Metadata including overall_count #### Response Example ```json { "data": [ { "id": "a43d2607-eead-46c2-9fd5-2ebd3c49d895", "type": "vehicle_brand", "attributes": { "name": "Audi" } } ], "meta": { "overall_count": 2 } } ``` ``` -------------------------------- ### Calculate Charge Prices with Energy and Duration Source: https://context7.com/chargeprice/chargeprice-api-docs/llms.txt Calculates charging costs for specific tariffs at a station using energy and duration parameters. Requires an API key and valid station coordinates. ```bash curl -X POST "https://api.chargeprice.app/v1/charge_prices" \ -H "API-Key: your-api-key" \ -H "Content-Type: application/json" \ -H "Accept-Language: en" \ -d '{ "data": { "type": "charge_price_request", "attributes": { "data_adapter": "chargeprice", "station": { "longitude": 14.13117, "latitude": 48.289453, "country": "AT", "network": "6e62cd2d-f29d-4107-b087-6d4f75261cce", "charge_points": [ { "power": 50, "plug": "ccs" }, { "power": 22, "plug": "type2" } ] }, "options": { "energy": 30, "duration": 45, "start_time": 720, "currency": "EUR", "max_monthly_fees": 10, "show_price_unavailable": false } }, "relationships": { "tariffs": { "data": [ { "id": "c6adf982-4e41-431b-833a-dfa89b484c75", "type": "tariff" } ], "meta": { "include": "filter" } } } } }' ``` -------------------------------- ### GET /v2/tariffs Source: https://github.com/chargeprice/chargeprice-api-docs/blob/master/api/internal/v2/tariffs/index.md Retrieves a list of tariffs with filtering and pagination options. ```APIDOC ## GET /v2/tariffs ### Description Retrieves a list of tariffs. Supports filtering by EMP ID and pagination. ### Method GET ### Endpoint /v2/tariffs ### Query Parameters - **page[number]** (Integer) - Optional - The page number to retrieve. - **page[size]** (Integer) - Optional - The number of items per page. - **filter[emp.id]** (String) - Optional - The ID of the EMP to filter tariffs by. ### Request Example ```http GET http://example-base-url.com/v2/tariffs?page[number]=1&page[size]=1&filter[emp.id]=2e49b853-36fc-47ed-9826-97828b5b2fdd Content-Type: application/json Api-Key: my-secret-key ``` ### Response #### Success Response (200) - **prices.decomposition.currency** (String) - The currency of this component. Overrules the `currency` of the tariff. For any combination of prices, all values defined in the price segment which currently apply, need to have the same currency! - **prices.decomposition.time_of_day_start** (Integer) - Time of day when this segment starts to count or gets active. Default: 720. - **prices.decomposition.time_of_day_end** (Integer) - Time of day when this segment stops to count or be active. Default: 720. - **prices.decomposition.is_average_price** (Boolean) - If true, the price is not applied to the whole network of a CPO, but it is just an average price from all POIs. Default: true. - **prices.decomposition.occupancy_gte** (Integer or null) - Inclusive minimum occupancy rate (in percent) of the charging site to activate this segment. If `null`, segment is active always. Default: 20. - **prices.decomposition.occupancy_lt** (Integer or null) - Exclusive maximum occupancy rate (in percent) of the charging site to activate this segment. If `null`, segment is active always. Default: 80. - **vehicle_brands** (Relationship Array) - Only owners of these vehicle brands are allowed to subscribe to this tariff. - **super_tariffs** (Relationship Array) - Only allowed for `sub_tariff`. To which tariffs this sub tariff counts to. - **emp** (Relationship) - Owner EMP of the tariff. - **cpo** (Relationship) - Only allowed for `sub_tariff`. CPO to which this tariff applies to. #### Response Example (Response example not provided in the source text) ``` -------------------------------- ### GET /tariffs-csv Source: https://github.com/chargeprice/chargeprice-api-docs/blob/master/imports/tariffs/csv_api.md The endpoint used by Chargeprice to consume tariff data from the EMSP. ```APIDOC ## GET /tariffs-csv ### Description Retrieves the full list of tariffs for all EVSEs in CSV format. This endpoint is consumed regularly by Chargeprice to synchronize price data. ### Method GET ### Endpoint [Configurable by EMSP] ### Response #### Success Response (200) - **Content-Type** (header) - Must be text/csv - **Body** (CSV) - A semicolon-separated CSV file where each row represents a single price component for an EVSE. The first line must contain headers. ``` -------------------------------- ### POST /v1/users/:user_id/product Source: https://github.com/chargeprice/chargeprice-api-docs/blob/master/api/v1/users/product/create.md Purchase a new product for a user by providing a product source. This endpoint follows the JSON:API specification. ```APIDOC ## POST /v1/users/:user_id/product ### Description Purchase a new product for a user, given a product source. ### Method POST ### Endpoint /v1/users/:user_id/product ### Parameters #### Path Parameters - **user_id** (String) - Required - The unique identifier of the user. #### Request Body - **type** (String) - Required - Type of the resource (must be "user_product"). - **source** (Object) - Required - Source how the product is activated. - **type** (String) - Required - Type of the source (e.g., "emc_membership"). - **member_number** (String) - Required - The member number of the EMC membership. - **card_number** (String) - Required - The card number of the EMC membership. ### Request Example { "data": { "type": "user_products", "attributes": { "source": { "type": "emc_membership", "member_number": "123456789", "card_number": "987654321" } } } } ### Response #### Success Response (201) - **id** (String) - The unique identifier of the created resource. - **type** (String) - The resource type. - **attributes** (Object) - Contains the list of products. - **products** (Array) - List of products available to the user. #### Response Example { "data": { "id": "20006f18-3ed4-4715-92b5-08e37e6dd18c", "type": "user_products", "attributes": { "products": ["web_pro", "mobile_premium"] } } } ``` -------------------------------- ### POST /v1/charge_prices/bulk Source: https://github.com/chargeprice/chargeprice-api-docs/blob/master/api/v1/charge_prices/bulk/index.md This endpoint allows for bulk preview of charge prices. It requires authentication via an API-Key and accepts a JSON payload with details about the charging session, including battery range, start time, currency, and associated tariffs, charging stations, and vehicles. ```APIDOC ## POST /v1/charge_prices/bulk ### Description Retrieves a bulk preview of charge prices based on specified criteria. ### Method POST ### Endpoint /v1/charge_prices/bulk ### Query Parameters - **page[prices.size]** (integer) - Optional - Specifies the size of the prices page. ### Request Body - **data** (object) - Required - The main object containing the request details. - **type** (string) - Required - The type of the request, should be "bulk_price_preview_request". - **attributes** (object) - Required - Contains the attributes for the price preview. - **battery_range** (array of numbers) - Required - The minimum and maximum battery charge percentage. - **start_time** (integer) - Required - The start time of the charging session in minutes from midnight. - **currency** (string) - Required - The currency code (e.g., "EUR"). - **allow_unbalanced_load** (boolean) - Optional - Whether to allow unbalanced load. - **include_direct_payment** (boolean) - Optional - Whether to include direct payment options. - **charge_points_power_lte** (integer) - Optional - The maximum power of the charging points in kW. - **relationships** (object) - Required - Defines relationships to other resources. - **tariffs** (object) - Required - Information about the tariffs. - **data** (array of objects) - Required - List of tariff objects. - **id** (string) - Required - The ID of the tariff. - **type** (string) - Required - The type of the resource, should be "tariff". - **charging_stations** (object) - Required - Information about the charging stations. - **data** (array of objects) - Required - List of charging station objects. - **id** (string) - Required - The ID of the charging station. - **type** (string) - Required - The type of the resource, should be "charging_station". - **vehicle** (object) - Required - Information about the vehicle. - **data** (object) - Required - The vehicle object. - **id** (string) - Required - The ID of the vehicle. - **type** (string) - Required - The type of the resource, should be "car". ### Request Example ```json { "data": { "type": "bulk_price_preview_request", "attributes": { "battery_range": [20.0,80.0], "start_time": 720, "currency": "EUR", "allow_unbalanced_load": true, "include_direct_payment": true, "charge_points_power_lte": 22 }, "relationships": { "tariffs": { "data": [ { "id": "14adf982-4e41-431b-833a-dfa89b484c75", "type": "tariff" } ] }, "charging_stations": { "data": [ { "id": "c6adf982-4e41-431b-833a-dfa89b484c75", "type": "charging_station" } ] }, "vehicle": { "data": { "id": "46adf982-4e41-431b-833a-dfa89b484c71", "type": "car" } } } } } ``` ### Response #### Success Response (200) - **data** (array of objects) - A list of charge price previews. - **id** (string) - The ID of the charge price preview. - **type** (string) - The type of the resource, should be "charge_price_preview". - **attributes** (object) - The attributes of the charge price preview. - **energy** (number) - The energy consumed in kWh. - **duration** (number) - The duration of the charging session in hours. - **price** (number) - The calculated price. - **currency** (string) - The currency code. - **relationships** (object) - Relationships to other resources. - **charging_station** (object) - Information about the charging station. - **data** (object) - The charging station object. - **id** (string) - The ID of the charging station. - **type** (string) - The type of the resource, should be "charging_station". #### Response Example (200 OK) ```json { "data": [ { "id": "123", "type": "charge_price_preview", "attributes": { "energy": 38.5, "duration": 45.0, "price": 12.0, "currency": "EUR" }, "relationships": { "charging_station": { "data": { "id": "c6adf982-4e41-431b-833a-dfa89b484c75", "type": "charging_station" } } } } ] } ``` #### Error Responses - **400 Bad Request**: Client provided invalid request body. ```json { "errors": [ { "status": "400", "code": "BAD_REQUEST", "title": "..." } ] } ``` - **403 Forbidden**: API-Key is missing, invalid, or not authorized. ```json { "errors": [ { "status": "403", "code": "FORBIDDEN", "title": "api_key missing" } ] } ``` - **404 Not Found**: A requested resource, like a currency, does not exist. ```json { "errors": [ { "status": "404", "code": "NOT_FOUND", "title": "No currency with iso ATS" } ] } ``` - **500 Internal Server Error**: An unexpected error occurred on the server. ```json { "errors": [ { "status": "500", "code": "INTERNAL_SERVER_ERROR", "title": "some error" } ] } ``` ``` -------------------------------- ### Delete User Request Source: https://github.com/chargeprice/chargeprice-api-docs/blob/master/api/v1/users/delete.md Example of a DELETE request to remove user data. ```http DELETE http://example-base-url.com/v1/users/ae62cd2d-f29d-4107-b087-6d4f75261cca Content-Type: application/json Api-Key: my-secret-key ``` -------------------------------- ### Retrieve Vehicle Brands Source: https://context7.com/chargeprice/chargeprice-api-docs/llms.txt Fetch a list of all supported electric vehicle manufacturers. ```bash curl -X GET "https://api.chargeprice.app/v2/vehicle_brands" \ -H "API-Key: your-api-key" \ -H "Content-Type: application/json" ``` -------------------------------- ### GET /vehicles Source: https://github.com/chargeprice/chargeprice-api-docs/blob/master/api/v2/vehicles/index.md Retrieves a list of electric vehicles with their technical specifications and charging attributes. ```APIDOC ## GET /vehicles ### Description Retrieves a list of electric vehicles including their battery size, AC/DC charging capabilities, and energy consumption metrics. ### Method GET ### Endpoint /vehicles ### Response #### Success Response (200) - **data** (array) - List of vehicle objects - **included** (array) - Related resources such as vehicle brands - **meta** (object) - Metadata including overall_count #### Response Example { "data": [ { "id": "4ddddfde-fba1-4d1f-b1f4-a825ec463781", "type": "car", "attributes": { "ev_type": "bev", "model": "Ioniq 5", "release_year": 2021, "usable_battery_size": 58.0, "ac_max_power": 11.0, "dc_max_power": 232.0 } } ], "meta": { "overall_count": 1 } } ``` -------------------------------- ### Bulk Price Preview Request Source: https://github.com/chargeprice/chargeprice-api-docs/blob/master/api/v1/charge_prices/bulk/index.md HTTP POST request to retrieve bulk price previews. Requires a valid API key in the header. ```http POST http://example-base-url.com/v1/charge_prices/bulk?page[prices.size]=1 Content-Type: application/json Api-Key: my-secret-key ``` -------------------------------- ### GET /v1/my_best_tariffs/{id} Source: https://github.com/chargeprice/chargeprice-api-docs/blob/master/api/v1/my_best_tariffs/show.md Retrieves the status and details of a specific tariff calculation request. ```APIDOC ## GET /v1/my_best_tariffs/{id} ### Description Retrieves the status and details of a previously initiated tariff calculation request. ### Method GET ### Endpoint /v1/my_best_tariffs/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier for the tariff calculation request. ### Response #### Success Response (200) - **status** (string) - The current status of the request (e.g., "completed"). - **price_distribution** (object) - Breakdown of costs by kWh and minute. - **charges_blocking_fee** (boolean) - Indicates if a blocking fee is applied. - **covered_use_cases** (array) - List of use cases covered by the tariff. - **links** (object) - Hyperlinks related to the resource, such as a refresh URL. #### Response Example { "status": "completed", "price_distribution": { "kwh": 0.9994063564080551, "minute": 0.0005936435919449525 }, "charges_blocking_fee": true, "covered_use_cases": ["trips"], "links": { "refresh": "https://api.chargeprice.app/v1/my_best_tariffs/682b8b0e-ae9d-45ca-9cac-fc46566538dd" } } ```