curl --request POST \
--url https://api.lynkwell.com/ocpp/v2/raw-request \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assetId": "<string>",
"payload": {},
"async": true,
"requestId": "<string>",
"injectActiveTransactionId": false
}
'import requests
url = "https://api.lynkwell.com/ocpp/v2/raw-request"
payload = {
"assetId": "<string>",
"payload": {},
"async": True,
"requestId": "<string>",
"injectActiveTransactionId": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
assetId: '<string>',
payload: {},
async: true,
requestId: '<string>',
injectActiveTransactionId: false
})
};
fetch('https://api.lynkwell.com/ocpp/v2/raw-request', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lynkwell.com/ocpp/v2/raw-request",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'assetId' => '<string>',
'payload' => [
],
'async' => true,
'requestId' => '<string>',
'injectActiveTransactionId' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lynkwell.com/ocpp/v2/raw-request"
payload := strings.NewReader("{\n \"assetId\": \"<string>\",\n \"payload\": {},\n \"async\": true,\n \"requestId\": \"<string>\",\n \"injectActiveTransactionId\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.lynkwell.com/ocpp/v2/raw-request")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"assetId\": \"<string>\",\n \"payload\": {},\n \"async\": true,\n \"requestId\": \"<string>\",\n \"injectActiveTransactionId\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lynkwell.com/ocpp/v2/raw-request")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"assetId\": \"<string>\",\n \"payload\": {},\n \"async\": true,\n \"requestId\": \"<string>\",\n \"injectActiveTransactionId\": false\n}"
response = http.request(request)
puts response.read_body{
"status": "Success",
"async": true,
"ocppMessageId": "<string>",
"data": {
"ocppMessageId": "<string>",
"connection": {
"connectionId": "<string>",
"protocol": "ocpp2.0.1"
},
"request": {
"messageType": "2",
"messageId": "<string>",
"action": "<string>",
"payload": {}
},
"response": {
"messageType": "CALL_ERROR",
"messageId": "<string>",
"errorCode": "<string>",
"ErrorDescription": "<string>",
"errorDetails": {},
"payload": {}
}
}
}{
"type": "<string>",
"code": "<string>",
"message": "<string>"
}{
"type": "<string>",
"code": "<string>",
"message": "<string>"
}Inject OCPP raw request to device
This endpoint injects an OCPP raw request to the device.
curl --request POST \
--url https://api.lynkwell.com/ocpp/v2/raw-request \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assetId": "<string>",
"payload": {},
"async": true,
"requestId": "<string>",
"injectActiveTransactionId": false
}
'import requests
url = "https://api.lynkwell.com/ocpp/v2/raw-request"
payload = {
"assetId": "<string>",
"payload": {},
"async": True,
"requestId": "<string>",
"injectActiveTransactionId": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
assetId: '<string>',
payload: {},
async: true,
requestId: '<string>',
injectActiveTransactionId: false
})
};
fetch('https://api.lynkwell.com/ocpp/v2/raw-request', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lynkwell.com/ocpp/v2/raw-request",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'assetId' => '<string>',
'payload' => [
],
'async' => true,
'requestId' => '<string>',
'injectActiveTransactionId' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lynkwell.com/ocpp/v2/raw-request"
payload := strings.NewReader("{\n \"assetId\": \"<string>\",\n \"payload\": {},\n \"async\": true,\n \"requestId\": \"<string>\",\n \"injectActiveTransactionId\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.lynkwell.com/ocpp/v2/raw-request")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"assetId\": \"<string>\",\n \"payload\": {},\n \"async\": true,\n \"requestId\": \"<string>\",\n \"injectActiveTransactionId\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lynkwell.com/ocpp/v2/raw-request")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"assetId\": \"<string>\",\n \"payload\": {},\n \"async\": true,\n \"requestId\": \"<string>\",\n \"injectActiveTransactionId\": false\n}"
response = http.request(request)
puts response.read_body{
"status": "Success",
"async": true,
"ocppMessageId": "<string>",
"data": {
"ocppMessageId": "<string>",
"connection": {
"connectionId": "<string>",
"protocol": "ocpp2.0.1"
},
"request": {
"messageType": "2",
"messageId": "<string>",
"action": "<string>",
"payload": {}
},
"response": {
"messageType": "CALL_ERROR",
"messageId": "<string>",
"errorCode": "<string>",
"ErrorDescription": "<string>",
"errorDetails": {},
"payload": {}
}
}
}{
"type": "<string>",
"code": "<string>",
"message": "<string>"
}{
"type": "<string>",
"code": "<string>",
"message": "<string>"
}Authorizations
OAuth2 Client Credentials Flow
Body
Request body containing the data need to send a request to the station
The name of the action to be executed
CancelReservation, ChangeAvailability, ChangeConfiguration, ClearCache, ClearChargingProfile, DataTransfer, GetCompositeSchedule, GetConfiguration, GetDiagnostics, GetLocalListVersion, RemoteStartTransaction, RemoteStopTransaction, ReserveNow, Reset, SendLocalList, SetChargingProfile, TriggerMessage, UnlockConnector, UpdateFirmware, CertificateSigned, ClearDisplayMessage, ClearVariableMonitoring, CostUpdated, CustomerInformation, DeleteCertificate, GetBaseReport, GetChargingProfiles, GetDisplayMessages, GetInstalledCertificateIds, GetLog, GetMonitoringReport, GetReport, GetTransactionStatus, GetVariables, InstallCertificate, PublishFirmware, RequestStartTransaction, RequestStopTransaction, SetDisplayMessage, SetMonitoringBase, SetMonitoringLevel, SetNetworkProfile, SetVariableMonitoring, SetVariables, UnpublishFirmware The id of the asset to send the request to
The payload to be sent to the asset
The network to send the request to
Show child attributes
Show child attributes
Whether the request should be sent asynchronously. If false, the data will be present in the response
An optional request ID that will be used as the OCPP message ID. If not provided one will be generated.
When true and the request is an OCPP 1.6 SetChargingProfile with a TxProfile purpose and no transactionId, the active transaction on the targeted connector is resolved and its id is set as csChargingProfiles.transactionId. For v2-native stations this happens in this API (responding 400 NO_ACTIVE_TRANSACTION when the connector has no ongoing transaction); for gateway-connected stations the ocpp processor injects the id as the command passes through it. Any other request passes through unchanged.
Response
OK
- Option 1
- Option 2
The status of the response
Success Whether the request was sent asynchronously, if it is false, the data will be present in the response otherwise data will be .
The id of the OCPP message
The data of the response
Show child attributes
Show child attributes