I need to get the orders from a set of customers. I use the next API request:
http://example.com/api/orders?io_format=JSON&display=full&ws_key=mykey&sort=[id_DESC]&filter[current_state]=[19|15|18]&filter[id_customer]=[29100|29101|29102|29103|29104|29105|29106|29107|29108|29109|29110|29111|29112|29113|29114|29115|29116|29117|29118|29119|29120|29121|29122|29123|29124|29125|29126|29127|29128|29129|29130|29131|29132|29200|29201|29202|29203|29204|29205|29206|29207|29208|29209|29210|29211|29212|29213|29214|29215|29216|29217|29218|29219|29220|29221|29222|29223|29224|29225|29226|29227|29228|29229|29230|29231|29232|29233|29300|29301|29302|29303|29304|29305|29306|29307|29308|29309|29310|29311|29312|29313|29314|29315|29316|29317|29318|29319|29320|29321|29322|29323|29324|29325|29326|29327|29328|29329|29330|29331|29999]
The [id_customer] filter gets ignored and the web service returns orders from all the customers.
If I make the [id_customer] filter shorter, removing from 29100 to 29200, the filter works correctly (see example below).
http://example.com/api/orders?io_format=JSON&display=full&ws_key=mykey&sort=[id_DESC]&filter[current_state]=[19|15|18]&filter[id_customer]=[29200|29201|29202|29203|29204|29205|29206|29207|29208|29209|29210|29211|29212|29213|29214|29215|29216|29217|29218|29219|29220|29221|29222|29223|29224|29225|29226|29227|29228|29229|29230|29231|29232|29233|29300|29301|29302|29303|29304|29305|29306|29307|29308|29309|29310|29311|29312|29313|29314|29315|29316|29317|29318|29319|29320|29321|29322|29323|29324|29325|29326|29327|29328|29329|29330|29331|29999]
Is there a limitation in Prestashop API about the number of filtered elements or something similar?
And more important, how can I solve this?
Thanks in advance!
Related
I need to filter my search by the host.
I was able to do this in the CloudSearch Dashboard under "Run a Test Search" (See picture)
Awesome! That was easy. Except not awesome. I'm going crazy trying to get that to work with my actual search endpoint.
This I would assume should give me the same results as the dashboard test query, but it isn't filtering them at all.
https://search.endpoint/?q.parser=structured&q='hello%20test'&fq=host:'example.com'
I've tried using the Structured Query language, Lucene, and DisMax for query parsing, but I can't get it working on any of them.
https://search.endpoint/?q.parser=lucene&q=hello%20test&fq=host:'example.com'
https://search.endpoint/?q.parser=dismax&q=hello%20test&fq=host:'example.com'
What am I doing wrong?
I didn't make one thing super clear. I am using a custom domain instead of the default endpoint.
Turns out I only had a small handful of query string parameters set up in my API in API Gateway.
Once I added the additional query strings to the API I was able to make the queries.
I also learned that you can generate your test search as a URL by clicking on the view raw: JSON button. That has helped speed things up a lot!
Im trying to obtain the date when a store was created on Google Places API, that information is not available on the API.I think, that I can do if I retrieve the first review date, but the API give me only 5 reviews.
Any ideas for obtain the date? or a similar service? I checked facebook and forsquare, but the same results.
Currently this information is not exposed via Places API. There are following feature requests in Google issue tracker that you might be interested in:
Expose creation date and date of last update in Place Details
Google Places API Reviews, changing the sorting order?
Places API: Response to Include More Than 5 Reviews
I would suggest starring these feature requests to add your vote and subscribe to further notifications from Google. Hopefully one day they implement these feature requests.
I want to integrate plotly Dash with my web app. I have data regarding a user like
leads found
meeting done
orders found
and other details of users per company.
So I want to pass the company_id and user_id and then get the report for only the specific user. He can filter between dimension or anything but he can't see the data for other users. What I found online is mostly a full dashboard. Is there an option to pass parameters in the api call, and then pass the data to plotly DASH and generate graph?
Please provide any resources if possible.
Not sure but maybe try to give the port:
https://example.com:5000/api/hello
Does anybody know if there are any constraints to the query string length when making a GET request to Facebook graph API? So far I've not encountered any problems but it's very important to know if there are any constraints or limitations.
Thanks,
-Ali
From a comment from the Paging section of the Facebook API docs: it is helpful to know that the maximum number of results we will fetch before running the visibility checks is 5,000. That was for FQL, but I'm assuming the same limits apply to the Graph API. So you can't get more than 5000 results at a time
I want to access graph API to get the number of shares for different pages of my website. I can use the GET method to do so but I want to use POST so that I can send more url in a single request. The current implementation I have for GET is
http://graph.facebook.com/?ids=http://umairj.com/,http://umairj.com/146/how-to-clear-facebook-shares-cache/
Can anyone please help ?
This is badly documented (I mean I didn't find the information when I looked for it!), but there is way to pass all the parameters to the Graph API through POST method:
in your example, you should POST to http://graph.facebook.com/
with the following DATA:
ids=http://umairj.com/,http://umairj.com/146/how-to-clear-facebook-shares-cache/&method=GET
I'm not sure about the encoding of the POST DATA..in our case, we were just using ids=.....,.....,..... with numeric FB user ids and we didn't need to do any encoding, but you might need some url-encoding
Don't forget the &method=GET or it won't work ! It helped me break the url length limit that was causing bugs on Internet Explorer (I think RFC says 1024 characters, all browsers support much more, IE only ~4096 ) when we were passing too many ids through GET
if you wish to access non-public information, the same trick works with https://graph.facebook.com/ , provided you add &session_token=***** to your query
You can try to run a FQL query to get the stats for multiple urls. Facebook link_stat documentation has an example of how to do this. I'm pretty sure you can't POST to either the FQL query or the graph api you were using though unfortunately. Your FQL query would be:
SELECT url, share_count, like_count FROM link_stat WHERE url IN("http://umairj.com/","http://umairj.com/146/how-to-clear-facebook-shares-cache/")
Here is the url after properly url encoding the query: https://api.facebook.com/method/fql.query?query=SELECT+url%2C+share_count%2C+like_count+FROM+link_stat+WHERE+url+IN%28"http%3A%2F%2Fumairj.com%2F"%2C"http%3A%2F%2Fumairj.com%2F146%2Fhow-to-clear-facebook-shares-cache%2F"%29&format=json
Facebook provides a FQL testing tool to help.
Update: their API documention (see section titled "Delete) mentions you can do an HTTP POST to any of their methods and set the variable method to the method you want. You could try this, although this was designed for delete and put methods not available to javascript clients. It still looks like is all url based so I'm not sure it will take a form encoded parameter like you are looking to do.
I work at Facebook and I've updated our Graph API documentation to document this work around for very large requests:
https://developers.facebook.com/docs/graph-api/using-graph-api#largerequests