question

kapa_176961 avatar image
0 Likes"
kapa_176961 asked

publishOffer error 25005,publishOffer error 25005 invalid category Id

Hi,

I am trying to publish an offer and I am getting this errror:

{
    "errors": [
        {
            "errorId": 25005,
            "domain": "API_INVENTORY",
            "subdomain": "Selling",
            "category": "REQUEST",
            "message": "The eBay listing associated with the inventory item, or the unpublished offer has an invalid category ID. Ta kategoria jest nieprawidłowa, wybierz inną."
        }
    ]
}

Test offer body looks like this:

{
  "sku": "test",
  "marketplaceId": "EBAY_PL",
  "format": "FIXED_PRICE",
  "listingDescription": "<ul><li><font face=\"Arial\"><span style=\"font-size: 18.6667px;\"><p class=\"p1\">Test listing 2 2 2 2 - do not bid or buy&nbsp;</p></span></font></li><li><p class=\"p1\">Built-in GPS.&nbsp;</p></li><li><p class=\"p1\">Water resistance to 50 meters.</p></li><li><p class=\"p1\">&nbsp;A new lightning-fast dual-core processor.&nbsp;</p></li><li><p class=\"p1\">And a display that’s two times brighter than before.&nbsp;</p></li><li><p class=\"p1\">Full of features that help you stay active, motivated, and connected, Apple Watch Series 2 is designed for all the ways you move</p></li></ul>",
  "availableQuantity": 0,
  "quantityLimitPerBuyer": 1,
  "pricingSummary": {
    "price": {
      "value": "910.99",
      "currency": "PLN"
    }
  },
  "listingPolicies": {
    "paymentPolicyId": "94856529020",
    "returnPolicyId": "80052598020",
    "fulfillmentPolicyId": "117635370020",
    "eBayPlusIfEligible": false
  },
  "categoryId": "163053",
  "merchantLocationKey": "{merchantLocationKey}",
  "tax": {
    "vatPercentage": 10.2,
    "applyTax": true,
    "thirdPartyTaxCategory": "Electronics"
  
  "listingDuration": "GTC",
  "includeCatalogProductDetails": true,
  "hideBuyerDetails": false
}


and inventory item:

 {
            "sku": "test",
            "product": {
                "title": "GoPro Hero4 Helmet Cam",
                "aspects": {
                    "Brand": [
                        "GoPro"
                    ],
                    "Type": [
                        "Helmet/Action"
                    ],
                    "Recording Definition": [
                        "High Definition"
                    ],
                    "Optical Zoom": [
                        "10x"
                    ],
                    "Media Format": [
                        "Flash Drive (SSD)"
                    ],
                    "Storage Type": [
                        "Removable"
                    ]
                },
                "description": "New GoPro Hero4 Helmet Cam. Unopened box.",
                "imageUrls": [
                    "http://i.ebayimg.com/images/i/182196556219-0-1/s-l1000.jpg",
                    "http://i.ebayimg.com/images/i/182196556219-0-1/s-l1001.jpg",
                    "http://i.ebayimg.com/images/i/182196556219-0-1/s-l1002.jpg"
                ]
            },
            "condition": "NEW",
            "availability": {
                "shipToLocationAvailability": {
                    "quantity": 50
                }
            }
        }

I tried with many different categories and even tried matching required aspects. I picked listing policies from the existing ones, which were there from the beggining.

publish offer errorpublish offersellapi
10 |600

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

1 Answer

·
jitendra_developersupport avatar image
0 Likes"
jitendra_developersupport answered

Hi @kapa_176961,


CategoryId "163053" is not a valid category of EBAY_PL marketplace. Please use a valid categoryId in the request.


For getting the all of the latest and supported category hierarchy for a eBay marketplace, please follow the steps mentioned below:

- Firstly, you need to call GetDefaultCategoryTreeId to retrieve a reference to the default category tree associated with the specified eBay marketplace ID.

Ref: https://developer.ebay.com/api-docs/commerce/taxonomy/resources/category_tree/methods/getDefaultCategoryTreeId

- After getting the category_tree_id make a GetCategoryTree call to retrieve the complete category tree that is identified by the category_tree_id parameter.

Ref: https://developer.ebay.com/api-docs/commerce/taxonomy/resources/category_tree/methods/getCategoryTree


Best Regards,

eBay Developer Support

10 |600

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

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.