cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

No <Item.Country> exists or <Item.Country> is specified as an empty tag in the request

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:

  1. I created an item using Ebay's API explorer without altering the default data provided by Ebay;
  2. I created an offer for this item using Ebay's API explorer, again without altering any data;
  3. I published the offer just created using the API explorer.

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.

Message 1 of 7
latest reply
1 BEST ANSWER

Accepted Solutions

Re: No <Item.Country> exists or <Item.Country> is specified as an empty tag in the reque

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.

View Best Answer in original post

Message 2 of 7
latest reply
6 REPLIES 6

Re: No <Item.Country> exists or <Item.Country> is specified as an empty tag in the reque

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.

Message 2 of 7
latest reply

Re: No <Item.Country> exists or <Item.Country> is specified as an empty tag in the reque

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?

Message 3 of 7
latest reply

Re: No <Item.Country> exists or <Item.Country> is specified as an empty tag in the reque

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
Message 4 of 7
latest reply

Re: No <Item.Country> exists or <Item.Country> is specified as an empty tag in the reque

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?

Message 5 of 7
latest reply

Re: No <Item.Country> exists or <Item.Country> is specified as an empty tag in the reque

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

Message 6 of 7
latest reply

Re: No <Item.Country> exists or <Item.Country> is specified as an empty tag in the reque

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.

Message 7 of 7
latest reply