Skip to content
ShopentlyLearn

Read an allocated code or file

Download one specific allocation from an order. Codes return JSON; files return binary content.

GET/api/v1/orders/{order_id}/digital-deliveries/{delivery_id}/content

cURL request

: "${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/orders/order-example/digital-deliveries/00000000-0000-4000-8000-000000000005/content

Response

{
  "data": {
    "code": "DEMO-TWO",
    "delivery_id": "00000000-0000-4000-8000-000000000005",
    "kind": "code",
    "payload_id": "00000000-0000-4000-8000-000000000012",
    "unit_id": "00000000-0000-4000-8000-000000000011"
  },
  "meta": {
    "request_id": "example-request"
  }
}

Required permissions

Authentication
Access token
Available from
BASIC
Key permission
Reveal digital order contentorders.digital_delivery:reveal