02-07-2023 01:18 PM
Hi all, I'm a bit confused and I hope someone can help me out.
I'm currently developing an API connection with the REST API for inventory management. I got to the point where I'm able to create an inventory item and create an offer for it, however when trying to publish the offer I just created, I always get the message "No <Item.Country> exists or <Item.Country> is specified as an empty tag in the request" (errorId: 25002). To be honest, this look more like a message from the SOAP API to me since REST is not using these kind of tags.
Now my question is, what goes wrong? The endpoint /offer/{offerId}/publish doesn't require a body at all, so a missing field is kinda impossible there. The item and offer are created without any errors and I've checked the docs for both endpoints and neither one of them has a field related to "Country" as the error suggests.
Now to kinda rule out that it's data causing the issue I did the following:
The above scenario still results in the same error. Could this by any chance be a technical issue server side rather then a client side issue?
I hope someone can help me onwards because currently I'm kinda stuck and unable to finish the project.
Solved! Go to Best Answer
02-07-2023 04:18 PM - edited 02-07-2023 04:21 PM
Okay, I finally managed to fix the issue. As the documentation says here the "merchantLocationKey" is only optional at first, but it is required before publishing the offer. If you're not working with inventory item locations, always add a "merchantLocationKey": "default" to your request body.
And Ebay, please fix your error messages😅 This current message should be more clear, currently it seems very confusing.
02-07-2023 04:18 PM - edited 02-07-2023 04:21 PM
Okay, I finally managed to fix the issue. As the documentation says here the "merchantLocationKey" is only optional at first, but it is required before publishing the offer. If you're not working with inventory item locations, always add a "merchantLocationKey": "default" to your request body.
And Ebay, please fix your error messages😅 This current message should be more clear, currently it seems very confusing.
03-07-2023 09:19 PM
Hello, I am running into this same issue. I've set up a merchant Location Key and also used default but i still get the same error. Do you know of any other issues that could cause this error?
03-07-2023 11:04 PM
For the location you set up (using createInventoryLocation):
Does the call getInventoryLocations return this location you created?
Does the location reflect "merchantLocationStatus": "ENABLED" ?
Does the location->address->country field show?
Does "merchantLocationKey": "WHATEVERYOUNAMEDIT" match every other place you are using it (see below)?
Then call getInventoryItems after one of the create inventory calls:
I actually already had this field set on my test, so I am unsure if it is required, but worth a check
it also lets you set this field to a non-existent key as I set this before I created a location:
"availability": {
"pickupAtLocationAvailability": [
{
"merchantLocationKey": "WHATEVERYOUNAMEDIT"
}
],
Then call getOffer after createOffer:
Does getOffer return:
"merchantLocationKey": "WHATEVERYOUNAMEDIT" ?
You can have a location set the other places above and it be missing from the offer itself.
If it is not in the results of getOffer, run a PUT call updateOffer to update your offerId with the merchantLocationKey.
Then try your publish again and see if the Item.Country message goes away
03-07-2023 11:43 PM - edited 03-07-2023 11:46 PM
I have the same error while trying to publish offer by InventoryItemGroup. I tried setting availability.shipToLocationAvailability.availabilityDistributions.merchantLocationKey in the InventoryItem that is in the group and then trying to publish offer but same result. Anyone got an idea?
03-09-2023 07:11 PM
It is likely the same issue, merchantLocationKey missing from one of the 'offers' (rather than the inventory item). Steps you can take to troubleshoot are similar to above, with just a few added steps.
Run getInventoryItemGroup against the group in question.
grab all the SKUs that it returns.
Run getInventoryItem against each of those SKUs
note if they each have a merchantLocationKey set
Next is the important part,
Run getOffers against each of those SKUs,
note if they each have a merchantLocationKey set (returned as offers.merchantLocationKey)
and of course the other steps of verifying the used merchantLocationKey is valid and returned from getInventoryLocations
03-13-2023 07:46 AM
I have no offers connected to those SKUs. I only created InventoryItemGroup and now wanted to publish an offer base on it. All Items that are part of group have set merchantLocationKey.