Endpoint
Retrieve an export
GET
/v1/exports/{id}Returns one export by its id, as the export object.
- Scope a restricted key needs
exports:read- Publishable key
- Not allowed: secret or restricted key only
- Idempotency-Key
- Not used. A GET is already safe to repeat.
Parameters
| Parameter | Type and place | Meaning |
|---|---|---|
idrequired | stringpath | The id of the export. |
Orrerie-Version | stringheader | API version date. Default: the version the key was created with. Example 2026-10-11. |
Example request
curl
curl https://api.orrerie.com/v1/exports/exp_kpvgpbjqmv3kexwyrnp12j8e \
-H "Authorization: Bearer $ORRERIE_SECRET_KEY"JavaScript
const response = await fetch("https://api.orrerie.com/v1/exports/exp_kpvgpbjqmv3kexwyrnp12j8e", {
headers: {
Authorization: `Bearer ${process.env.ORRERIE_SECRET_KEY}`,
},
});
const result = await response.json();
if (!response.ok) throw new Error(`${result.error.code}: ${result.error.message}`);
console.log(result);Python
import os
import requests
response = requests.get(
"https://api.orrerie.com/v1/exports/exp_kpvgpbjqmv3kexwyrnp12j8e",
headers={"Authorization": f"Bearer {os.environ['ORRERIE_SECRET_KEY']}"},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(f"{result['error']['code']}: {result['error']['message']}")
print(result)PHP
<?php
$request = curl_init('https://api.orrerie.com/v1/exports/exp_kpvgpbjqmv3kexwyrnp12j8e');
curl_setopt_array($request, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ORRERIE_SECRET_KEY'),
],
]);
$body = curl_exec($request);
if ($body === false) {
throw new RuntimeException(curl_error($request));
}
$result = json_decode($body, true);
if (curl_getinfo($request, CURLINFO_HTTP_CODE) >= 400) {
throw new RuntimeException($result['error']['code'] . ': ' . $result['error']['message']);
}
print_r($result);Responses
200 OK
The answer is the export object. Headers: Orrerie-Request-Id.
Example response, 200
{
"id": "exp_kpvgpbjqmv3kexwyrnp12j8e",
"object": "export",
"livemode": true,
"created": "2026-10-12T08:00:00.000Z",
"type": "orders",
"format": "csv",
"status": "ready",
"filters": {
"created": {
"gte": "2026-09-01T00:00:00.000Z",
"lt": "2026-10-01T00:00:00.000Z"
},
"status": [
"paid",
"overpaid"
]
},
"timezone": "America/Los_Angeles",
"display_currency": "USD",
"row_count": 212,
"file": "file_cb1074yxtrbjzx9g7djqa8yr",
"snapshot_at": "2026-10-12T08:00:00.000Z",
"completed_at": "2026-10-12T08:00:07.300Z",
"expires_at": "2026-10-19T08:00:07.300Z",
"failure_code": null,
"requested_by": {
"type": "api_key",
"id": "key_6e3gg2c6ea176xxdek2nar6v"
}
}Any other status: an error
A status of 400 or above answers with the error object. Branch on its code, never on its message.
Errors
This call has no error of its own. It answers with the errors every call can answer with: a bad key, a missing scope, an object that does not exist, the rate limit. Every error code has its own entry.