Produkty · Wydania cyfrowe
Pliki przesyłasz jako multipart/form-data po utworzeniu upload_id, a następnie przypisujesz do produktu. Pobranie wymaga tokenu Bearer i uprawnienia dla category; odpowiedź zawiera bajty pliku, bez publicznego adresu i hasła. Jawna reguła dostępu do przesłanego współdzielonego pliku cyfrowego. new_purchases / recent_and_new / selected / all_purchasers.
GET
/api/v1/products/{product_id}/file-releasesŻądanie cURL
curl --disable --globoff --fail-with-body --silent --show-error \
--proto '=https' --connect-timeout 5 --max-time 30 \
--request GET \
--url https://shop.onshopently.com/api/v1/products/example/file-releases \
--header 'Authorization: Bearer EXAMPLE_ACCESS_TOKEN'
Odpowiedź
{
"data": {
"current_release_id": "00000000-0000-4000-8000-000000000001",
"product_version": 2,
"releases": [
{
"changelog": "Manual update",
"files": [
{
"file_id": "00000000-0000-4000-8000-000000000001",
"sort_order": 0,
"version_id": "00000000-0000-4000-8000-000000000001"
}
],
"id": "00000000-0000-4000-8000-000000000001",
"manifest_sha256": "1111111111111111111111111111111111111111111111111111111111111111",
"published_at": null,
"release_sequence": null,
"state": "active",
"version_label": "1.0",
"withdrawn_at": null
}
],
"update_days": 365,
"update_mode": "period",
"update_months": null
},
"meta": {
"pagination": {
"has_more": false,
"limit": 50,
"next_cursor": null
},
"request_id": "example"
}
}
Wymagane uprawnienia
- Uwierzytelnianie
- Token dostępu
- Dostępne od planu
- STANDARD
- Uprawnienie klucza
- Wyświetlanie plików produktu · Produkty cyfrowe
catalog.product_file:read_digital