const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.thanks.io/api/v2/orders/list', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
{
"data": [
{
"id": 37265,
"message": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"size": "4x6",
"sub_account_id": 1,
"type": "postcard",
"style": 4,
"front_image": "https://s3.amazonaws.com/cdn.thanks.io/user_image_library/1533645532.png",
"high_quality_preview": null,
"total_estimated_recipients": 1,
"authorization_total": 49,
"total_recipients": 1,
"grand_total": 49,
"status": "Fulfilled",
"method": "Card Builder",
"created_at": {
"date": "2020-03-30 16:33:04.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2020-12-25 02:48:06.000000",
"timezone_type": 3,
"timezone": "UTC"
}
}
],
"links": {
"first": "https://develop-dashboard.thanks.io/api/v2/orders/list?page=1",
"last": "https://develop-dashboard.thanks.io/api/v2/orders/list?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://develop-dashboard.thanks.io/api/v2/orders/list",
"per_page": "5",
"to": 1,
"total": 1
}
}
Return list of recent orders.
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.thanks.io/api/v2/orders/list', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
{
"data": [
{
"id": 37265,
"message": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"size": "4x6",
"sub_account_id": 1,
"type": "postcard",
"style": 4,
"front_image": "https://s3.amazonaws.com/cdn.thanks.io/user_image_library/1533645532.png",
"high_quality_preview": null,
"total_estimated_recipients": 1,
"authorization_total": 49,
"total_recipients": 1,
"grand_total": 49,
"status": "Fulfilled",
"method": "Card Builder",
"created_at": {
"date": "2020-03-30 16:33:04.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2020-12-25 02:48:06.000000",
"timezone_type": 3,
"timezone": "UTC"
}
}
],
"links": {
"first": "https://develop-dashboard.thanks.io/api/v2/orders/list?page=1",
"last": "https://develop-dashboard.thanks.io/api/v2/orders/list?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://develop-dashboard.thanks.io/api/v2/orders/list",
"per_page": "5",
"to": 1,
"total": 1
}
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Max results to send (optional). Valid values are 1-100
ID of subaccount to use (optional)
OK
The response is of type object
.
Was this page helpful?