Add an image by URL
Permission
products:writeRate limit writesIdempotent with Idempotency-KeyAuthorization
ESTAGE-API-KeystringheaderrequiredA project key, est_live_…, from Settings → API keys. Call from server code only.
Path parameters
idintegerrequiredBody
application/jsonsrcstringrequireduri≤ 2048 charsPublic URL of the image. Stored as given; not downloaded.
altstringnullable≤ 255 charspositionintegernullabledefault 0≥ 0Headers
Idempotency-Keystring≤ 255 charsAny unique string per attempt. A retry with the same key gets the first answer back instead of doing the work twice.
RequestcURL
curl --request POST \ --url 'https://api.estage.com/v1/products/product-id/images' \ --header 'ESTAGE-API-Key: est_live_your-api-key' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: your-unique-key' \ --data '{ "src": "https://cdn.example.com/tee-front.jpg", "alt": "Front", "position": 0 }'
Created
{
"data": {
"id": 9120,
"src": "https://cdn.example.com/tee-front.jpg",
"alt": "Front",
"position": 0
}
}Example. Errors are
{ error: { code, message, details } }.