Add product media
documentedAdd media to a product.
POST /rest/{store_code}/V1/products/{sku}/mediaCatalogno implementation yet0 runsNo implementation yet. Run it to have the agent write one, or open a pull request with your own.
Seed example (keychains curl)
npx -y keychains@latest curl "https://{{magento_base_url}}/rest/{{store_code}}/V1/products/{{$sku}}/media" \
-X POST \
-H "Authorization: Bearer {{OAUTH2_ACCESS_TOKEN}}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"entry": {"media_type": "image", "label": "{{$label}}", "position": {{$position}}, "disabled": {{$disabled}}, "types": ["image", "small_image", "thumbnail"], "file": "{{$image_filename}}", "content": {"base64_encoded_data": "{{$base64_encoded_data}}", "type": "{{$image_mime_type}}", "name": "{{$image_filename}}"}}}'