Bulk images
POST/media/images/bulk
Fields
Name | Description | Type | Required |
---|---|---|---|
Array of mediaImage objects | array[MediaImage] | yes |
MediaImage input
Name | Description | Type | Required |
---|---|---|---|
productId | Id of the product resource the image should be linked to | integer | no |
source | External system Read more about lookup key source/sourceId | string | yes |
sourceId | External system unique id Read more about lookup key source/sourceId | string | yes |
priority | Image display priority (lower value has higher priority) Default is 1000 | integer | no |
alt | Image alt description that briefly explains the contents of the image | array[LocalizedString] | yes |
description | Image short description | array[LocalizedString] | yes |
tags | Free format field to categorize image on type (e.g. logo, banner, icon, etc) | array[LocalizedString] | yes |
uploadImages | array[UploadImages] | yes |
UploadImages input
Name | Description | Type | Required |
---|---|---|---|
language | Language specific image Default is en | string | no |
uploadType | Default is URL | string | no |
urlFile | UrlFile object |
UrlFile input
Name | Description | Type | Required |
---|---|---|---|
url | Public url to the image | string | yes |
fileName | Name to use for storing the file | string | yes |
Request
- application/json
Body
Array [
]
Array [
]
Array [
]
Array [
]
alt
object[]
language string
value string
description
object[]
language string
value string
priority number
productId number
source string
sourceId string
tags
object[]
language string
values string[]
uploadImages
object[]
language string
uploadType string
urlFile
object
fileName string
url string
Responses
- 200
- 400
Bulk images - 200
Response Headers
Alt-Svc
string
Via
string
alt-svc
string
content-length
string
date
string
etag
string
x-powered-by
string
x-request-id
string
- application/json
- Schema
- Example (from schema)
- Bulk images - 200
Schema
Array [
]
data
object[]
action string
id string
key string
lookupKey string
success boolean
messages string[]
total number
{
"data": [
{
"action": "update",
"id": "8096d15a-128f-4603-ac33-38c53f8e36d6",
"key": "Lorem_Ipsum_1",
"lookupKey": "sourceId",
"success": true
},
{
"action": "update",
"id": "ef725b14-dd81-4350-b004-bb065cb82e14",
"key": "Lorem_Ipsum_2",
"lookupKey": "sourceId",
"success": true
}
],
"messages": [
"Completed"
],
"total": 2
}
{
"data": [
{
"action": "update",
"id": "8096d15a-128f-4603-ac33-38c53f8e36d6",
"key": "Lorem_Ipsum_1",
"lookupKey": "sourceId",
"success": true
},
{
"action": "update",
"id": "ef725b14-dd81-4350-b004-bb065cb82e14",
"key": "Lorem_Ipsum_2",
"lookupKey": "sourceId",
"success": true
}
],
"messages": [
"Completed"
],
"total": 2
}
Bulk images - 400 / Bulk images - 400 (invalid schema)
Response Headers
Alt-Svc
string
Via
string
alt-svc
string
content-length
string
date
string
etag
string
x-powered-by
string
x-request-id
string
- application/json
- Schema
- Example (from schema)
- Bulk images - 400
- Bulk images - 400 (invalid schema)
Schema
- MOD1
- MOD2
Array [
]
error string
message
object
anyOf
string
string
statusCode number
{
"error": "Bad Request",
"message": [
"source must be shorter than or equal to 32 characters",
"source should not be empty",
"source must be a string",
"sourceId must be shorter than or equal to 64 characters",
"sourceId should not be empty",
"sourceId must be a string"
],
"statusCode": 400
}
{
"error": "Bad Request",
"message": [
"source must be shorter than or equal to 32 characters",
"source should not be empty",
"source must be a string",
"sourceId must be shorter than or equal to 64 characters",
"sourceId should not be empty",
"sourceId must be a string"
],
"statusCode": 400
}
{
"error": "Bad Request",
"message": "Validation failed (parsable array expected)",
"statusCode": 400
}
Loading...