question

bibliophil63 avatar image
0 Likes"
bibliophil63 asked ·

Error desirializing "InventoryItemWithSkuLocaleGroupid" from "getInventoryItem" call after "bulkMigrateListing" call

Hi,

At first I use OpenAPI and NSwag to generate REST/JSON client API in C# / Visual Studio.

I have tried to use with success "BulkMigrateListing".
Corresponding "offer" and 'inventory item" were created.

Using "getInventoryItem" replies with success (status 200), but desirialization generate an NewtonSoft Error on 'product'/'aspects'.

I have checked the string raw response (InventoryItemWithSkuLocaleGroupid) before desirialization and :

- Returned string for 'aspects' field was "

"aspects":{
"Name1":["value"],
"Name2":["value"],
...}

- API specifications was

"product" :{ /* Product */
"aspects" : [
"string"],

So after using "bulkMigrateListing", returned values from "getInventoryItem" don't match with API specifications :
"string":["string"] versus ["string"]

I think API was incorrect in JSON file (https://developer.ebay.com/api-docs/master/sell/inventory/openapi/2/sell_inventory_v1_oas2.json) and documentation (https://developer.ebay.com/api-docs/sell/inventory/resources/inventory_item/methods/getInventoryItem).

Thanks for your help.

Regards

--

Philippe


getinventoryitems inventoryinventoryitemwithskulocalegroupidjson api sell inventory
· 1
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.

To map API with received data, I have changed OpenAPI for "aspects" using a dictionary but i dont understand why an array is really needed ?

"aspects": {

"description": "This is an array ...",

"type": "object",

"additionalProperties": {

"type": "array",

"items": {

"type": "string"

}

}

}


0 Likes 0 ·

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.