Sandbox environment. All data here is test data and is not connected to any EIM or SAP system.

EIM ↔ SAP integration sandbox

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.

Open the API explorer OpenAPI spec (JSON)

Quick start

  1. Get the client id and client secret from EIM. The secret is sent separately, never on this page.
  2. Open the API explorer and click Authorize. Under clientCredentials, enter the id and secret and click Authorize. The explorer fetches a token for you.
  3. Open any call, click Try it out, then Execute.
  4. To confirm what arrived, run GET /api/v1/sap/equipment or GET /api/v1/sap/inbox.

Authentication

This sandbox uses the OAuth 2.0 client credentials pattern, matching the assumption in the integration sheet.

  1. Get a token. POST to /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.
  2. Use the token. Send Authorization: Bearer <access_token> on every call under /api/v1/sap/.
  3. Reuse it. A sandbox token is valid for 30 days. Ask for a new one when you get 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.

Endpoints

MethodPathAuthPurpose
GET/api/v1/healthnoneCheck the sandbox is up.
POST/oauth/tokenBasicGet a bearer token.
POST/api/v1/sap/equipmentBearerSAP to EIM: equipment create for a vehicle or battery. Answers 201 with a test id.
POST/api/v1/sap/inboxBearerSAP to EIM: any other payload, such as customer master, contract, RTO plate or payment. Stored and echoed.
GET/api/v1/sap/odometer?vin=BearerSAP pulls an odometer reading. Always a dummy value.
GET/api/v1/sap/equipmentBearerList the last 100 equipment records received.
GET/api/v1/sap/inboxBearerList the last 100 inbox items received.

Equipment example

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 to SAP

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.

Errors

Every error has the shape { "error": "…", "error_description": "…" }.

StatusErrorMeaning
401invalid_clientWrong client id or secret on the token call.
401invalid_tokenBearer token missing, unknown or expired. Get a new one.
400invalid_jsonThe body is not valid JSON. Check the content type in the CPI flow.
400missing_vinThe odometer call needs ?vin=.
404not_foundWrong 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.