Skip to content

Getting Started

Getting started with using Battery Passport API involves the following steps:

  1. Request Battery Passport API access from the Battery Passport team via battery-passport.industry@siemens.com
  2. After our approval process you will get Client ID and a Client Secret.
  3. Make a request against our identity provider SiemensID to receive a JWT by using Client ID and Client Secret provided by Battery Passport team.
  4. Include the JWT Token Authorization header of your HTTP requests.

Request a token

export CLIENT_ID=<YOUR_CLIENT_ID>
export CLIENT_SECRET=<YOUR_CLIENT_SECRET>

curl https://<our-siemensid-tenant>/oauth/token \ <-- You will get the correct url from us
  -H 'content-type: application/json' \
  -d "{
            \"client_id\":\"$CLIENT_ID\",
            \"client_secret\":\"$CLIENT_SECRET\",
            \"audience\":\"https://api.battery-passport.siemens.com\",
            \"grant_type\":\"client_credentials\"
      }" 

To run this example yourself, set the CLIENT_ID and CLIENT_SECRET first.

Example response

{
  "access_token": "{jwtHeader}.{jwtPayload}.{jwtSignature}",
  "token_type": "Bearer",
  "expires_in": 86400
}

The token, or JWT (JSON Web Token), is the value of the access_token-property in the response. You can now use it by passing it in the Authorization-header of any subsequent API requests. The expires_in-property represents the number of seconds your token is valid, usually, the value corresponds to 24 hours. When this time has elapsed you will need to create a new token.

Make sure that at least the scope application.bp_portal.data_viewer is in the list of scopes.

Example request to Battery Passport APIs

curl --request GET \
  --url https://api.battery-passport.siemens.com/v1/passports/public/{batterypassid} \
  --header 'Authorization: Bearer {jwtHeader}.{jwtPayload}.{jwtSignature}'

The response contains the current weather. The resulting JSON looks like

{
    "status": {
        "state": "active"
    },
    "general_information": {
        "identification": {
            "uid": "string",
            "manufacturer_id": {
                "name": "string",
                "contact": {
                    "fax_number": "string",
                    "website": "string",
                    "phone_number": "string",
                    "email": "string"
                },
                "address": {
                    "locality": "string",
                    "country_sn": "string",
                    "post_code": 0,
                    "street": "string",
                    "number": 0,
                    "premise": "string",
                    "postal_delivery_point": "string"
                }
            },
            "manufacturing_date": "string",
            "manufacturing_place": {
                "locality": "string",
                "country_sn": "string",
                "post_code": 0,
                "street": "string",
                "number": 0,
                "premise": "string",
                "postal_delivery_point": "string"
            }
        },
        "characteristics": {
            "category": [
                "string"
            ],
            "weight": 0
        }
    },
    "compliance": {
        "conformity": {
            "declaration_of_conformity_eu": {
                "name": "string",
                "description": "string",
                "location": "string"
            },
            "id_declaration_of_conformity_eu": "string"
        },
        "symbols": {
            "collection_symbol": {
                "name": "string",
                "description": "string",
                "location": "string"
            },
            "cadmium_symbol": {
                "name": "string",
                "description": "string",
                "location": "string"
            },
            "lead_symbol": {
                "name": "string",
                "description": "string",
                "location": "string"
            }
        }
    },
    "materials": {
        "components": [
            {
                "critical_raw_materials": [
                    "string"
                ],
                "hazardous_substances": [
                    {
                        "substance": {
                            "name": "string",
                            "class": "string",
                            "category": "string",
                            "id": "string",
                            "substance_impact": "string"
                        },
                        "concentration_range": 0,
                        "location": "string"
                    }
                ]
            }
        ],
        "materials": {
            "chemistry": "string"
        }
    },
    "carbon_footprint": {
        "carbon_footprint": 0,
        "pre_processing_share_of_carbon_footprint": 0,
        "production_share_of_carbon_footprint": 0,
        "distribution_share_of_carbon_footprint": 0,
        "end_of_life_share_of_carbon_footprint": 0,
        "carbon_footprint_performance_class": "string",
        "web_link_to_carbon_footprint_study": {
            "name": "string",
            "description": "string",
            "location": "string"
        }
    },
    "supply_chain_due_diligence": {
        "due_diligence_report": {
            "information_of_due_diligence_report": {
                "name": "string",
                "description": "string",
                "location": "string"
            }
        },
        "additional_voluntary": {
            "third_party_supply_chain_assurances": {
                "name": "string",
                "description": "string",
                "location": "string"
            },
            "eu_tax_disclosure_statement": {
                "name": "string",
                "description": "string",
                "location": "string"
            },
            "sustainability_report": {
                "name": "string",
                "description": "string",
                "location": "string"
            }
        }
    },
    "circularity": {
        "safety_requirements": {
            "extinguishing_agent": [
                "string"
            ]
        },
        "recycled_content": {
            "pre_consumer_recycled_nickel_share": 0,
            "pre_consumer_recycled_cobalt_share": 0,
            "pre_consumer_recycled_lithium_share": 0,
            "pre_consumer_recycled_lead_share": 0,
            "post_consumer_recycled_nickel_share": 0,
            "post_consumer_recycled_cobalt_share": 0,
            "post_consumer_recycled_lithium_share": 0,
            "post_consumer_recycled_lead_share": 0
        },
        "renewable_content": {
            "renewable_content_share": 0
        },
        "end_of_life_information": {
            "role_of_end_users_to_waste_prevention": {
                "name": "string",
                "description": "string",
                "location": "string"
            },
            "role_of_end_users_to_separate_collection": {
                "name": "string",
                "description": "string",
                "location": "string"
            },
            "information_on_recycling_operations": {
                "name": "string",
                "description": "string",
                "location": "string"
            }
        }
    },
    "performance": {
        "capacity": {
            "certified_usable_energy": 0,
            "rated_capacity": 0,
            "nominal_voltage": 0,
            "min_voltage": 0,
            "max_voltage": 0
        },
        "power_capability": {
            "original_power_capability": 0,
            "max_permitted_power": 0,
            "ratio_between_power_and_energy": 0
        },
        "round_trip_energy": {
            "initial_round_trip_energy_efficiency": 0,
            "round_trip_energy_efficiency_at_half_life": 0
        },
        "internal_resistance": {
            "initial_resistance": {
                "pack_id": "string",
                "resistance": 0,
                "modules": [
                    {
                        "module_id": "string",
                        "resistance": 0,
                        "cells": [
                            {
                                "cell_id": "string",
                                "resistance": 0
                            }
                        ]
                    }
                ]
            }
        },
        "battery_lifetime": {
            "expected_lifetime_n_charge_discharge_cycles": 0,
            "cycle_life_reference_test": "string",
            "c_rate_of_cycle_life_test": 0,
            "capacity_threshold_for_exhaustion": 0,
            "soce_threshold_for_exhaustion": 0,
            "warranty_period": 0
        },
        "temperature_conditions": {
            "lower_temperature_idle_state": 0,
            "upper_temperature_idle_state": 0
        }
    }
}

Community

Connect and Collaborate with Industrial Professionals and Join the Community!

Click to load comments