curl --request POST \
--url https://{environment}.plugsurfing.com/emp/v1/orders/{orderId}/assign \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"keyIdentifier": "0462D53C8ABAC0",
"referenceId": "1234567890123456"
}
'import requests
url = "https://{environment}.plugsurfing.com/emp/v1/orders/{orderId}/assign"
payload = {
"keyIdentifier": "0462D53C8ABAC0",
"referenceId": "1234567890123456"
}
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({keyIdentifier: '0462D53C8ABAC0', referenceId: '1234567890123456'})
};
fetch('https://{environment}.plugsurfing.com/emp/v1/orders/{orderId}/assign', 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/{orderId}/assign",
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([
'keyIdentifier' => '0462D53C8ABAC0',
'referenceId' => '1234567890123456'
]),
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/{orderId}/assign"
payload := strings.NewReader("{\n \"keyIdentifier\": \"0462D53C8ABAC0\",\n \"referenceId\": \"1234567890123456\"\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/{orderId}/assign")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"keyIdentifier\": \"0462D53C8ABAC0\",\n \"referenceId\": \"1234567890123456\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{environment}.plugsurfing.com/emp/v1/orders/{orderId}/assign")
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 \"keyIdentifier\": \"0462D53C8ABAC0\",\n \"referenceId\": \"1234567890123456\"\n}"
response = http.request(request)
puts response.read_body{
"id": "aYnky297eG",
"address": {
"country": "Austria",
"additionalInformation": "test test",
"firstName": "Frans",
"lastName": "Anderson",
"city": "Wistful Vista",
"postalCode": "85960",
"companyName": "Low area Corp.",
"addressLine1": "First Way 261b",
"addressLine2": "Suite 9"
},
"quantity": 1,
"language": "en",
"product": {
"id": "Am07b6Q7JZ"
},
"created": "2023-06-26T10:00:00Z",
"organizationId": "JoEl1xoP7r",
"status": "ORDER_PAID",
"updated": "2023-06-26T12:00:00Z"
}{
"message": "Missing or invalid card details."
}{
"message": "Resource not found"
}{
"message": "Card details conflict with an existing assignment."
}{
"message": "An unexpected error occurred."
}Mark an order as 'Assigned'
Mark order as ‘Assigned’
curl --request POST \
--url https://{environment}.plugsurfing.com/emp/v1/orders/{orderId}/assign \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"keyIdentifier": "0462D53C8ABAC0",
"referenceId": "1234567890123456"
}
'import requests
url = "https://{environment}.plugsurfing.com/emp/v1/orders/{orderId}/assign"
payload = {
"keyIdentifier": "0462D53C8ABAC0",
"referenceId": "1234567890123456"
}
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({keyIdentifier: '0462D53C8ABAC0', referenceId: '1234567890123456'})
};
fetch('https://{environment}.plugsurfing.com/emp/v1/orders/{orderId}/assign', 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/{orderId}/assign",
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([
'keyIdentifier' => '0462D53C8ABAC0',
'referenceId' => '1234567890123456'
]),
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/{orderId}/assign"
payload := strings.NewReader("{\n \"keyIdentifier\": \"0462D53C8ABAC0\",\n \"referenceId\": \"1234567890123456\"\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/{orderId}/assign")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"keyIdentifier\": \"0462D53C8ABAC0\",\n \"referenceId\": \"1234567890123456\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{environment}.plugsurfing.com/emp/v1/orders/{orderId}/assign")
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 \"keyIdentifier\": \"0462D53C8ABAC0\",\n \"referenceId\": \"1234567890123456\"\n}"
response = http.request(request)
puts response.read_body{
"id": "aYnky297eG",
"address": {
"country": "Austria",
"additionalInformation": "test test",
"firstName": "Frans",
"lastName": "Anderson",
"city": "Wistful Vista",
"postalCode": "85960",
"companyName": "Low area Corp.",
"addressLine1": "First Way 261b",
"addressLine2": "Suite 9"
},
"quantity": 1,
"language": "en",
"product": {
"id": "Am07b6Q7JZ"
},
"created": "2023-06-26T10:00:00Z",
"organizationId": "JoEl1xoP7r",
"status": "ORDER_PAID",
"updated": "2023-06-26T12:00:00Z"
}{
"message": "Missing or invalid card details."
}{
"message": "Resource not found"
}{
"message": "Card details conflict with an existing assignment."
}{
"message": "An unexpected error occurred."
}Authorizations
API key for authentication
Path Parameters
orderId to be assigned
Body
Optional request body for assigning an order. Required only when the order requires printing.
Response
Assigned
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