Create a product image upload URL
Returns a signed URL to upload a product image to (multipart/form-data POST). Then call the attach-image endpoint with the returned objectname to scan and attach it to the product.
Returns a signed URL to upload a product image to (multipart/form-data POST). Then call the attach-image endpoint with the returned object_name to scan and attach it to the product.
API Token authentication
The ID of the store the product belongs to.
store_01J8Z5F8W9K8M4A7B3C2D1E0FGThe ID of the product the image will be attached to.
prod_01J8Z5F8W9K8M4A7B3C2D1E0FGSuccess response
Signed URL to upload the image to with a multipart/form-data POST.
https://storage.googleapis.com/ecommerce-quarantine-euw3Key of the uploaded object — send it to the attach-image endpoint.
store_01J8Z5F8W9K8M4A7B3C2D1E0FG/01J8Z5F8W9K8M4A7B3C2D1E0FGMaximum accepted upload size in bytes.
15728640Unauthenticated response
Error response
POST /api/ecommerce/v1/stores/{store_id}/products/{product_id}/images/upload-url HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"upload_url": "https://storage.googleapis.com/ecommerce-quarantine-euw3",
"fields": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"object_name": "store_01J8Z5F8W9K8M4A7B3C2D1E0FG/01J8Z5F8W9K8M4A7B3C2D1E0FG",
"max_bytes": 15728640
}Last updated
Was this helpful?