Retrieve Order
curl --request GET \
--url https://api.production.orderprotection.com/v1/orders/{sourceOrderId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.production.orderprotection.com/v1/orders/{sourceOrderId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.production.orderprotection.com/v1/orders/{sourceOrderId}', 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.production.orderprotection.com/v1/orders/{sourceOrderId}",
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.production.orderprotection.com/v1/orders/{sourceOrderId}"
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.production.orderprotection.com/v1/orders/{sourceOrderId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.production.orderprotection.com/v1/orders/{sourceOrderId}")
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{
"id": "asdasdfasdfasdfasdf",
"fulfillments": [
{
"id": "12345",
"sourceOrderId": "12345",
"fulfillmentStatus": "shipped",
"trackingCompany": "ups",
"trackingNumber": "12345",
"sourceItemIds": [
{
"id": "12345",
"quantity": 1
}
]
}
],
"sourceOrderId": "12345",
"sourceOrderNumber": "#12345",
"sourceCreatedAt": "2000-05-15T21:00:00.000Z",
"sourceUpdatedAt": "2024-05-28T20:05:55.338Z",
"sourceCancelledAt": "2024-05-28T20:05:55.339Z",
"platformId": "api",
"premiumPaid": 1.5,
"currency": "USD",
"orderItems": [
{
"id": "clv5u1ix00002pheol047kwrv",
"orderId": "clv5u1ix00000pheoqpxke986",
"productName": "Handcrafted Wooden Table",
"productUrl": "https://bogus-clarity.name/",
"productImage": "https://picsum.photos/seed/orderprotection1/200/300",
"itemDescription": null,
"sku": "978-0-10-081434-9",
"quantity": 20,
"price": 31.5,
"discount": 0,
"tax": 0,
"sourceItemId": "387179",
"sourceProductId": "477353",
"sourceVariantId": "17742",
"addressId": null,
"createdAt": "2024-04-18T22:48:08.964Z",
"updatedAt": "2024-04-18T22:48:08.964Z",
"refundedQuantity": 0
},
{
"id": "clv5u1ix00003pheom3edzt29",
"orderId": "clv5u1ix00000pheoqpxke986",
"productName": "Crazy T-Shirt",
"productUrl": "https://test.site/",
"productImage": "https://picsum.photos/seed/orderprotection2/200/300",
"itemDescription": null,
"sku": "5555",
"quantity": 3,
"price": 32.2,
"discount": 0,
"tax": 0,
"sourceItemId": "387180",
"sourceProductId": "477353",
"sourceVariantId": "17742",
"addressId": null,
"createdAt": "2024-04-18T22:48:08.964Z",
"updatedAt": "2024-04-18T22:48:08.964Z",
"refundedQuantity": 0
}
],
"total": 12.55,
"discountTotal": 2.55,
"shippingCost": 7.55,
"shippingCostTax": 1.44,
"tax": 1.44,
"subtotal": 1200,
"customerEmail": "customer@email.com",
"customerName": "John Doe",
"customerPhone": "(801) 555-5555",
"exchangeRate": 1,
"storeId": "test",
"policyId": "asdadsasdad",
"eligibleForOta": false,
"createdAt": "2024-05-28T20:05:55.339Z",
"activities": [
{
"message": "Order created",
"orderId": "asdasd"
}
],
"updatedAt": "2024-05-28T20:05:55.339Z",
"deletedAt": "2024-05-28T20:05:55.339Z"
}{
"message": "order not found",
"error": "Not Found",
"statusCode": 404
}Orders
Retrieve Order
GET
/
v1
/
orders
/
{sourceOrderId}
Retrieve Order
curl --request GET \
--url https://api.production.orderprotection.com/v1/orders/{sourceOrderId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.production.orderprotection.com/v1/orders/{sourceOrderId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.production.orderprotection.com/v1/orders/{sourceOrderId}', 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.production.orderprotection.com/v1/orders/{sourceOrderId}",
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.production.orderprotection.com/v1/orders/{sourceOrderId}"
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.production.orderprotection.com/v1/orders/{sourceOrderId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.production.orderprotection.com/v1/orders/{sourceOrderId}")
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{
"id": "asdasdfasdfasdfasdf",
"fulfillments": [
{
"id": "12345",
"sourceOrderId": "12345",
"fulfillmentStatus": "shipped",
"trackingCompany": "ups",
"trackingNumber": "12345",
"sourceItemIds": [
{
"id": "12345",
"quantity": 1
}
]
}
],
"sourceOrderId": "12345",
"sourceOrderNumber": "#12345",
"sourceCreatedAt": "2000-05-15T21:00:00.000Z",
"sourceUpdatedAt": "2024-05-28T20:05:55.338Z",
"sourceCancelledAt": "2024-05-28T20:05:55.339Z",
"platformId": "api",
"premiumPaid": 1.5,
"currency": "USD",
"orderItems": [
{
"id": "clv5u1ix00002pheol047kwrv",
"orderId": "clv5u1ix00000pheoqpxke986",
"productName": "Handcrafted Wooden Table",
"productUrl": "https://bogus-clarity.name/",
"productImage": "https://picsum.photos/seed/orderprotection1/200/300",
"itemDescription": null,
"sku": "978-0-10-081434-9",
"quantity": 20,
"price": 31.5,
"discount": 0,
"tax": 0,
"sourceItemId": "387179",
"sourceProductId": "477353",
"sourceVariantId": "17742",
"addressId": null,
"createdAt": "2024-04-18T22:48:08.964Z",
"updatedAt": "2024-04-18T22:48:08.964Z",
"refundedQuantity": 0
},
{
"id": "clv5u1ix00003pheom3edzt29",
"orderId": "clv5u1ix00000pheoqpxke986",
"productName": "Crazy T-Shirt",
"productUrl": "https://test.site/",
"productImage": "https://picsum.photos/seed/orderprotection2/200/300",
"itemDescription": null,
"sku": "5555",
"quantity": 3,
"price": 32.2,
"discount": 0,
"tax": 0,
"sourceItemId": "387180",
"sourceProductId": "477353",
"sourceVariantId": "17742",
"addressId": null,
"createdAt": "2024-04-18T22:48:08.964Z",
"updatedAt": "2024-04-18T22:48:08.964Z",
"refundedQuantity": 0
}
],
"total": 12.55,
"discountTotal": 2.55,
"shippingCost": 7.55,
"shippingCostTax": 1.44,
"tax": 1.44,
"subtotal": 1200,
"customerEmail": "customer@email.com",
"customerName": "John Doe",
"customerPhone": "(801) 555-5555",
"exchangeRate": 1,
"storeId": "test",
"policyId": "asdadsasdad",
"eligibleForOta": false,
"createdAt": "2024-05-28T20:05:55.339Z",
"activities": [
{
"message": "Order created",
"orderId": "asdasd"
}
],
"updatedAt": "2024-05-28T20:05:55.339Z",
"deletedAt": "2024-05-28T20:05:55.339Z"
}{
"message": "order not found",
"error": "Not Found",
"statusCode": 404
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Example:
"asdasdfasdfasdfasdf"
Example:
[
{
"id": "12345",
"sourceOrderId": "12345",
"fulfillmentStatus": "shipped",
"trackingCompany": "ups",
"trackingNumber": "12345",
"sourceItemIds": [{ "id": "12345", "quantity": 1 }]
}
]
Example:
"12345"
Example:
"#12345"
Example:
"2000-05-15T21:00:00.000Z"
Example:
"2024-05-28T20:05:55.338Z"
Example:
"2024-05-28T20:05:55.339Z"
Available options:
shopify, woocommerce, magento, bigcommerce, api Example:
"api"
Example:
1.5
Available options:
ADP, AED, AFA, AFN, ALK, ALL, AMD, ANG, AOA, AOK, AON, AOR, ARA, ARP, ARS, ARY, ATS, AUD, AWG, AYM, AZM, AZN, BAD, BAM, BBD, BDT, BEC, BEF, BEL, BGJ, BGK, BGL, BGN, BHD, BIF, BMD, BND, BOB, BOP, BOV, BRB, BRC, BRE, BRL, BRN, BRR, BSD, BTN, BUK, BWP, BYB, BYN, BYR, BZD, CAD, CDF, CHC, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CSD, CSJ, CSK, CUC, CUP, CVE, CYP, CZK, DDM, DEM, DJF, DKK, DOP, DZD, ECS, ECV, EEK, EGP, ERN, ESA, ESB, ESP, ETB, EUR, FIM, FJD, FKP, FRF, GBP, GEK, GEL, GHC, GHP, GHS, GIP, GMD, GNE, GNF, GNS, GQE, GRD, GTQ, GWE, GWP, GYD, HKD, HNL, HRD, HRK, HTG, HUF, IDR, IEP, ILP, ILR, ILS, INR, IQD, IRR, ISJ, ISK, ITL, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAJ, LAK, LBP, LKR, LRD, LSL, LSM, LTL, LTT, LUC, LUF, LUL, LVL, LVR, LYD, MAD, MDL, MGA, MGF, MKD, MLF, MMK, MNT, MOP, MRO, MRU, MTL, MTP, MUR, MVQ, MVR, MWK, MXN, MXP, MXV, MYR, MZE, MZM, MZN, NAD, NGN, NIC, NIO, NLG, NOK, NPR, NZD, OMR, PAB, PEH, PEI, PEN, PES, PGK, PHP, PKR, PLN, PLZ, PTE, PYG, QAR, RHD, ROK, ROL, RON, RSD, RUB, RUR, RWF, SAR, SBD, SCR, SDD, SDG, SDP, SEK, SGD, SHP, SIT, SKK, SLL, SOS, SRD, SRG, SSP, STD, STN, SUR, SVC, SYP, SZL, THB, TJR, TJS, TMM, TMT, TND, TOP, TPE, TRL, TRY, TTD, TWD, TZS, UAH, UAK, UGS, UGW, UGX, USD, USN, USS, UYI, UYN, UYP, UYU, UYW, UZS, VEB, VEF, VES, VNC, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XEU, XFO, XFU, XOF, XPD, XPF, XPT, XRE, XSU, XTS, XUA, XXX, YDD, YER, YUD, YUM, YUN, ZAL, ZAR, ZMK, ZMW, ZRN, ZRZ, ZWC, ZWD, ZWL, ZWN, ZWR Example:
"USD"
Example:
[
{
"id": "clv5u1ix00002pheol047kwrv",
"orderId": "clv5u1ix00000pheoqpxke986",
"productName": "Handcrafted Wooden Table",
"productUrl": "https://bogus-clarity.name/",
"productImage": "https://picsum.photos/seed/orderprotection1/200/300",
"itemDescription": null,
"sku": "978-0-10-081434-9",
"quantity": 20,
"price": 31.5,
"discount": 0,
"tax": 0,
"sourceItemId": "387179",
"sourceProductId": "477353",
"sourceVariantId": "17742",
"addressId": null,
"createdAt": "2024-04-18T22:48:08.964Z",
"updatedAt": "2024-04-18T22:48:08.964Z",
"refundedQuantity": 0
},
{
"id": "clv5u1ix00003pheom3edzt29",
"orderId": "clv5u1ix00000pheoqpxke986",
"productName": "Crazy T-Shirt",
"productUrl": "https://test.site/",
"productImage": "https://picsum.photos/seed/orderprotection2/200/300",
"itemDescription": null,
"sku": "5555",
"quantity": 3,
"price": 32.2,
"discount": 0,
"tax": 0,
"sourceItemId": "387180",
"sourceProductId": "477353",
"sourceVariantId": "17742",
"addressId": null,
"createdAt": "2024-04-18T22:48:08.964Z",
"updatedAt": "2024-04-18T22:48:08.964Z",
"refundedQuantity": 0
}
]
Example:
12.55
Example:
2.55
Example:
7.55
Example:
1.44
Example:
1.44
Example:
1200
Example:
"customer@email.com"
Example:
"John Doe"
Example:
"(801) 555-5555"
Example:
1
Example:
"test"
Example:
"asdadsasdad"
Example:
false
Example:
"2024-05-28T20:05:55.339Z"
Example:
[
{
"message": "Order created",
"orderId": "asdasd"
}
]
Example:
"2024-05-28T20:05:55.339Z"
Example:
"2024-05-28T20:05:55.339Z"

