Use this API to find orders.
Search for orders
To view orders, send a GET request to:
https://app.digital-downloads.com/api/v1/orders
To find orders, you can add query string parameters. The results are paginated. Use the query string parameter page
for more pages, or use the links provided in the response.
JSON
{
"limit": 100, // max of 1000 will be retuned
"page": 2,
"order_number": 1050,
"with_assets": true // show assets directly attached to the order
// (not assets attached to the products in the order)
}
Response
JSON
{
"data": {
"id": "82664d96-6dfd-4343-aaaa-05c46f412a5b",
"order_number": 1050,
"email_sent_at": 1673214647,
"ordered_at": 1673214646,
"assets": [
{
"id": "82664d96-6dfd-4343-96b0-05c46f412a5b",
"filename": "My new book",
"size": "10MB",
"is_file": false,
"is_link": true,
"url": "https://www.my-website.com/download/my-book.pdf"
}
]
},
"links": {
"first": "https://app.digital-downloads.com/api/v1/orders?page=1",
"last": "https://app.digital-downloads.com/api/v1/orders?page=625",
"prev": null,
"next": "https://app.digital-downloads.com/api/v1/orders?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 625,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://app.digital-downloads.com/api/v1/orders?page=1",
"label": "1",
"active": true
},
{
"url": "https://app.digital-downloads.com/api/v1/orders?page=2",
"label": "2",
"active": false
},
{
"url": "https://app.digital-downloads.com/api/v1/orders?page=3",
"label": "3",
"active": false
},
{
"url": "https://app.digital-downloads.com/api/v1/orders?page=4",
"label": "4",
"active": false
},
{
"url": "https://app.digital-downloads.com/api/v1/orders?page=5",
"label": "5",
"active": false
},
{
"url": "https://app.digital-downloads.com/api/v1/orders?page=6",
"label": "6",
"active": false
},
{
"url": "https://app.digital-downloads.com/api/v1/orders?page=7",
"label": "7",
"active": false
},
{
"url": "https://app.digital-downloads.com/api/v1/orders?page=8",
"label": "8",
"active": false
},
{
"url": "https://app.digital-downloads.com/api/v1/orders?page=9",
"label": "9",
"active": false
},
{
"url": "https://app.digital-downloads.com/api/v1/orders?page=10",
"label": "10",
"active": false
},
{
"url": null,
"label": "...",
"active": false
},
{
"url": "https://app.digital-downloads.com/api/v1/orders?page=624",
"label": "624",
"active": false
},
{
"url": "https://app.digital-downloads.com/api/v1/orders?page=625",
"label": "625",
"active": false
},
{
"url": "https://app.digital-downloads.com/api/v1/orders?page=2",
"label": "Next »",
"active": false
}
],
"path": "https://app.digital-downloads.com/api/v1/orders",
"per_page": 25,
"to": 25,
"total": 15608
}
}
View an order
To view an individual order, load linked assets optionally. Send a GET request to:
https://app.digital-downloads.com/api/v1/orders/:id
Example
https://app.digital-downloads.com/api/v1/orders/82664d96-6dfd-4343-aaaa-05c46f412a5b?with_assets=1
Response
JSON
{
"data": [
{
"id": "82664d96-6dfd-4343-aaaa-05c46f412a5b",
"order_number": 1050,
"assets": [
{
"id": "82664d96-6dfd-4343-96b0-05c46f412a5b",
"filename": "My new book",
"size": "10MB",
"is_file": false,
"is_link": true,
"url": "https://www.my-website.com/download/my-book.pdf"
}
]
}
]
}