Forum Discussion

eproductions's avatar
3 years ago

URL length limit

Hello all 

 

I am calling the endpoint /Inventory/Item and retrieving product details for 223 items. The problem is, it only works with approx the first 84 items using the following the syntax:

 

$filter=Number+eq+%27sku1%27+or+Number+eq+%27sku2%27+ etc.

 

Anything more than around 84 items and I get a 404 error. I don't think it's any ilegal characters in any of the SKUs. Admittedly my endpoint URL is loooong, so I'm assuming that there is a limit on the URL length? Can anyone tell me what it is? Is there any configuration to increase this length or do I have to go back to the drawing board and make multiple calls instead? 

 

The reason I'm doing it this way and not just calling the entire MYOB product list is that there are over 1,000 products in the MYOB database but I ony need to update the price and quantity of 223 of them for this particular website. 

 

Many thanks

Shaun

 

 

  • Hi Shaun,

    Have you considered using a custom Field or similar to mark the items you need for the website?
    e.g. set Custom Field #1 to "WebsiteItem" in AccountRight for all the 223 items you need. Then you can select all items where CustomField1.Value = "WebsiteItem".

    Could that work for you?

    Regards

    John.

     

    • eproductions's avatar
      eproductions

      I am simply retrieving all the products that are listed on that particular website (they have multiple) and that's dynamic, so the filters are just all the MYOB Item Numbers. When it works it's way more efficeint than retrieving all the products in the MYOB database, as many products don't relate to that website. 

       

      However, you raise a good point: if my client was prepared to do an an extra step and mark all the products that relate to that website as a custom field then that should solve my problem. I can ask them.