curl -u "your_username:your_password" \
-X PUT https://api.fourthwall.com/open-api/v1.0/order/by-friendly-id/D3XZFWPP/downloaded \
-H "Content-Type: application/json" \
-d '{
"defaultFileUrl": "https://example.com/files/album.zip"
}'
const credentials = btoa("your_username:your_password");
const response = await fetch(
"https://api.fourthwall.com/open-api/v1.0/order/by-friendly-id/D3XZFWPP/downloaded",
{
method: "PUT",
headers: {
Authorization: `Basic ${credentials}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
defaultFileUrl: "https://example.com/files/album.zip",
}),
}
);
if (!response.ok) {
const error = await response.json();
throw new Error(`${response.status} ${error.code}`);
}
import requests
response = requests.put(
"https://api.fourthwall.com/open-api/v1.0/order/by-friendly-id/D3XZFWPP/downloaded",
auth=("your_username", "your_password"),
json={"defaultFileUrl": "https://example.com/files/album.zip"},
)
response.raise_for_status()
curl -X PUT https://api.fourthwall.com/open-api/v1.0/order/by-friendly-id/D3XZFWPP/downloaded \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{}'
(empty body)
{
"code": "ORDER_HAS_NO_DOWNLOADS_ERROR",
"orderId": "9b7028f3-6594-4015-9d11-1116e8aad2e4"
}
{
"code": "ORDER_FRIENDLY_ID_NOT_FOUND",
"id": "D3XZFWPP"
}
{
"code": "OPEN_API_TOO_MANY_REQUESTS",
"title": "Too many requests",
"status": 429
}
Orders
Mark Digital Download Complete by Friendly ID
Mark an order’s digital downloads as downloaded, addressing the order by its customer-facing friendly ID
PUT
/
open-api
/
v1.0
/
order
/
by-friendly-id
/
{friendlyId}
/
downloaded
curl -u "your_username:your_password" \
-X PUT https://api.fourthwall.com/open-api/v1.0/order/by-friendly-id/D3XZFWPP/downloaded \
-H "Content-Type: application/json" \
-d '{
"defaultFileUrl": "https://example.com/files/album.zip"
}'
const credentials = btoa("your_username:your_password");
const response = await fetch(
"https://api.fourthwall.com/open-api/v1.0/order/by-friendly-id/D3XZFWPP/downloaded",
{
method: "PUT",
headers: {
Authorization: `Basic ${credentials}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
defaultFileUrl: "https://example.com/files/album.zip",
}),
}
);
if (!response.ok) {
const error = await response.json();
throw new Error(`${response.status} ${error.code}`);
}
import requests
response = requests.put(
"https://api.fourthwall.com/open-api/v1.0/order/by-friendly-id/D3XZFWPP/downloaded",
auth=("your_username", "your_password"),
json={"defaultFileUrl": "https://example.com/files/album.zip"},
)
response.raise_for_status()
curl -X PUT https://api.fourthwall.com/open-api/v1.0/order/by-friendly-id/D3XZFWPP/downloaded \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{}'
(empty body)
{
"code": "ORDER_HAS_NO_DOWNLOADS_ERROR",
"orderId": "9b7028f3-6594-4015-9d11-1116e8aad2e4"
}
{
"code": "ORDER_FRIENDLY_ID_NOT_FOUND",
"id": "D3XZFWPP"
}
{
"code": "OPEN_API_TOO_MANY_REQUESTS",
"title": "Too many requests",
"status": 429
}
OAuth scope:
order_writeAPI keys have full access to this endpoint.D3XZFWPP). Use this endpoint when your system stores that code instead of the order UUID, so you don’t have to call Get Order by Friendly ID first to look up the UUID.
Behavior
The endpoint looks up the order in your shop by friendly ID, then:| Order state | defaultFileUrl in body | Result |
|---|---|---|
| Has digital downloads | ignored | Every download that hasn’t been downloaded yet is marked as downloaded. Returns 200. |
| No downloads, contains a digital product | provided | A download pointing to defaultFileUrl is created (up to 1000 downloads allowed) and marked as downloaded. Returns 200. |
| No downloads, contains a digital product | omitted | 400 ORDER_HAS_NO_DOWNLOADS_ERROR |
| No downloads, physical products only | provided or omitted | 400 ORDER_HAS_NO_DOWNLOADS_ERROR. A download is never created for a physical order. |
| No order with this friendly ID in your shop | — | 404 ORDER_FRIENDLY_ID_NOT_FOUND |
The call is idempotent. Only downloads that haven’t been downloaded yet are updated, so retrying after a timeout or network error is safe. Download counts are not increased again.
defaultFileUrl fallback. Without it, either send {} or send no body.
Friendly IDs are scoped to your shop. An order from another shop returns
404, the same as an order that doesn’t exist.Examples
Mark existing downloads as downloaded
curl -u "your_username:your_password" \
-X PUT https://api.fourthwall.com/open-api/v1.0/order/by-friendly-id/D3XZFWPP/downloaded \
-H "Content-Type: application/json" \
-d '{}'
Create a download from a fallback URL when none exists
Use this when the files for a digital order are delivered outside Fourthwall (for example, from your own storage). If the order already has downloads,defaultFileUrl is ignored.
curl -u "your_username:your_password" \
-X PUT https://api.fourthwall.com/open-api/v1.0/order/by-friendly-id/D3XZFWPP/downloaded \
-H "Content-Type: application/json" \
-d '{
"defaultFileUrl": "https://example.com/files/album.zip"
}'
200 OK with an empty body.
curl -u "your_username:your_password" \
-X PUT https://api.fourthwall.com/open-api/v1.0/order/by-friendly-id/D3XZFWPP/downloaded \
-H "Content-Type: application/json" \
-d '{
"defaultFileUrl": "https://example.com/files/album.zip"
}'
const credentials = btoa("your_username:your_password");
const response = await fetch(
"https://api.fourthwall.com/open-api/v1.0/order/by-friendly-id/D3XZFWPP/downloaded",
{
method: "PUT",
headers: {
Authorization: `Basic ${credentials}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
defaultFileUrl: "https://example.com/files/album.zip",
}),
}
);
if (!response.ok) {
const error = await response.json();
throw new Error(`${response.status} ${error.code}`);
}
import requests
response = requests.put(
"https://api.fourthwall.com/open-api/v1.0/order/by-friendly-id/D3XZFWPP/downloaded",
auth=("your_username", "your_password"),
json={"defaultFileUrl": "https://example.com/files/album.zip"},
)
response.raise_for_status()
curl -X PUT https://api.fourthwall.com/open-api/v1.0/order/by-friendly-id/D3XZFWPP/downloaded \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{}'
(empty body)
{
"code": "ORDER_HAS_NO_DOWNLOADS_ERROR",
"orderId": "9b7028f3-6594-4015-9d11-1116e8aad2e4"
}
{
"code": "ORDER_FRIENDLY_ID_NOT_FOUND",
"id": "D3XZFWPP"
}
{
"code": "OPEN_API_TOO_MANY_REQUESTS",
"title": "Too many requests",
"status": 429
}