validateAssets
post
/ccadmin/v1/asset/validate
Validate Assets. Validates catalog or inventory items.
Request
Supported Media Types
- application/json
Body Parameter
Root Schema : validateAssets_request
{
"token":"QEnltim5M5VNaygUgjomyR0hzV4_10037"
}
- getValidationResult
-
Type:
stringThe flag that indicates whether the validation result should be included in response.By default, the result won't be included. - token
-
Type:
stringRequired:trueThe token associated with a previous upload operation, for which the validation operation will take place.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : validateAssets_response
- errorCount
-
Type:
integerTotal number of uploaded assets that had errors during validation. - modifiedCount
-
Type:
integerTotal number of uploaded assets that will result in an update operation. - newCount
-
Type:
integerTotal number of uploaded assets that will result in an add operation. - total
-
Type:
integerTotal number of uploaded assets. - unchangedCount
-
Type:
integerTotal number of uploaded assets that will result in no change. - validationResults
-
Type:
arrayvalidationResultsAdditional Properties Allowed:Partial list of validation results. - warningCount
-
Type:
integerTotal number of uploaded assets that had warnings during validation.
Nested Schema : validationResults
Nested Schema : items
Type:
object- isNew
-
Type:
booleantrue if the asset will be added. - modified
-
Type:
booleantrue if the asset will be updated. - validationResult
-
Type:
stringThe status result of the validation operation. - valueDictionary
-
Type:
objectvalueDictionaryAdditional Properties Allowed:{ "type":"string" }Map of item property values that will be set on import. The key is the property name, and the value is the property value. The property value will either be a string or a key value pair in the case of a repository item reference.
Nested Schema : valueDictionary
Type:
object-
Type:
string
Map of item property values that will be set on import. The key is the property name, and the value is the property value. The property value will either be a string or a key value pair in the case of a repository item reference.
Example application/json
{
"total":1,
"newCount":1,
"validationResults":[
{
"valueDictionary":{
"longDescription":"null",
"salePrice":"null",
"displayName":"The Good, the Bad, and the Ugly",
"orderLimit":"10",
"length":"100.0",
"weight":"10000.0",
"active":true,
"description":"A really great movie that you should not miss",
"type":"null",
"taxCode":"null",
"CountryOfOrigen":"US",
"arrivalDate":"null",
"width":"1000.0",
"shippingSurcharge":"15.00",
"brand":"Test2",
"listPrice":"14.99",
"height":"1.0"
},
"allAssetPropertyNames":[
"ID",
"displayName",
"type",
"description",
"brand",
"longDescription",
"active",
"listPrice",
"salePrice",
"shippingSurcharge",
"arrivalDate",
"height",
"length",
"width",
"weight",
"taxCode",
"orderLimit",
"images",
"altText",
"CountryOfOrigen"
],
"modified":false,
"isNew":true,
"type":"product",
"validateResult":"SUCCESS"
}
],
"modifiedCount":0,
"description":"Sample response of validate operation for catalog items",
"warningCount":0,
"unchangedCount":0,
"errorCount":0,
"token":"kWgU9foxZ3yfb1UCOAgeZgfresc_10038"
}
Default Response
The error response
Body
Root Schema : errorModel
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code
Examples
Sample Request:
{"token": "QEnltim5M5VNaygUgjomyR0hzV4_10037"}
Sample Response Payload returned by endpoint:
{
"total": 1,
"newCount": 1,
"validationResults": [{
"valueDictionary": {
"longDescription": "null",
"salePrice": "null",
"displayName": "The Good, the Bad, and the Ugly",
"orderLimit": "10",
"length": "100.0",
"weight": "10000.0",
"active": true,
"description": "A really great movie that you should not miss",
"type": "null",
"taxCode": "null",
"CountryOfOrigen": "US",
"arrivalDate": "null",
"width": "1000.0",
"shippingSurcharge": "15.00",
"brand": "Test2",
"listPrice": "14.99",
"height": "1.0"
},
"allAssetPropertyNames": [
"ID",
"displayName",
"type",
"description",
"brand",
"longDescription",
"active",
"listPrice",
"salePrice",
"shippingSurcharge",
"arrivalDate",
"height",
"length",
"width",
"weight",
"taxCode",
"orderLimit",
"images",
"altText",
"CountryOfOrigen"
],
"modified": false,
"isNew": true,
"type": "product",
"validateResult": "SUCCESS"
}],
"modifiedCount": 0,
"description": "Sample response of validate operation for catalog items",
"warningCount": 0,
"unchangedCount": 0,
"errorCount": 0,
"token": "kWgU9foxZ3yfb1UCOAgeZgfresc_10038"
}