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:
string
The flag that indicates whether the validation result should be included in response.By default, the result won't be included. - token
-
Type:
string
Required:true
The 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:
integer
Total number of uploaded assets that had errors during validation. - modifiedCount
-
Type:
integer
Total number of uploaded assets that will result in an update operation. - newCount
-
Type:
integer
Total number of uploaded assets that will result in an add operation. - total
-
Type:
integer
Total number of uploaded assets. - unchangedCount
-
Type:
integer
Total number of uploaded assets that will result in no change. - validationResults
-
Type:
array
validationResultsAdditional Properties Allowed:Partial list of validation results. - warningCount
-
Type:
integer
Total number of uploaded assets that had warnings during validation.
Nested Schema : validationResults
Nested Schema : items
Type:
object
- isNew
-
Type:
boolean
true if the asset will be added. - modified
-
Type:
boolean
true if the asset will be updated. - validationResult
-
Type:
string
The status result of the validation operation. - valueDictionary
-
Type:
object
valueDictionaryAdditional 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:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - errors
-
Type:
array
errorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code - type
-
Type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The 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" }