Import Media
If you have an external source for your media files like images, you can use the bulk media images endpoint to import images for your products in bulk.
Endpoint
POST /v2/media/images/bulk
Request body
[
{
"productId": 14733,
"source": "MyPIM",
"sourceId": "NCABD70005_1",
"alt": [
{
"language": "en",
"value": "Image NCABD70005"
}
],
"description": [
{
"language": "en",
"value": "Image of NCABD70005"
}
],
"tags": [
{
"language": "en",
"values": [
"Product,front"
]
}
],
"priority": 1,
"uploadImages": [
{
"language": "en",
"uploadType": "URL",
"urlFile": {
"url": "http://myexamplePIM/images/productimages/NCABD70005_1",
"fileName": "NCABD70005_1"
}
}
]
}
]
Data fields
productId: the Propeller product ID of the product you want to add the image(s) to.
source and sourceId: source specifies the origin of the image (for example "MyPIM" or "IMAGE_FTP"). sourceId is the unique identifier of the image in that source system, often the product number followed by _1, _2, _3 etc. See Sources for how source combinations work.
alt, description and tags: localized metadata for the image. These fields accept multiple languages using the standard Localized Strings format.
priority: determines the order in which images are shown. A lower number means a higher priority. An image with priority 1 will be shown before an image with priority 5.
uploadImages: specifies the image URLs per language. Each entry contains:
language— the language codeuploadType— alwaysURLurlFile— an object with:url— the full URL to the image filefileName— the file name for the image
Response
Each image in the batch returns a result:
{
"data": [
{
"id": "0826c75d-2e2e-422d-b064-1c2296d5c8e7",
"key": "NCABD70005_1",
"lookupKey": "sourceId",
"action": "update",
"success": true
}
],
"messages": ["Completed"],
"total": 1
}
successindicates whether the operation succeededkeyis the sourceId of the imageidis the Propeller internal media ID (UUID)actioniscreateorupdatedepending on whether the image already existedlookupKeyconfirms the identifier type used
See also
- Sources for how source combinations work in bulk operations
- Localized Strings for the multi-language field format
- REST API Reference for the full endpoint specification