Отримати вміст вільної одиниці
Код повертається як JSON, файл — як двійкові дані. Кожен запит потребує Bearer і дозволу reveal.
GET
/api/v1/inventory/products/{product_id}/digital-units/{unit_id}/contentЗапит cURL
: "${SHOPENTLY_SHOP_URL:?}"
curl --disable --globoff --fail-with-body --silent --show-error \
--proto '=https' --connect-timeout 5 --max-time 300 \
--request GET \
--header "Authorization: Bearer ${SHOPENTLY_ACCESS_TOKEN:?}" \
--max-filesize 262144000 \
--output "${SHOPENTLY_OUTPUT_FILE:?}" \
--url "${SHOPENTLY_SHOP_URL%/}"/api/v1/inventory/products/example/digital-units/00000000-0000-4000-8000-000000000003/content
Відповідь
{
"data": {
"code": "DEMO-ONE",
"delivery_id": null,
"kind": "code",
"payload_id": "00000000-0000-4000-8000-000000000004",
"unit_id": "00000000-0000-4000-8000-000000000003"
},
"meta": {
"request_id": "example-request"
}
}
Потрібні дозволи
- Автентифікація
- Токен доступу
- Доступно починаючи з
- STANDARD
- Дозвіл ключа
- Доступ до вмісту пулу
inventory.digital_unit:reveal