question

fred2bug avatar image
0 Likes"
fred2bug asked

createorreplaceinventoryitem Problem Adding Aspects

I am creating inventory items using the InventoryAPI models (c#). On the InventoryItem model Aspects is a IList<string> but a KeyValuePair seems more appropriate than a string. All aspects have a name and value, for example [Brand]:[Microsoft].

I have tried adding

"[Brand]:[Microsoft]"
"["Brand"]:["Microsoft"]" 


but I am ovbviously having a "Hello World" moment and missing something because no matter what I try I always get an error returned:

 "Could not serialize field [product.aspects]"


How do I format the aspect string to add an aspect to an inventory item?


TIA

rest apicreateorreplaceinventoryiteminventoryitemproduct aspects
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.