Asset Services¶
-
Returns the assets for a given product query
-
TODO
getProductAssets¶
Method URL¶
/v1/asset/getproductassets
Type¶
POST
Consumes¶
application/json
Produces¶
application/json
Body Structure¶
public class assetRequest
{
public baseRequest baseRequest { get; set; }
public int brandID { get; set; }
public List<productAssetSearchRequest> searchProductAssets { get; set; }
}
public class baseRequest
{
public long requestReference { get; set; }
public DateTime requestPostedTime { get; set; } = DateTime.Now;
public string system { get; set; }
}
public class productAssetSearchRequest
{
public long assetID { get; set; }
public string externalAssetID { get; set; }
public string partNumber { get; set; }
public string brand { get; set; }
public string searchOption { get; set; }
public string assetType { get; set; }
public string mediaType { get; set; }
public string exportSet { get; set; }
}
Body Fields¶
Field | Optional | Description |
---|---|---|
baseRequest.requestReference | no | You must provide a unique string identifier for this request |
baseRequest.requestPostedTime | no | Enter the time of the request |
baseRequest.system | no | "ecat" must be used to correctly filter allowable products |
brandID | no | This ID will be given to you by Elcome |
productAssetSearchRequest.assetID | yes | If you know the assetID, you can specify it here |
productAssetSearchRequest.externalAssetID | yes | If you know the external AssetID, you can specify it here |
productAssetSearchRequest.partNumber | yes | Enter the part number you want to find assets for if you are not using one of the assetID'searchOption |
productAssetSearchRequest.brand | yes | If you have specified a part number, you may optionally add a brand to filter one |
productAssetSearchRequest.searchOption | no | The only option at this stage is 'exact' |
productAssetSearchRequest.assetType | yes | You may filter on the required asset type |
productAssetSearchRequest.mediaType | yes | You may filter on the required media to |
productAssetSearchRequest | no | Currently this should be 'ecat' |
Body Example¶
{
"baseRequest": {
"requestReference": 12340,
"requestPostedTime": "2018-11-29T10:47:36.368Z",
"system": "ecat"
},
"brandID": 1234,
"searchProductAssets": [
{
"assetID": 0,
"externalAssetID": "",
"partNumber": "ABC123",
"brand": "",
"searchOption": "",
"assetType": "",
"mediaType": "",
"exportSet": "myExportSet"
}
]
}
Response Structure¶
public class assetResponse
{
public baseResponse baseResponse { get; set; }
public List<assetDescriptor> assetDescriptors { get; set; }
}
public class baseResponse
{
public baseRequest baseRequest { get; set; }
public TimeSpan responseTime { get; set; }
public long resultCode { get; set; }
public string resultText { get; set; }
}
public class assetDescriptor
{
public string partNumber { get; set; }
public string brandName { get; set; }
public string assetType { get; set; }
public string mediaType { get; set; }
public string assetURL { get; set; }
public List<string> tags { get; set; }
public Dictionary<string, string> values { get; set; }
public Dictionary<string, string> mappings { get; set; }
}
Response Example¶
{
"baseResponse": {
"baseRequest": {
"requestReference": 0,
"requestPostedTime": "2018-11-29T10:54:57.121Z",
"system": "string"
},
"responseTime": "00:00:09.1550052",
"resultCode": 0,
"resultText": "success"
},
"assetDescriptors": [
{
"partNumber": "abc123",
"brandName": "MyBrand",
"assetType": "image/jpeg",
"mediaType": "image",
"assetURL": "https://imageserver.elcome.co.uk/base/exports/client/export/export_set/abc123.jpg",
"tags": [
"tyre pressure control system wheel",
"tpms"
],
"values": {
"name": "abc123.jpg",
"description": "abc123",
"displayName": "abc123",
"assetID": "123456",
"externalAssetID": "0",
"order": "1",
"width": "399",
"height": "399"
},
"mappings": {
"tecdoc": ""
}
}
]
}