const url = 'https://api.thanks.io/api/v2/orders/list';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}, body: undefined};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
{
"data": [
{
"id": 42708,
"message": "Hey %FIRST_NAME%!,\n\nTHANK YOU for allowing us the opportunity to HELP you with your plan!",
"size": "4x6",
"sub_account_id": null,
"type": "postcard",
"display_type": "Postcard-4x6",
"style": 1,
"front_image": "https://s3.amazonaws.com/cdn.thanks.io/user_image_library/gFBaJJJWRp60op3ZOoK7UaO5I7zi33rdKQGgHylR.png",
"high_quality_preview": "",
"authorization_total": 73,
"grand_total": 73,
"order_total": 73,
"total_estimated_recipients": 1,
"total_recipients": 1,
"recipient_count": 1,
"status": "Fulfilled",
"method": "Campaign",
"cancellable": false,
"total_scans": 0,
"created_at": "2025-09-08T16:05:12.000000Z",
"updated_at": "2025-09-08T16:06:08.000000Z"
}
],
"links": {
"first": "https://api.thanks.io/api/v2/orders/list?page=1",
"last": "https://api.thanks.io/api/v2/orders/list?page=4992",
"prev": null,
"next": "https://api.thanks.io/api/v2/orders/list?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 4992,
"path": "https://api.thanks.io/api/v2/orders/list",
"per_page": "1",
"to": 1,
"total": 4992
}
}
Return list of recent orders.
const url = 'https://api.thanks.io/api/v2/orders/list';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}, body: undefined};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
{
"data": [
{
"id": 42708,
"message": "Hey %FIRST_NAME%!,\n\nTHANK YOU for allowing us the opportunity to HELP you with your plan!",
"size": "4x6",
"sub_account_id": null,
"type": "postcard",
"display_type": "Postcard-4x6",
"style": 1,
"front_image": "https://s3.amazonaws.com/cdn.thanks.io/user_image_library/gFBaJJJWRp60op3ZOoK7UaO5I7zi33rdKQGgHylR.png",
"high_quality_preview": "",
"authorization_total": 73,
"grand_total": 73,
"order_total": 73,
"total_estimated_recipients": 1,
"total_recipients": 1,
"recipient_count": 1,
"status": "Fulfilled",
"method": "Campaign",
"cancellable": false,
"total_scans": 0,
"created_at": "2025-09-08T16:05:12.000000Z",
"updated_at": "2025-09-08T16:06:08.000000Z"
}
],
"links": {
"first": "https://api.thanks.io/api/v2/orders/list?page=1",
"last": "https://api.thanks.io/api/v2/orders/list?page=4992",
"prev": null,
"next": "https://api.thanks.io/api/v2/orders/list?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 4992,
"path": "https://api.thanks.io/api/v2/orders/list",
"per_page": "1",
"to": 1,
"total": 4992
}
}
Bearer token authentication using your thanks.io API key
Number of items to return per page.
Filter results by Sub Account ID.
OK
The response is of type object
.
Was this page helpful?