Sandbox environment. All data here is test data and is not connected to any EIM or SAP system.
A test API for proving that SAP Integration Suite (CPI) and Energy In Motion can exchange data: SAP sends equipment and other records to EIM, and EIM answers pulls and sends invoices to SAP.
This sandbox uses the OAuth 2.0 client credentials pattern, matching the assumption in the integration sheet.
/oauth/token with HTTP Basic auth: the client id as username, the secret as password. The id and secret may also be sent as client_id and client_secret in a form or JSON body.Authorization: Bearer <access_token> on every call under /api/v1/sap/.401 invalid_token.curl -u <client id>:<client secret> -X POST https://sandbox.eim.digital/oauth/token
{ "access_token": "…", "token_type": "Bearer", "expires_in": 2592000, "expires_at": "…" }
Production will differ: tokens will come from EIM's identity provider and will be short-lived. CPI refreshes them automatically. Please don't design around the 30-day lifetime.
| Method | Path | Auth | Purpose |
|---|---|---|---|
| GET | /api/v1/health | none | Check the sandbox is up. |
| POST | /oauth/token | Basic | Get a bearer token. |
| POST | /api/v1/sap/equipment | Bearer | SAP to EIM: equipment create for a vehicle or battery. Answers 201 with a test id. |
| POST | /api/v1/sap/inbox | Bearer | SAP to EIM: any other payload, such as customer master, contract, RTO plate or payment. Stored and echoed. |
| GET | /api/v1/sap/odometer?vin= | Bearer | SAP pulls an odometer reading. Always a dummy value. |
| GET | /api/v1/sap/equipment | Bearer | List the last 100 equipment records received. |
| GET | /api/v1/sap/inbox | Bearer | List the last 100 inbox items received. |
POST /api/v1/sap/equipment
Authorization: Bearer <access_token>
Content-Type: application/json
{
"equipmentNumber": "10000123",
"equipmentCategory": "S",
"equipmentType": "VEHICLE",
"vin": "MAT000000TEST0001",
"macAddress1": "AA:BB:CC:DD:EE:01",
"macAddress2": "AA:BB:CC:DD:EE:02",
"imei": "356789012345678",
"rfid": "RFID-TEST-0001",
"customerNumber": "0000100001",
"salesMethod": "BAAS"
}
201 Created
{ "status": "received", "eimId": "…", "receivedAt": "…",
"echo": { "equipmentNumber": "10000123", "vin": "MAT000000TEST0001" } }
Please use test values rather than real customer data. These field names are EIM's guess from the integration sheet. The sandbox does not validate fields and keeps whatever you send. Please send the payload exactly as S/4 would produce it. That real shape is what the field mapping will be built from.
EIM will send a sample Fusion charging invoice with two line items to the CPI endpoint you provide. Please share the endpoint URL, its authentication method and test credentials, and your CPI outbound IP addresses. EIM's calls to you will come from 3.110.60.189.
Every error has the shape { "error": "…", "error_description": "…" }.
| Status | Error | Meaning |
|---|---|---|
| 401 | invalid_client | Wrong client id or secret on the token call. |
| 401 | invalid_token | Bearer token missing, unknown or expired. Get a new one. |
| 400 | invalid_json | The body is not valid JSON. Check the content type in the CPI flow. |
| 400 | missing_vin | The odometer call needs ?vin=. |
| 404 | not_found | Wrong path or method. |
Every request is logged on EIM's side, including refused ones, so if a call fails EIM can see exactly what arrived. Every response also carries the header X-EIM-Environment: sandbox.