GithubHelp home page GithubHelp logo

Product Advertising API 5.0 about apai-io HOT 29 OPEN

flowdee avatar flowdee commented on June 12, 2024
Product Advertising API 5.0

from apai-io.

Comments (29)

ttk avatar ttk commented on June 12, 2024 2

So you dropped apai-io and only used the sdk?

That's right. I found the new API contains all the info from the old one, plus a few extra. The SDK v5 functions and classes are completely different, so it will require you to replace all the code from apai-io with the new paapi5-php-sdk equivalent.

from apai-io.

e-anima avatar e-anima commented on June 12, 2024 2

Just a heads up about throtteling. Now 8 days later it just works. I can now also update like 30 items using cron. Also wrote a drupal module: https://www.drupal.org/project/amazon_pa
:)

from apai-io.

ttk avatar ttk commented on June 12, 2024

Amazon has their own SDK for several languages, including PHP:
https://webservices.amazon.com/paapi5/documentation/quick-start/using-sdk.html

I downloaded the SDK and the README file says you can install via composer

$ composer require amazon/paapi5-php-sdk

But it doesn't seem to be available on Packagist yet...

from apai-io.

JanKrohn-Khalibre avatar JanKrohn-Khalibre commented on June 12, 2024

API 4.0 will shut down today, but this is still not resolved... Has anyone has any luck installing API 5.0?

from apai-io.

e-anima avatar e-anima commented on June 12, 2024

Shut down? Do you mean amazon shuts down its 4.0 api today? Really?

from apai-io.

JanKrohn-Khalibre avatar JanKrohn-Khalibre commented on June 12, 2024

Yes.
https://webservices.amazon.com/paapi5/documentation/faq.html
"We will be shutting down PA API 4 on October 31, 2019. All your applications and sites using PA API 4 will not work as expected after that."

I'm in panic mode.

from apai-io.

e-anima avatar e-anima commented on June 12, 2024

Oh shit. Thank you for that info. I got a problem now. Even as an affiliate partner, no mail or info about this.

from apai-io.

JanKrohn-Khalibre avatar JanKrohn-Khalibre commented on June 12, 2024

That's why we all love Amazon so much. 🤮

from apai-io.

e-anima avatar e-anima commented on June 12, 2024

I can code php. Thank you for the SDK links, that helps. I will read that today, but i will first upgrade my drupal code fast because..shutdown wtf... Maybe after that i can help with the apai-io. No promises.

p.s amazon is still much better than other networks. Affilinet that now is "awin" dropped the whole webapi and only gives you feeds now. Most of the feeds do not contain all products and a very complex to import search and manage. So you need to manually get and link shop urls...omg

from apai-io.

e-anima avatar e-anima commented on June 12, 2024

Ok. The samples(SDK) from Amazon are only samples. This is not something you can just use. Its examples for developers for the 4 different possible methods.
In the src folder there is something they call api but it is very simple. You can not get avaliable locales and stuff or marketplace urls. '
Much work to do i think.

from apai-io.

e-anima avatar e-anima commented on June 12, 2024

ttk, someone uploaded a repo exactzly, i guess because of that :)
https://github.com/thewirecutter/paapi5-php-sdk

from apai-io.

ttk avatar ttk commented on June 12, 2024

I've successfully ported over one project (in the beginning of Oct) to use paapi5-php-sdk. Can confirm it works well.

from apai-io.

e-anima avatar e-anima commented on June 12, 2024

So you dropped apai-io and only used the sdk?

from apai-io.

e-anima avatar e-anima commented on June 12, 2024

Can you maybe tell me one thing as you already had experience. When you get an item you have a lot of methods to get the final value.
Like $item->getImages()->getPrimary()->getSmall()->getUrl();
or $item->getItemInfo()->getTitle()->getDisplayValue()

Have you found a method or something to convert a response into an array quickly. Otherwise i would have to write a HUGHE function converting like tons of propertys like this to an array.
Thanks in advance.#

FOUND. Every class where it makes sense has a __toString() function doing jsonc encode of the object,

from apai-io.

BenMorel avatar BenMorel commented on June 12, 2024

"We will be shutting down PA API 4 on October 31, 2019. All your applications and sites using PA API 4 will not work as expected after that."

Still working today. Looks like they may have rescheduled, according to a user on the AWS forums:

https://forums.aws.amazon.com/message.jspa?messageID=921131#921131

According to my information, the shutdown of the old api will be rescheduled to 14th January 2020.

Source: at the beginning of this week there was an Amazon associates event in Munich. Here they told them that there will be a reschedule. Attached you can find the screenshot of the keynote. And yes, there is a typo when it comes to the year, but the event took place.

Still waiting for an official confirmation. But you guys know how good amazons communication skills are..

from apai-io.

e-anima avatar e-anima commented on June 12, 2024

Thank you BenMorel :)

from apai-io.

e-anima avatar e-anima commented on June 12, 2024

Just a warning. The new throtteling in the api is a nightmare. You get "too many request" all the time, random also.
I just tried sending one request with the sdk, 5 seconds pause, again, "too many requests throtteling"

from apai-io.

BenMorel avatar BenMorel commented on June 12, 2024

@e-anima Are you generating sales? IIRC, the new throttling is like 8640 requests / day, or 1 every 10s, until you start generating sales. I'd be surprised there isn't a burst allowance, though.

from apai-io.

e-anima avatar e-anima commented on June 12, 2024

I am a long term affiliate with the old api, switched the tokens 3 days ago. Generating sales with the new api is hard when you can not really use it on a site. Especially if you get banned all time and can not refresh prices and you are bound to do that by the terms. If you run cron to update items it is like impossible at all. Tried 5 ASINS in one request, 5 seconds pause. 5th cron run = too many request.
Worst logic i have ever seen in an api ever.

The apis says 1 per second and even some small tests using the php SDK result in throtteling bans.
I will try with 10s delay again.

I wrote to the amazon contacts. I get standard mails from a bot i guess :)
All links to the docs i already read.
I think i get why the old api is still active. I only have a small site, i wonder what big sites do :)

from apai-io.

BenMorel avatar BenMorel commented on June 12, 2024

@e-anima I'm a long term affiliate too, and know for a fact that the API allowance is directly related to the turnover you generate.

According to this page:

Each account used for Product Advertising API is allowed an initial usage limit up to a maximum of 1 request per second and a cumulative daily maximum of 8640 requests per day (TPD) for the first 30-day period after your account has been approved. Following that period, your PA API usage limit will solely be based on your shipped item revenue. Your account will earn a usage limit of 1 TPD for every 5 cents or 1 TPS (up to a maximum of 10 TPS) for every $4320 of shipped item revenue generated via the use of Product Advertising API for shipments in the previous 30-day period.

So actually, you may even get less than 8640 requests per day.

from apai-io.

e-anima avatar e-anima commented on June 12, 2024

Yea, i see. So the migration is a pain i see, because you can not really upgrade a current site because you get bans too fast. But for more requests you need to...paradox :)
How did you manage that?
Edit: First request today, 10 ASIN GetItem = too many request

from apai-io.

BenMorel avatar BenMorel commented on June 12, 2024

@e-anima I did not complete my migration yet, so unfortunately I cannot tell you yet how it went. I do have enough sales over the last 30 days to get enough API allowance for my needs according to the formula above though, so I'm not too worried about this, unless there is a bug in v5.

You should probably contact them to get support, if you're lucky, you'll get more than a "I'm forwarding your message to the relevant team..." message.

Or you can attempt to bruteforce it, to see if it works according to the specs:

  • send exactly 1 request per second for 24 hours, and count the number of successful requests;
  • see if this number matches (revenue in the last 30 days / 0.05)

from apai-io.

e-anima avatar e-anima commented on June 12, 2024

I wrote a mail and i wait for the response. I "migrated" my keys 5 days ago. The sales i generated the last month should more that sufficient to upgrade a samll site with 250 asins.
Bruteforce is not neccessary. Even a request all 30 seconds leads to random bans.
Maybe that migration counts as NEW and so i need to wait 30 days.

from apai-io.

BenMorel avatar BenMorel commented on June 12, 2024

@e-anima Let us know when/if you get a reply from them!

Even a request all 30 seconds leads to random bans.

That would mean less than $144 in revenue (Amazon revenue, not your commission) over the last 30 days. Is that plausible?

from apai-io.

e-anima avatar e-anima commented on June 12, 2024

Yes i will post teh problem if i find out. So you think that the access is completely bound to revenu without any base limit? I have much more than 144$ i sales in the last 30 days.

Each account used for Product Advertising API is allowed an initial usage limit up to a maximum of 1 request per second and a cumulative daily maximum of 8640 requests per day (TPD) for the first 30-day period after your account has been approved.

I understand that differently. I understand i have 1 request per second. I have never seen a more fu**ed up api-logic in my life. I am coding and analyzing this for days now.

I also read how the bucked algo works, but that is useless until you know the correct parameters for the tokens or your "token amount". The api has no way to getTokens() .. or anything.

from apai-io.

BenMorel avatar BenMorel commented on June 12, 2024

So you think that the access is completely bound to revenu without any base limit?

That's what I understand, after the initial 30 days. You start with 8640 requests/day for the first month, and you may have close to zero requests per day the next month if you did not generated enough sales. That seems harsh I agree, but that's how I understand it.

from apai-io.

e-anima avatar e-anima commented on June 12, 2024

Ok if that is the case i will be fine in around 26 days.
I changed my partner id to the main id(the one left top bar if you log in the affiliate ui). Now it seems to work.
With my sub ids id well...does not work so good. Still analyzing the stuff. problem is i need my subids in the urls

from apai-io.

BenMorel avatar BenMorel commented on June 12, 2024

Still working today. Looks like they may have rescheduled

Confirmed in an email received yesterday from Amazon. You now have until 11th February 2020:

In a prior email message, we asked you to upgrade to version 5.0 of Amazon’s Product Advertising API (PA API 5.0) by 31st October 2019. We have identified that at least one of your applications is still making calls to PA API 4.0.

We would like to inform you that we are extending the deadline for completing the upgrade to a new date of 11th February 2020.

You may continue to use both PA API 4.0 and PA API 5.0 without disruption through 11th February 2020. After that date, we will deprecate PA API 4.0.

from apai-io.

e-anima avatar e-anima commented on June 12, 2024

Thank you for the update.

from apai-io.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.