curl --request POST \
--url https://{environment}.plugsurfing.com/emp/v1/orders \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"fleetId": "fleet-123",
"productId": "Nk375yz7Gw",
"address": {
"firstName": "Jane",
"lastName": "Doe",
"addressLine1": "Example Street 1",
"addressLine2": "Floor 2",
"postalCode": "00100",
"city": "Helsinki",
"country": "FI",
"companyName": "Example Ltd"
},
"printing": {
"driverName": "Jane Doe",
"licensePlate": "FI000AA"
}
}
'import requests
url = "https://{environment}.plugsurfing.com/emp/v1/orders"
payload = {
"fleetId": "fleet-123",
"productId": "Nk375yz7Gw",
"address": {
"firstName": "Jane",
"lastName": "Doe",
"addressLine1": "Example Street 1",
"addressLine2": "Floor 2",
"postalCode": "00100",
"city": "Helsinki",
"country": "FI",
"companyName": "Example Ltd"
},
"printing": {
"driverName": "Jane Doe",
"licensePlate": "FI000AA"
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
fleetId: 'fleet-123',
productId: 'Nk375yz7Gw',
address: {
firstName: 'Jane',
lastName: 'Doe',
addressLine1: 'Example Street 1',
addressLine2: 'Floor 2',
postalCode: '00100',
city: 'Helsinki',
country: 'FI',
companyName: 'Example Ltd'
},
printing: {driverName: 'Jane Doe', licensePlate: 'FI000AA'}
})
};
fetch('https://{environment}.plugsurfing.com/emp/v1/orders', 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://{environment}.plugsurfing.com/emp/v1/orders",
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([
'fleetId' => 'fleet-123',
'productId' => 'Nk375yz7Gw',
'address' => [
'firstName' => 'Jane',
'lastName' => 'Doe',
'addressLine1' => 'Example Street 1',
'addressLine2' => 'Floor 2',
'postalCode' => '00100',
'city' => 'Helsinki',
'country' => 'FI',
'companyName' => 'Example Ltd'
],
'printing' => [
'driverName' => 'Jane Doe',
'licensePlate' => 'FI000AA'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://{environment}.plugsurfing.com/emp/v1/orders"
payload := strings.NewReader("{\n \"fleetId\": \"fleet-123\",\n \"productId\": \"Nk375yz7Gw\",\n \"address\": {\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"addressLine1\": \"Example Street 1\",\n \"addressLine2\": \"Floor 2\",\n \"postalCode\": \"00100\",\n \"city\": \"Helsinki\",\n \"country\": \"FI\",\n \"companyName\": \"Example Ltd\"\n },\n \"printing\": {\n \"driverName\": \"Jane Doe\",\n \"licensePlate\": \"FI000AA\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://{environment}.plugsurfing.com/emp/v1/orders")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"fleetId\": \"fleet-123\",\n \"productId\": \"Nk375yz7Gw\",\n \"address\": {\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"addressLine1\": \"Example Street 1\",\n \"addressLine2\": \"Floor 2\",\n \"postalCode\": \"00100\",\n \"city\": \"Helsinki\",\n \"country\": \"FI\",\n \"companyName\": \"Example Ltd\"\n },\n \"printing\": {\n \"driverName\": \"Jane Doe\",\n \"licensePlate\": \"FI000AA\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{environment}.plugsurfing.com/emp/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fleetId\": \"fleet-123\",\n \"productId\": \"Nk375yz7Gw\",\n \"address\": {\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"addressLine1\": \"Example Street 1\",\n \"addressLine2\": \"Floor 2\",\n \"postalCode\": \"00100\",\n \"city\": \"Helsinki\",\n \"country\": \"FI\",\n \"companyName\": \"Example Ltd\"\n },\n \"printing\": {\n \"driverName\": \"Jane Doe\",\n \"licensePlate\": \"FI000AA\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "aYnky297eG",
"address": {
"country": "FI",
"firstName": "Jane",
"lastName": "Doe",
"city": "Helsinki",
"postalCode": "00100",
"companyName": "Example Ltd",
"addressLine1": "Example Street 1",
"addressLine2": "Floor 2"
},
"quantity": 1,
"language": "en",
"product": {
"id": "Nk375yz7Gw"
},
"created": "2024-01-15T10:00:00Z",
"organizationId": "JoEl1xoP7r",
"status": "ORDER_PAID",
"updated": "2024-01-15T10:00:00Z",
"printing": {
"variables": {
"driverName": "Jane Doe",
"licensePlate": "FI000AA"
}
}
}{
"message": "Missing required field: productId"
}{
"message": "Resource not found"
}{
"message": "An unexpected error occurred."
}Create a fleet charging key order
Creates a charging key order for a fleet organization.
curl --request POST \
--url https://{environment}.plugsurfing.com/emp/v1/orders \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"fleetId": "fleet-123",
"productId": "Nk375yz7Gw",
"address": {
"firstName": "Jane",
"lastName": "Doe",
"addressLine1": "Example Street 1",
"addressLine2": "Floor 2",
"postalCode": "00100",
"city": "Helsinki",
"country": "FI",
"companyName": "Example Ltd"
},
"printing": {
"driverName": "Jane Doe",
"licensePlate": "FI000AA"
}
}
'import requests
url = "https://{environment}.plugsurfing.com/emp/v1/orders"
payload = {
"fleetId": "fleet-123",
"productId": "Nk375yz7Gw",
"address": {
"firstName": "Jane",
"lastName": "Doe",
"addressLine1": "Example Street 1",
"addressLine2": "Floor 2",
"postalCode": "00100",
"city": "Helsinki",
"country": "FI",
"companyName": "Example Ltd"
},
"printing": {
"driverName": "Jane Doe",
"licensePlate": "FI000AA"
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
fleetId: 'fleet-123',
productId: 'Nk375yz7Gw',
address: {
firstName: 'Jane',
lastName: 'Doe',
addressLine1: 'Example Street 1',
addressLine2: 'Floor 2',
postalCode: '00100',
city: 'Helsinki',
country: 'FI',
companyName: 'Example Ltd'
},
printing: {driverName: 'Jane Doe', licensePlate: 'FI000AA'}
})
};
fetch('https://{environment}.plugsurfing.com/emp/v1/orders', 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://{environment}.plugsurfing.com/emp/v1/orders",
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([
'fleetId' => 'fleet-123',
'productId' => 'Nk375yz7Gw',
'address' => [
'firstName' => 'Jane',
'lastName' => 'Doe',
'addressLine1' => 'Example Street 1',
'addressLine2' => 'Floor 2',
'postalCode' => '00100',
'city' => 'Helsinki',
'country' => 'FI',
'companyName' => 'Example Ltd'
],
'printing' => [
'driverName' => 'Jane Doe',
'licensePlate' => 'FI000AA'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://{environment}.plugsurfing.com/emp/v1/orders"
payload := strings.NewReader("{\n \"fleetId\": \"fleet-123\",\n \"productId\": \"Nk375yz7Gw\",\n \"address\": {\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"addressLine1\": \"Example Street 1\",\n \"addressLine2\": \"Floor 2\",\n \"postalCode\": \"00100\",\n \"city\": \"Helsinki\",\n \"country\": \"FI\",\n \"companyName\": \"Example Ltd\"\n },\n \"printing\": {\n \"driverName\": \"Jane Doe\",\n \"licensePlate\": \"FI000AA\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://{environment}.plugsurfing.com/emp/v1/orders")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"fleetId\": \"fleet-123\",\n \"productId\": \"Nk375yz7Gw\",\n \"address\": {\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"addressLine1\": \"Example Street 1\",\n \"addressLine2\": \"Floor 2\",\n \"postalCode\": \"00100\",\n \"city\": \"Helsinki\",\n \"country\": \"FI\",\n \"companyName\": \"Example Ltd\"\n },\n \"printing\": {\n \"driverName\": \"Jane Doe\",\n \"licensePlate\": \"FI000AA\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{environment}.plugsurfing.com/emp/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fleetId\": \"fleet-123\",\n \"productId\": \"Nk375yz7Gw\",\n \"address\": {\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"addressLine1\": \"Example Street 1\",\n \"addressLine2\": \"Floor 2\",\n \"postalCode\": \"00100\",\n \"city\": \"Helsinki\",\n \"country\": \"FI\",\n \"companyName\": \"Example Ltd\"\n },\n \"printing\": {\n \"driverName\": \"Jane Doe\",\n \"licensePlate\": \"FI000AA\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "aYnky297eG",
"address": {
"country": "FI",
"firstName": "Jane",
"lastName": "Doe",
"city": "Helsinki",
"postalCode": "00100",
"companyName": "Example Ltd",
"addressLine1": "Example Street 1",
"addressLine2": "Floor 2"
},
"quantity": 1,
"language": "en",
"product": {
"id": "Nk375yz7Gw"
},
"created": "2024-01-15T10:00:00Z",
"organizationId": "JoEl1xoP7r",
"status": "ORDER_PAID",
"updated": "2024-01-15T10:00:00Z",
"printing": {
"variables": {
"driverName": "Jane Doe",
"licensePlate": "FI000AA"
}
}
}{
"message": "Missing required field: productId"
}{
"message": "Resource not found"
}{
"message": "An unexpected error occurred."
}Authorizations
API key for authentication
Body
Request body for creating a fleet charging key order.
Customer-provided fleet identifier. Must match the value used when the fleet was created via POST /emp/v1/fleets.
"fleet-123"
Encoded public product ID as returned by GET /emp/v1/products.
"Nk375yz7Gw"
Delivery address for the order.
Show child attributes
Show child attributes
Optional printing payload. Requirements are product-specific — use the printing.schema from product discovery to build and validate this object before submitting. Drive API forwards this payload unchanged to the fulfilment system.
{
"driverName": "Jane Doe",
"licensePlate": "FI000AA"
}
Response
OK
EMP charging key order product details.
Unique identifier of the order product.
"aYnky297eG"
Delivery address for this order product.
Show child attributes
Show child attributes
Number of product units ordered.
1
Language used for order communication.
"en"
Ordered product code or type.
Show child attributes
Show child attributes
UTC timestamp when this product order was created.
"2023-06-26T10:00:00Z"
Identifier of the organization that placed the order.
"JoEl1xoP7r"
Current processing status of the order product.
WAITING_FOR_ORDER, ORDER_PLACED, ORDER_PROCESSING, ORDER_ASSIGNED, ORDER_PAID, ORDER_CANCELLED, ORDER_CANCELLING, ORDER_PAYMENT_FAILED, ORDER_REFUND_FAILED, ORDER_WAITING_REFUND, ORDER_REFUNDED, PAYMENT_ONGOING, ORDER_FILLED, ORDER_PAYED, PREPARE_RECEIPT, ORDER_PAYED_WITHOUT_RECEIPT "ORDER_PAID"
UTC timestamp when this product order was last updated.
"2023-06-26T12:00:00Z"
Printing details associated with the order product. Present only for orders that include physical card customization.
Show child attributes
Show child attributes