Shopify orders api returns invalid data - shopify

I'm currently making a request to shopify api like so:
I've tried hitting these end points:
orders.json?updated_at_min=2019-07-17T19:00:42-07:00&limit=150
orders.json?created_at_min=2019-07-17T19:00:42-07:00&limit=150
orders.json?updated_at_min=2019-07-17T19:00:42
According to the docs found here:
https://help.shopify.com/en/api/reference/orders/order
this is a valid end point call:
created_at_min
created_at_max
updated_at_max
The results I get back are:
+"closed_at": null
+"created_at": "2019-08-07T19:02:37-07:00"
+"updated_at": "2019-08-07T19:02:52-07:00"
The above is just part of the returned data. What gives? The created_at_min doesn't work neither does updated_at_min
The docs say the string should be: Iso8601String

This was a bug that Shopify just posted that they've fixed:
https://community.shopify.com/c/Shopify-APIs-SDKs/Orders-gt-created-at-min-ignored/m-p/553667/highlight/true#M36625

Related

ebay finding api finditemsbykeywords pagination problem

I tried the following calls:
https://svcs.ebay.com/services/search/FindingService/v1?X-EBAY-SOA-OPERATION-NAME=findItemsByKeywords&SERVICE-VERSION=1.13.0&keywords=waschbecken&RESPONSE-DATA-FORMAT=JSON&GLOBAL-ID=EBAY-DE&outputSelector(0)=ItemSpecifics&paginationInput.entriesPerPage=100&paginationInput.pageNumber=2
then on the ebay API explorer for the post request body,
<findItemsByKeywordsRequest xmlns="http://www.ebay.com/marketplace/search/v1/services">
<keywords>waschbecken</keywords>
<paginationInput>
<entriesPerPage>100</entriesPerPage>
<pageNumber>2</pageNumber>
</paginationInput>
</findItemsByKeywordsRequest>
but I do not get 100 searchResult count per page, in Postman I get 32 searchResult and in API explorer 56; furthermore 2nd page forward I do not get any searchResult count, I am trying to understand is there something wrong that I am writing in the call or there is some another problem or any parameter I am missing.
Thanks for the help.
I am also running into this problem. I am guessing that the pagination results are for the entire store, but not for the search by keywords....Seems like they dropped the ball on this.
Sorry, I did not update on the question, I forgot about it.
The problem was not with the pagination, the problem is the variants.
Simply explained, the output of the query doesn't count for the variants listed on the Ebay search by the same seller. If you have from a same seller the same product with the different variant, the query does not show the variants from those product from the same seller just different variant, as it would if you do an ebay search.
The mechanism of the query is different as that of the product search on Ebay.

Create direct url to LinkedIn company update

I'm implementing a Compony newsfeed on a website and ran into the following problem. The LinkedIn API doesn't provide a direct URL to a company update. Looking at the LinkedIn site there are direct URL's and they're like this for example:
https://www.linkedin.com/company/1441/comments?topic=5849556347070205952&type=U&scope=1441&stype=C&a=5uHW&goback=%2Ebzo_*1_*1_*1_*1_*1_*1_*1_1441
Trying stuff out it seems that the parameters topic, type, scope, stype and a are mandatory for the URL to work.. (goback is the only one that isn't).
Using the LinkedIn API with the Company updates call I'm able to buid the direct url, except for the a parameter. The value is always 4 (for me unexplainable) characters long.
Has anyone ever successfully build a direct URL to a company update or can someone maybe explain the a parameter or how to generate its value?
Updated to new format
You can link directly to any update (company or user) using the following url:
https://www.linkedin.com/feed/update/urn:li:activity:[topic_id]
You can get [topic_id] by getting the last bit of the updateKey in the api response from Linkedin. When updateKey = UPDATE-c7352-6410848097894756353, your topic_id = 6410848097894756353.
In your example that would become https://www.linkedin.com/feed/update/urn:li:activity:5849556347070205952 which links directly to the specific update. The post is too old to work with the new link format
The url used to be
https://www.linkedin.com/nhome/updates/?topic=[topic_id]
Updated thanks to the comment from #sethpollack
For anyone trying to get the topic id from the API response object (as already commented on the OP question), the topic id is the value after the last hyphen of the updateKey property, which can be used with #Daan answer:
"updateKey": "UPDATE-cXXXX-YYYYYYYYYYYYYYYYYY"
Direct URL:
https://www.linkedin.com/nhome/updates?topic=[YYYYYYYYYYYYYYYYYY]
Using the URL format above, get the topic_id by opening the update in its own window/tab, look at the page source code in your browser and search for the string :activity: the long number after the string is the infamous topic_id

Is it correct that the Instagram Location/Search endpoint does NOT support pagination?

I have read several postings about the fact that the Instagram API returns only 20 results at a time. In many cases, people have suggested that all you need to do is to use the next URL which is returned in the pagination information. I would be fine with that, but the JSON returned by
https://api.instagram.com/v1/locations/search?
does not appear to have any pagination information. I have seen a posting that says that /media/search does not support pagination. I just wanted to confirm that the same is true for /locations/search. Can anyone confirm?
And if this is correct, does anyone have any thoughts about how you can get a list of all Instagram events in a specific area, rather than just the first 20 or so?
/media/search end point does not have pagination, but you can get next set of 20 pics by using url param max_timestamp, get the created_time of the last photo in api response and apply it as max_timestamp for next url call, it will return the next 20. Thats how I implemented here: http://www.gramfeed.com/instagram/map
for locations/search end point, timestamp does not apply, you can change distance url param and get more results: http://www.gramfeed.com/instagram/places

Magento API creates simple product correct -> but afterwards tells "101 Product not exists"

I try to add some pictures to a simple product, which was created (without error) by the API. The product is shown in frontend its functional with all wanted attributes. But if I check afterwards
$client->call($sessionId, 'product.info', '123456');
I get Soap Error: "101: Product doesn't exists". But its definitivly reachable over back- and frontend. (Cache cleared, Index refreshed)
Same issue, when I try to add media informations. On Confugurable Products the error don't show up and the pictures are added whithout any problems.
Maybe I messed something up with the attributes or the attribut sets... I don't know, where to watch first.
I'm at my php’s end!
Using Magento 1.6.0.0
Thank your for clarify me.
Best regards.
Since the ame API function ("product.info" in this case) receive as a parameter both SKU and ID, there is a problem if your are looking for SKU's which is numeric values.
To avoid this problem, we always adding space to the end of SKU before sending it to the API. For example, if your SKU is "123456" you should send "123456 " to the API.
Have you tried this call with your product id instead of the sku? I had some problems in the past with product calls and the sku.
I've installed 2 magentos and we always use numeric SKUs and I've always had this problem.
I've solved it by modifying the file:
app/code/core/Mage/Catalog/Model/Api/Resource.php
About line 122 that reads:
$product = Mage::helper('catalog/product')->getProduct($productId, $this->_getStoreId($store), $identifierType);
I've changed it to:
$product = Mage::helper('catalog/product')->getProduct($productId, $this->_getStoreId($store), 'sku');
This way the function always expects an SKU.

Stumbleupon API url encoding problem

I am trying to work with the stumbleupon API to get information about the items on my site.
Documentation: http://www.stumbleupon.com/help/badge-api-documentation/
Now it works perfectly except with some URL's...
But http://lolbin.net/i/fp16jU82/that's-what-beer-is-for.htm for example has a ' in the URL, which is a problem for the Stumbleupon API.
I have tried various things, but I keep getting error pages:
http://www.stumbleupon.com/services/1.01/badge.getinfo?url=http://lolbin.net/i/fp16jU82/that's-what-beer-is-for.html
http://www.stumbleupon.com/services/1.01/badge.getinfo?url=http://lolbin.net/i/fp16jU82/that\'s-what-beer-is-for.html
http://www.stumbleupon.com/services/1.01/badge.getinfo?url=http://lolbin.net/i/fp16jU82/that%27s-what-beer-is-for.html
http://www.stumbleupon.com/services/1.01/badge.getinfo?url=http://lolbin.net/i/fp16jU82/that%252527s-what-beer-is-for.html
The item is in the stumbleupon database already with many views: http://www.stumbleupon.com/url/lolbin.net/i/fp16jU82/that%252527s-what-beer-is-for.html
My question is, how can I query this particular item via the API so I get a valid return?
It works with %2527
http://www.stumbleupon.com/services/1.01/badge.getinfo?url=http://lolbin.net/i/fp16jU82/that%2527s-what-beer-is-for.html
Returns:
{"result":{"url":"http:\/\/lolbin.net\/i\/fp16jU82\/that%27s-what-beer-is-for.html",
"in_index":true,"publicid":"Aq9jhK","views":262882,
"title":"Thats what beer is for - LOLBIN.net","thumbnail":"http:\/\/cdn.stumble-upon.com\/mthumb\/767\/82718767.jpg",
"thumbnail_b":"http:\/\/cdn.stumble-upon.com\/altbthumb\/767\/82718767.jpg","submit_link":
"http:\/\/www.stumbleupon.com\/submit?url=http:\/\/lolbin.net\/i\/fp16jU82\/that%27s-what-beer-is-for.html","badge_link":
"http:\/\/www.stumbleupon.com\/badge?url=http:\/\/lolbin.net\/i\/fp16jU82\/that%27s-what-beer-is-for.html",
"info_link":"http:\/\/www.stumbleupon.com\/url\/lolbin.net\/i\/fp16jU82\/that%252527s-what-beer-is-for.html"},
"timestamp":1317025970,"success":true}
It is, as Godius pointed out, a double urlencoding. ' => %27 => %2527