curl --request POST \
--url https://api.lynkwell.com/asset-management/v1/assets/{assetId}/send-command \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payload": "<string>",
"protocol": "OCPP_1_6"
}
'import requests
url = "https://api.lynkwell.com/asset-management/v1/assets/{assetId}/send-command"
payload = {
"payload": "<string>",
"protocol": "OCPP_1_6"
}
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({payload: '<string>', protocol: 'OCPP_1_6'})
};
fetch('https://api.lynkwell.com/asset-management/v1/assets/{assetId}/send-command', 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/asset-management/v1/assets/{assetId}/send-command",
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([
'payload' => '<string>',
'protocol' => 'OCPP_1_6'
]),
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/asset-management/v1/assets/{assetId}/send-command"
payload := strings.NewReader("{\n \"payload\": \"<string>\",\n \"protocol\": \"OCPP_1_6\"\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/asset-management/v1/assets/{assetId}/send-command")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payload\": \"<string>\",\n \"protocol\": \"OCPP_1_6\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lynkwell.com/asset-management/v1/assets/{assetId}/send-command")
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 \"payload\": \"<string>\",\n \"protocol\": \"OCPP_1_6\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"assetId": "<string>",
"networkId": "<string>",
"action": "CancelReservation",
"request": {
"timestamp": "2023-11-07T05:31:56Z",
"payload": {}
},
"status": "Success",
"protocol": "OCPP_1_6",
"confirmation": {
"timestamp": "2023-11-07T05:31:56Z",
"payload": {}
},
"error": {
"timestamp": "2023-11-07T05:31:56Z",
"reason": "<string>"
}
}
}{
"type": "BAD_REQUEST",
"code": "INVALID_REQUEST_PARAMETERS",
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"type": "NOT_FOUND",
"code": "ASSET_NOT_FOUND",
"message": "<string>"
}{
"type": "INTERNAL_ERROR",
"code": "INTERNAL_SERVER_ERROR",
"message": "<string>"
}Send an ocpp command to an asset (Deprecated)
This endpoint saves and emits a new ocpp command to the station. It then waits for a response for a maximum of 25 seconds and returns it. If the status of the response body is “Success”, then the “confirmation” field will be present. The “confirmation.payload” contains the raw response from the station. If the status is not “Success”, then the “error” field will be present containing details of what the error was. INFO! This route is deprecated. We now recommend using the Inject OCPP Raw Request endpoint instead. WARNING! This action is potentially dangerous and irreversible!
curl --request POST \
--url https://api.lynkwell.com/asset-management/v1/assets/{assetId}/send-command \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payload": "<string>",
"protocol": "OCPP_1_6"
}
'import requests
url = "https://api.lynkwell.com/asset-management/v1/assets/{assetId}/send-command"
payload = {
"payload": "<string>",
"protocol": "OCPP_1_6"
}
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({payload: '<string>', protocol: 'OCPP_1_6'})
};
fetch('https://api.lynkwell.com/asset-management/v1/assets/{assetId}/send-command', 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/asset-management/v1/assets/{assetId}/send-command",
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([
'payload' => '<string>',
'protocol' => 'OCPP_1_6'
]),
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/asset-management/v1/assets/{assetId}/send-command"
payload := strings.NewReader("{\n \"payload\": \"<string>\",\n \"protocol\": \"OCPP_1_6\"\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/asset-management/v1/assets/{assetId}/send-command")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payload\": \"<string>\",\n \"protocol\": \"OCPP_1_6\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lynkwell.com/asset-management/v1/assets/{assetId}/send-command")
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 \"payload\": \"<string>\",\n \"protocol\": \"OCPP_1_6\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"assetId": "<string>",
"networkId": "<string>",
"action": "CancelReservation",
"request": {
"timestamp": "2023-11-07T05:31:56Z",
"payload": {}
},
"status": "Success",
"protocol": "OCPP_1_6",
"confirmation": {
"timestamp": "2023-11-07T05:31:56Z",
"payload": {}
},
"error": {
"timestamp": "2023-11-07T05:31:56Z",
"reason": "<string>"
}
}
}{
"type": "BAD_REQUEST",
"code": "INVALID_REQUEST_PARAMETERS",
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"type": "NOT_FOUND",
"code": "ASSET_NOT_FOUND",
"message": "<string>"
}{
"type": "INTERNAL_ERROR",
"code": "INTERNAL_SERVER_ERROR",
"message": "<string>"
}Authorizations
OAuth2 Client Credentials Flow
Path Parameters
The id of the asset to send the command to
Body
The type of OCPP action to be executed
BootNotification, Heartbeat, MeterValues, StatusNotification, Authorize, StartTransaction, StopTransaction, DataTransfer, DiagnosticsStatusNotification, FirmwareStatusNotification, SignCertificate, GetConfiguration, ChangeConfiguration, RemoteStartTransaction, RemoteStopTransaction, Reset, UnlockConnector, UpdateFirmware JSON string of the ocpp payload based on the action and protocol
The OCPP protocol version
OCPP_1_6 Response
Success
Show child attributes
Show child attributes