Bulk Product by source id
POST/products/bulk/sourceId
The bulk endpoints offer an efficient way of importing/updating large amounts of products with just a single API call. When using the bulk sourceId
endpoint, the products are identified by sourceId
, source
and language
. If a product doesn't already exist, it will be created. If it does exist, the product found 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 |
price | no Default is 0.00 |
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 |
parent | 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
- application/json
Body
Array [
]
Array [
Array [
]
Array [
]
Array [
]
Array [
]
Array [
]
Array [
]
]
directives
object[]
products
object[]
descriptions
object[]
name
object[]
names
object[]
notes
object[]
packageDescriptions
object[]
parent
object
shortDescriptions
object[]
Responses
- 200
- 400
Bulk Product by source id - 200
Response Headers
Alt-Svc
string
Via
string
alt-svc
string
content-length
string
date
string
return-format
string
server
string
x-request-id
string
- application/json
- Schema
- Example (from schema)
- Bulk Product by source id - 200
Schema
Array [
]
data
object[]
{
"data": [
{
"action": "create",
"id": 40362,
"key": "NCABD70004",
"lookupKey": "sourceId",
"success": true
},
{
"action": "create",
"id": 40364,
"key": "NCABD70005",
"lookupKey": "sourceId",
"success": true
}
],
"messages": [
"Completed"
],
"total": 2
}
{
"data": [
{
"action": "create",
"id": 40362,
"key": "NCABD70004",
"lookupKey": "sourceId",
"success": true
},
{
"action": "create",
"id": 40364,
"key": "NCABD70005",
"lookupKey": "sourceId",
"success": true
}
],
"messages": [
"Completed"
],
"total": 2
}
Bulk Product by source id - 400 (invalid schema)
Response Headers
Alt-Svc
string
Via
string
alt-svc
string
content-length
string
date
string
return-format
string
server
string
x-request-id
string
- application/json
- Schema
- Example (from schema)
- Bulk Product by source id - 400 (invalid schema)
Schema
error
object
{
"error": {
"code": 10007,
"messages": [
"#/products/0: required key [names] not found",
"#/products/0: extraneous key [name] is not permitted"
],
"moreInfo": "https://www.propel.us/docs/errors/10007",
"status": 400,
"type": "SchemaValidationException"
}
}
{
"error": {
"code": 10007,
"messages": [
"#/products/0: required key [names] not found",
"#/products/0: extraneous key [name] is not permitted"
],
"moreInfo": "https://www.propel.us/docs/errors/10007",
"status": 400,
"type": "SchemaValidationException"
}
}