Producten · Bestanden toevoegen · multipart
Upload bestanden als multipart/form-data na het aanmaken van upload_id en koppel ze daarna aan het product. Downloaden vereist een Bearer-token en toestemming voor category; de respons bevat bestandsbytes, zonder openbaar adres of wachtwoord. Expliciete toegangsregel voor het gedeelde bestand. new_purchases / recent_and_new / selected / all_purchasers.
PUT
/api/v1/product-file-uploads/{upload_id}/contentcURL-aanvraag
: "${SHOPENTLY_SHOP_URL:?}"
case "${SHOPENTLY_PRODUCT_FILE:?}" in *[!a-zA-Z0-9/._\ -]*) echo "Unsupported file path" >&2; exit 1;; esac
curl --disable --globoff --fail-with-body --silent --show-error \
--proto '=https' --connect-timeout 5 --max-time 300 \
--request PUT \
--header "Authorization: Bearer ${SHOPENTLY_ACCESS_TOKEN:?}" \
--form "file=@${SHOPENTLY_PRODUCT_FILE:?};filename=manual.pdf;type=application/pdf" \
--url "${SHOPENTLY_SHOP_URL%/}"'/api/v1/product-file-uploads/00000000-0000-4000-8000-000000000001/content?category=digital'
Antwoord
{
"data": {
"category": "digital",
"expires_at": "2026-01-01T12:00:00Z",
"filename": "manual.pdf",
"id": "00000000-0000-4000-8000-000000000001",
"product_id": "example",
"received_bytes": 46,
"sha256": "5cd2f1cb0e5532b397e7ab1887baf6000c49450fd80ae279eb047c06e4545ecd",
"size_bytes": 46,
"status": "ready"
},
"meta": {
"request_id": "example"
}
}
Vereiste rechten
- Authenticatie
- Toegangstoken
- Beschikbaar vanaf
- STANDARD
- Vereiste rechten
Aanvullende rechten voor bepaalde velden
category=internal: Productbestanden beheren · Interne bestandencatalog.product_file:write_internalcategory=customer_document: Productbestanden beheren · Klantdocumentencatalog.product_file:write_customer_documentcategory=digital: Productbestanden beheren · Digitale productencatalog.product_file:write_digital