Bulk Cluster Products by sourceId
POST/clusters/:lookupKey/:lookupValue/products/bulk
The bulk endpoints offer an efficient way of importing/updating large amounts of cluster products with just a single API call. The same lookup key is used for the products as for the cluster. When using the bulk id
endpoint, the products are identified by Propeller product id
. If a product with such id
doesn't already exist, it will be created. If it does exist, the product will be updated.
Product Bulk endpoints support bulk change of product attributes for multiple products as well. To learn more about Attributes, go here.
A single product's attributes can be modified as explained in Bulk resource attribute values by resource lookup key, but if it's needed to modify attributes for multiple products, this endpoint should be used.
Fields
Name | Required |
---|---|
products (array of product objects) | yes |
sourceId | yes |
source | yes |
language | yes |
names | no |
sku | no (recommended) |
unit | no Default is 1 |
status | no Default is A |
priceDisplay | no Default is default |
descriptions | no |
shortDescriptions | no |
taxCode | no Default is H |
supplier | no (recommended) |
supplierCode | no (recommended) |
oemCode | no |
eanCode | no |
minimumQuantity | no Default is 1 |
packageDescriptions | no |
notes | no |
attributes Read more about attributes | no |
For more details on attributes
field, read this.
Directives
Name | Description | Fields |
---|---|---|
skipIfNotEmpty | On update, skip updating fields of an existing product that are not empty | array of field names e.g. names, descriptions, packageDescriptions etc. |
skipMoveOnUpdate | On update, skip moving an existing product in the parent category provided | empty array |
mergeTranslationsOnUpdate | On update, delete all translation for a product that are not provided in the payload | empty array |
Request
Path Parameters
Lookup key. Read more about cluster lookup keys
The value of the key (id or sourceId)
- application/json
Body
Array [
]
Array [
Array [
Array [
]
]
Array [
]
Array [
]
Array [
]
Array [
]
Array [
]
]
directives
object[]
products
object[]
attributes
object[]
value
object[]
descriptions
object[]
names
object[]
notes
object[]
packageDescriptions
object[]
shortDescriptions
object[]
Responses
- 200
- 404
Bulk Cluster Products by sourceId - 200
Response Headers
Alt-Svc
string
Via
string
alt-svc
string
content-length
string
date
string
return-format
string
x-request-id
string
- application/json
- Schema
- Example (from schema)
- Bulk Cluster Products by sourceId - 200
Schema
Array [
]
data
object[]
{
"data": [
{
"action": "create",
"id": 707969,
"key": "151201",
"lookupKey": "sourceId",
"success": true
},
{
"action": "create",
"id": 707970,
"key": "151204",
"lookupKey": "sourceId",
"success": true
}
],
"messages": [
"Completed"
],
"total": 2
}
{
"data": [
{
"action": "create",
"id": 707969,
"key": "151201",
"lookupKey": "sourceId",
"success": true
},
{
"action": "create",
"id": 707970,
"key": "151204",
"lookupKey": "sourceId",
"success": true
}
],
"messages": [
"Completed"
],
"total": 2
}
Bulk Cluster Products by sourceId - 404
Response Headers
Alt-Svc
string
Via
string
alt-svc
string
content-length
string
date
string
return-format
string
x-request-id
string
- application/json
- Schema
- Example (from schema)
- Bulk Cluster Products by sourceId - 404
Schema
error
object
{
"error": {
"code": 20007,
"messages": [
"Parent Cluster with sourceId [15120300111] not found"
],
"moreInfo": "https://www.propel.us/docs/errors/20007",
"status": 404,
"type": "ParentClusterNotFound"
}
}
{
"error": {
"code": 20007,
"messages": [
"Parent Cluster with sourceId [15120300111] not found"
],
"moreInfo": "https://www.propel.us/docs/errors/20007",
"status": 404,
"type": "ParentClusterNotFound"
}
}