Update
curl --request PUT \
--url https://third-party.etrnl.app/v1/orders/{id} \
--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/{id}"
payload = {
"displayName": "<string>",
"tagMetadata": "<string>",
"shippingLabelImgUrl": "<string>"
}
headers = {
"API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
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/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
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/{id}"
payload := strings.NewReader("{\n \"displayName\": \"<string>\",\n \"tagMetadata\": \"<string>\",\n \"shippingLabelImgUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://third-party.etrnl.app/v1/orders/{id}")
.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/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.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 updated order",
creationDate: "2023-09-26T23:19:42.000Z",
fulfilled: false,
tagMetadata: { internalOrderId: 123456 },
shippingLabelImgUrl: "https://example.com/johns-shipping-label.png",
fulfillmentDate: null
}
}
Update
PUT
/
v1
/
orders
/
{id}
Update
curl --request PUT \
--url https://third-party.etrnl.app/v1/orders/{id} \
--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/{id}"
payload = {
"displayName": "<string>",
"tagMetadata": "<string>",
"shippingLabelImgUrl": "<string>"
}
headers = {
"API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
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/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
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/{id}"
payload := strings.NewReader("{\n \"displayName\": \"<string>\",\n \"tagMetadata\": \"<string>\",\n \"shippingLabelImgUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://third-party.etrnl.app/v1/orders/{id}")
.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/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.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 updated order",
creationDate: "2023-09-26T23:19:42.000Z",
fulfilled: false,
tagMetadata: { internalOrderId: 123456 },
shippingLabelImgUrl: "https://example.com/johns-shipping-label.png",
fulfillmentDate: null
}
}
Update an order by ID
You cannot update orders that have been fulfilled
Headers
string
required
Your organization’s private API key.
URL Params
string
required
The ID of the Order.
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 updated order",
creationDate: "2023-09-26T23:19:42.000Z",
fulfilled: false,
tagMetadata: { internalOrderId: 123456 },
shippingLabelImgUrl: "https://example.com/johns-shipping-label.png",
fulfillmentDate: null
}
}