Create
curl --request POST \
--url https://third-party.etrnl.app/v1/orders \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"displayName": "<string>",
"tagMetadata": "<string>",
"shippingLabelImgUrl": "<string>"
}
'import requests
url = "https://third-party.etrnl.app/v1/orders"
payload = {
"displayName": "<string>",
"tagMetadata": "<string>",
"shippingLabelImgUrl": "<string>"
}
headers = {
"API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
displayName: '<string>',
tagMetadata: '<string>',
shippingLabelImgUrl: '<string>'
})
};
fetch('https://third-party.etrnl.app/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://third-party.etrnl.app/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([
'displayName' => '<string>',
'tagMetadata' => '<string>',
'shippingLabelImgUrl' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>",
"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://third-party.etrnl.app/v1/orders"
payload := strings.NewReader("{\n \"displayName\": \"<string>\",\n \"tagMetadata\": \"<string>\",\n \"shippingLabelImgUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("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://third-party.etrnl.app/v1/orders")
.header("API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"displayName\": \"<string>\",\n \"tagMetadata\": \"<string>\",\n \"shippingLabelImgUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://third-party.etrnl.app/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"displayName\": \"<string>\",\n \"tagMetadata\": \"<string>\",\n \"shippingLabelImgUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
success: true,
err: '',
order: {
id: 17,
organizationId: 681,
productId: 91,
displayName: "John's order",
creationDate: "2023-09-26T23:19:42.000Z",
fulfilled: false,
tagMetadata: { internalOrderId: 123456 },
shippingLabelImgUrl: "https://example.com/johns-shipping-label.png",
fulfillmentDate: null
}
}
Create
POST
/
v1
/
orders
Create
curl --request POST \
--url https://third-party.etrnl.app/v1/orders \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"displayName": "<string>",
"tagMetadata": "<string>",
"shippingLabelImgUrl": "<string>"
}
'import requests
url = "https://third-party.etrnl.app/v1/orders"
payload = {
"displayName": "<string>",
"tagMetadata": "<string>",
"shippingLabelImgUrl": "<string>"
}
headers = {
"API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
displayName: '<string>',
tagMetadata: '<string>',
shippingLabelImgUrl: '<string>'
})
};
fetch('https://third-party.etrnl.app/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://third-party.etrnl.app/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([
'displayName' => '<string>',
'tagMetadata' => '<string>',
'shippingLabelImgUrl' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>",
"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://third-party.etrnl.app/v1/orders"
payload := strings.NewReader("{\n \"displayName\": \"<string>\",\n \"tagMetadata\": \"<string>\",\n \"shippingLabelImgUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("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://third-party.etrnl.app/v1/orders")
.header("API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"displayName\": \"<string>\",\n \"tagMetadata\": \"<string>\",\n \"shippingLabelImgUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://third-party.etrnl.app/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"displayName\": \"<string>\",\n \"tagMetadata\": \"<string>\",\n \"shippingLabelImgUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
success: true,
err: '',
order: {
id: 17,
organizationId: 681,
productId: 91,
displayName: "John's order",
creationDate: "2023-09-26T23:19:42.000Z",
fulfilled: false,
tagMetadata: { internalOrderId: 123456 },
shippingLabelImgUrl: "https://example.com/johns-shipping-label.png",
fulfillmentDate: null
}
}
Create a new order for a product
Headers
string
required
Your organization’s private API key.
JSON Request Body
string
This is the order’s display name as it will appear in the programmer.
string
This is a JSON object that defines additional information that will be tied to the tag that’s programmed for the order.
string
This is an optional field where you can add your customer’s shipping label.
This will allow you to print the shipping label directly from the programmer.
{
success: true,
err: '',
order: {
id: 17,
organizationId: 681,
productId: 91,
displayName: "John's order",
creationDate: "2023-09-26T23:19:42.000Z",
fulfilled: false,
tagMetadata: { internalOrderId: 123456 },
shippingLabelImgUrl: "https://example.com/johns-shipping-label.png",
fulfillmentDate: null
}
}