Orders
Get order details
Returns a single Shoppex order by internal order ID or public uniqid. The response can include custom_fields set during invoice creation, for example { "source": "affiliate", "campaign": "spring_launch" }.
GET
/
dev
/
v1
/
orders
/
{id}
Get order details
curl --request GET \
--url https://api.shoppex.io/dev/v1/orders/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.shoppex.io/dev/v1/orders/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.shoppex.io/dev/v1/orders/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shoppex.io/dev/v1/orders/{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.shoppex.io/dev/v1/orders/{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))
}{
"data": {
"id": "ord_123",
"uniqid": "11111111-1111-4111-8111-111111111111",
"shop_id": "shop_1",
"customer_id": "cus_1",
"customer_email": "[email protected]",
"currency": "USD",
"status": "PENDING",
"payment_status": "PENDING",
"gateway": "STRIPE",
"blockchain": null,
"apm_method": "CARD",
"flow_type": "PROVIDER_SESSION",
"provider_reference": "pi_123",
"provider_reference_type": "PAYMENT_INTENT",
"total": 26.99,
"exchange_rate": 1,
"crypto_exchange_rate": 0,
"balance_paid_amount": 0,
"checkout_url": "https://checkout.shoppex.io/invoice/11111111-1111-4111-8111-111111111111",
"custom_fields": {
"source": "affiliate",
"campaign": "spring_launch"
},
"items": [
{
"product_id": "prod_starter",
"product_title": "Starter Pack",
"product_type": "DIGITAL",
"variant_title": "Standard",
"quantity": 1,
"unit_price": 29.99,
"total": 29.99,
"delivered_items": {
"access_url": "https://downloads.example.com/starter-pack"
}
}
],
"created_at": 1711510800,
"updated_at": 1711510860
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}Previous
Update order affiliate attributionAssigns affiliate attribution to a pending order using `affiliate_code`, `referral_code`, or `affiliate_id`. This updates attribution and pending commission records, but does not recalculate order totals or discounts.
Next
⌘I
Get order details
curl --request GET \
--url https://api.shoppex.io/dev/v1/orders/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.shoppex.io/dev/v1/orders/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.shoppex.io/dev/v1/orders/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shoppex.io/dev/v1/orders/{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.shoppex.io/dev/v1/orders/{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))
}{
"data": {
"id": "ord_123",
"uniqid": "11111111-1111-4111-8111-111111111111",
"shop_id": "shop_1",
"customer_id": "cus_1",
"customer_email": "[email protected]",
"currency": "USD",
"status": "PENDING",
"payment_status": "PENDING",
"gateway": "STRIPE",
"blockchain": null,
"apm_method": "CARD",
"flow_type": "PROVIDER_SESSION",
"provider_reference": "pi_123",
"provider_reference_type": "PAYMENT_INTENT",
"total": 26.99,
"exchange_rate": 1,
"crypto_exchange_rate": 0,
"balance_paid_amount": 0,
"checkout_url": "https://checkout.shoppex.io/invoice/11111111-1111-4111-8111-111111111111",
"custom_fields": {
"source": "affiliate",
"campaign": "spring_launch"
},
"items": [
{
"product_id": "prod_starter",
"product_title": "Starter Pack",
"product_type": "DIGITAL",
"variant_title": "Standard",
"quantity": 1,
"unit_price": 29.99,
"total": 29.99,
"delivered_items": {
"access_url": "https://downloads.example.com/starter-pack"
}
}
],
"created_at": 1711510800,
"updated_at": 1711510860
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}