URL length limit

This thread is now closed to new comments.
Some of the links and information provided in this thread may no longer be available or relevant.
If you have a question please start a new post.
eproductions
2 Posts
User
New Zealand

2Posts

0Kudos

0Solutions

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

 

 

2 REPLIES 2
John_Dinning
Trusted User
71 Posts
Trusted User
Australia
Trusted User

71Posts

15Kudos

6Solutions

Re: URL length limit

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
2 Posts
User
New Zealand

2Posts

0Kudos

0Solutions

Re: URL length limit

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. 

Didn't find your answer here?

Try using advanced search to find a post more easily Advanced Search
or
Get the conversation started and make a new post Start a Post