Print orders
Get an account-scoped API print order
GET
/
v1
/
print-orders
/
{order_id}
Get an account-scoped API print order
curl --request GET \
--url https://api.batchrelay.com/v1/print-orders/{order_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.batchrelay.com/v1/print-orders/{order_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.batchrelay.com/v1/print-orders/{order_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://api.batchrelay.com/v1/print-orders/{order_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.batchrelay.com/v1/print-orders/{order_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.batchrelay.com/v1/print-orders/{order_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.batchrelay.com/v1/print-orders/{order_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"api_account_id": "<string>",
"channel": "api",
"created_at": "2023-11-07T05:31:56Z",
"external_order_id": "<string>",
"id": "<string>",
"merchant_of_record": "batch_relay",
"order_code": "<string>",
"price": {
"currency": "USD",
"fee_base_cents": 1,
"merchandise_cents": 1,
"minimum_fee_cents": 500,
"platform_fee_basis_points": 1500,
"platform_fee_cents": 501,
"platform_fee_label": "Batch Relay API Access Fee",
"policy_id": "api-access-fee-v1",
"shipping_cents": 1,
"tax_cents": 1,
"total_cents": 2
},
"provider": {
"provider_availability": "preview",
"provider_capability_revision": "<string>",
"provider_environment": "sandbox",
"provider_id": "whcc",
"provider_recipe_revision": "<string>",
"provider_selection_source": "explicit"
},
"provider_offer_lines": [
{
"availability": "available",
"configuration": {},
"currency": "USD",
"line_subtotal_cents": 1,
"offer_id": "<string>",
"pricing_revision": "<string>",
"product": {
"id": "<string>",
"revision": 2
},
"provider_id": "whcc",
"quantity": 2,
"unit_cost_cents": 1
}
],
"quote_id": "<string>",
"status": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"docs_url": "<string>",
"error": "<string>",
"message": "<string>",
"request_id": "<string>"
}{
"code": "<string>",
"docs_url": "<string>",
"error": "<string>",
"message": "<string>",
"request_id": "<string>"
}{
"code": "<string>",
"docs_url": "<string>",
"error": "<string>",
"message": "<string>",
"request_id": "<string>"
}{
"code": "<string>",
"docs_url": "<string>",
"error": "<string>",
"message": "<string>",
"request_id": "<string>"
}{
"code": "<string>",
"docs_url": "<string>",
"error": "<string>",
"message": "<string>",
"request_id": "<string>"
}Authorizations
Headers
Response
API order
⌘I
Get an account-scoped API print order
curl --request GET \
--url https://api.batchrelay.com/v1/print-orders/{order_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.batchrelay.com/v1/print-orders/{order_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.batchrelay.com/v1/print-orders/{order_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://api.batchrelay.com/v1/print-orders/{order_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.batchrelay.com/v1/print-orders/{order_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.batchrelay.com/v1/print-orders/{order_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.batchrelay.com/v1/print-orders/{order_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"api_account_id": "<string>",
"channel": "api",
"created_at": "2023-11-07T05:31:56Z",
"external_order_id": "<string>",
"id": "<string>",
"merchant_of_record": "batch_relay",
"order_code": "<string>",
"price": {
"currency": "USD",
"fee_base_cents": 1,
"merchandise_cents": 1,
"minimum_fee_cents": 500,
"platform_fee_basis_points": 1500,
"platform_fee_cents": 501,
"platform_fee_label": "Batch Relay API Access Fee",
"policy_id": "api-access-fee-v1",
"shipping_cents": 1,
"tax_cents": 1,
"total_cents": 2
},
"provider": {
"provider_availability": "preview",
"provider_capability_revision": "<string>",
"provider_environment": "sandbox",
"provider_id": "whcc",
"provider_recipe_revision": "<string>",
"provider_selection_source": "explicit"
},
"provider_offer_lines": [
{
"availability": "available",
"configuration": {},
"currency": "USD",
"line_subtotal_cents": 1,
"offer_id": "<string>",
"pricing_revision": "<string>",
"product": {
"id": "<string>",
"revision": 2
},
"provider_id": "whcc",
"quantity": 2,
"unit_cost_cents": 1
}
],
"quote_id": "<string>",
"status": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"docs_url": "<string>",
"error": "<string>",
"message": "<string>",
"request_id": "<string>"
}{
"code": "<string>",
"docs_url": "<string>",
"error": "<string>",
"message": "<string>",
"request_id": "<string>"
}{
"code": "<string>",
"docs_url": "<string>",
"error": "<string>",
"message": "<string>",
"request_id": "<string>"
}{
"code": "<string>",
"docs_url": "<string>",
"error": "<string>",
"message": "<string>",
"request_id": "<string>"
}{
"code": "<string>",
"docs_url": "<string>",
"error": "<string>",
"message": "<string>",
"request_id": "<string>"
}