DataTransfer

Core Both

Used for vendor-specific data exchange between Charge Point and Central System.

Quick Reference

Required Fields

vendorId string(255)

Vendor identifier for custom functionality

Optional Fields

messageId string(50)

Specific message identifier within vendor namespace

data string

Vendor-specific data payload

Example Payload

{
  "vendorId": "com.vendorx",
  "messageId": "GetDiagnostics",
  "data": "{\"component\": \"charger\"}"
}

Example Full Frame

[
  2,
  "msg-001",
  "DataTransfer",
  {
    "vendorId": "com.vendorx",
    "messageId": "GetDiagnostics",
    "data": "{\"component\": \"charger\"}"
  }
]

Format: [MessageType, MessageId, Action, Payload]

Overview

The DataTransfer message enables vendor-specific extensions to OCPP. It allows custom data exchange without modifying the core protocol.

When to Send

  • When vendor-specific functionality is needed
  • For proprietary diagnostics or telemetry
  • For experimental features before standardization
  • For integration with vendor-specific backend systems

Expected Response

The CSMS/CP responds with:

  • status: Accepted, Rejected, or UnknownVendor
  • data (optional): Response payload from vendor extension

Usage Notes

  • Both CP and CSMS can initiate DataTransfer
  • The vendorId should use reverse domain notation (e.g., “com.vendor.feature”)
  • Data field typically contains JSON but can be any string format
  • No standard format - completely vendor-defined

Best Practices

  1. Use reverse domain - VendorId should be globally unique (e.g., com.acme.features)
  2. Document extensions - Clearly document custom messageId values and data formats
  3. Version control - Include version info in data payload for compatibility
  4. Graceful degradation - Handle UnknownVendor or Rejected responses
  5. Security - Validate data payloads to prevent injection attacks

Testing Tips

  • Test with recognized vendorId to verify Accepted response
  • Test with unknown vendorId to verify UnknownVendor/Rejected
  • Test with various data payload formats
  • Test bidirectional (both CP→CSMS and CSMS→CP)

Common Errors

NotSupported

Cause: CSMS doesn't recognize vendorId or messageId

Solution: Verify vendor extension is supported by CSMS

UnknownVendor

Cause: VendorId not registered or recognized

Solution: Use registered vendor identifier