Get Order Details
Fetches full order metadata, delivered credentials/keys (deliveredPayload), and resolved customer instructions for a single order owned by your account.
Requesting an orderId that does not exist or belongs to another user returns 404 NOT_FOUND.
- cURL
- JavaScript (fetch)
- Python (requests)
- PHP
curl -sS -X GET "https://api.example.com/api/v1/orders/ord_mock_001" \
-H "x-api-key: YOUR_API_KEY" \
-H "Accept: application/json"
const res = await fetch("https://api.example.com/api/v1/orders/ord_mock_001", {
method: "GET",
headers: {
"x-api-key": process.env.GPKEYS_API_KEY ?? "YOUR_API_KEY",
Accept: "application/json",
},
});
if (!res.ok) {
const err = await res.json().catch(() => ({}));
throw new Error(`HTTP ${res.status}: ${JSON.stringify(err)}`);
}
const data = await res.json();
console.log(data);
import os
import requests
headers = {
"x-api-key": os.environ.get("GPKEYS_API_KEY", "YOUR_API_KEY"),
"Accept": "application/json",
}
resp = requests.get("https://api.example.com/api/v1/orders/ord_mock_001", headers=headers, timeout=15)
resp.raise_for_status()
print(resp.json())
<?php
$apiKey = getenv('GPKEYS_API_KEY') ?: 'YOUR_API_KEY';
$ch = curl_init('https://api.example.com/api/v1/orders/ord_mock_001');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 15,
CURLOPT_HTTPHEADER => [
'x-api-key: ' . $apiKey,
'Accept: application/json',
],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "HTTP {$status}\n" . ($body) . "\n";
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
orderId | string | Yes | Order ID owned by the authenticated user. |
Success Response (200 OK)
{
"order": {
"id": "ord_mock_001",
"orderNumber": "ORD-20261130-1001",
"apiKeyId": "key_mock_01",
"status": "DELIVERED",
"total": "12.000000",
"currency": "USDT",
"paidAt": "2026-11-30T18:10:00.000Z",
"deliveredAt": "2026-11-30T18:10:00.000Z",
"createdAt": "2026-11-30T18:10:00.000Z",
"items": [
{
"id": "item_mock_001",
"productId": "prod_win11_pro",
"title": "Windows 11 Pro Retail Key",
"unitPrice": "12.000000",
"quantity": 1,
"lineTotal": "12.000000",
"deliveryType": "LICENSE_KEY",
"deliveredPayload": {
"type": "LICENSE_KEY",
"key": "WIN11-MOCK-KEY-0001"
},
"deliveredInstructions": null,
"deliveredAt": "2026-11-30T18:10:00.000Z"
}
]
}
}
Error Responses
| HTTP | error.code | Cause |
|---|---|---|
401 | UNAUTHORIZED | Invalid, revoked, or expired key |
403 | FORBIDDEN / FRAUD_DETECTED | Disabled key, suspended user, or fraud block |
404 | NOT_FOUND | Unknown orderId or belongs to another account |
429 | RATE_LIMITED | Rate limit exceeded |
500 | INTERNAL_ERROR | Unexpected server error |