importAssets
post
/ccadmin/v1/asset/import
Import Assets. Import catalog or inventory items that have been uploaded and validated.
Request
Supported Media Types
- application/json
Root Schema : importAssets_request
Type:
Show Source
object
-
token:
string
The token associated with a previous upload/validation operation, for which the import operation will take place.
-
useCatalogHeaderForCreatingNewItems(optional):
boolean
Boolean value to indicate whether to create new products and categories under the catalog specified in the previously uploaded file or under Product Catalog. If it is not provided then default value is false. When the value is true, it places new categories, for which no parent category is specified, under the storefront category of the catalog provided in the file header. When the value is false, such categories are placed under the storefront category of Product Catalog. When the value is true, it places new products under the category referred by the 'defaultCategoryForProducts' property of the catalog provided in the file header. When the value is false, new products are placed under the category referred by the 'defaultCategoryForProducts' property of Product Catalog. In either case, if 'defaultCategoryForProducts' property is blank then new products will be orphaned.
Example:
{
"useCatalogHeaderForCreatingNewItems":true,
"token":"QEnltim5M5VNaygUgjomyR0hzV4_10037"
}
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : importAssets_response
Type:
Show Source
object
-
importErrors(optional):
object importErrors
Additional Properties Allowed: additionalPropertiesMap of errors with asset uri as key and list of errors as value
-
modifiedErrorCount(optional):
integer
Total number of import errors for modified assets.
-
modifiedSuccessCount(optional):
integer
Total number of modified assets.
-
newErrorCount(optional):
integer
Total number of import errors for new assets.
-
newSuccessCount(optional):
integer
Total number of new assets.
-
total(optional):
integer
Total number of imported assets.
-
unchangedCount(optional):
integer
Total number of imported assets that resulted in no change.
Nested Schema : importErrors
Type:
object
Additional Properties Allowed
Show Source
-
array additionalProperties
List of errors prefixed with property name.
Map of errors with asset uri as key and list of errors as value
Nested Schema : additionalProperties
Type:
array
List of errors prefixed with property name.
Show Source
Example Response (application/json)
{
"modifiedErrorCount":500,
"total":5001,
"newErrorCount":500,
"modifiedSuccessCount":1500,
"unchangedCount":1000,
"newSuccessCount":1500,
"importErrors":{
"atgasset:/ProductCatalog/sku/sku_id":[
"parentProduct:Parent product's type does not match with the product type of the variant."
]
}
}
Default Response
The error response
Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code