For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

Create a product image upload URL

post

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.

Authorizations
AuthorizationstringRequired

API Token authentication

Path parameters
store_idstringRequired

The ID of the store the product belongs to.

Example: store_01J8Z5F8W9K8M4A7B3C2D1E0FG
product_idstringRequired

The ID of the product the image will be attached to.

Example: prod_01J8Z5F8W9K8M4A7B3C2D1E0FG
Responses
200

Success response

application/json
upload_urlstringOptional

Signed URL to upload the image to with a multipart/form-data POST.

Example: https://storage.googleapis.com/ecommerce-quarantine-euw3
object_namestringOptional

Key of the uploaded object — send it to the attach-image endpoint.

Example: store_01J8Z5F8W9K8M4A7B3C2D1E0FG/01J8Z5F8W9K8M4A7B3C2D1E0FG
max_bytesintegerOptional

Maximum accepted upload size in bytes.

Example: 15728640
post/api/ecommerce/v1/stores/{store_id}/products/{product_id}/images/upload-url
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?