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. |
| POST | /api/v1/sap/maintenance-windows | Bearer | SAP to EIM: a planned maintenance window for a swap station. The same order number again updates it; status CANCELLED cancels it. |
| GET | /api/v1/sap/maintenance-windows | Bearer | List the windows received, for one station or those in force at a given time. |
| 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.
POST /api/v1/sap/maintenance-windows
Authorization: Bearer <access_token>
Content-Type: application/json
{
"maintenanceOrderNumber": "4000123",
"orderType": "PM02",
"stationId": "911503",
"functionalLocation": "EIM-SS-911503",
"description": "Quarterly preventive maintenance of swap cabinet",
"plannedStart": "2026-10-05T09:00:00+05:30",
"plannedEnd": "2026-10-05T13:00:00+05:30",
"impact": "FULL_SHUTDOWN",
"status": "PLANNED"
}
201 Created
{ "status": "created", "windowId": "…", "maintenanceOrderNumber": "4000123",
"version": 1, "windowStatus": "PLANNED", "receivedAt": "…" }
The order number identifies the window. Send the same order again to reschedule it; that answers 200 with the next version. Send it with "status": "CANCELLED" to cancel it. Times must carry a time zone. A missing or invalid field answers 422 with the reason for each field.
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. |
| 422 | invalid_window | A maintenance window is missing a field or has a bad time. fields names each problem. |
| 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.