Settings and analytics through the API
Change a few safe settings from a script, with a preview first, and read the same numbers as the Analytics screen.
GET /settings shows, and PATCH /settings changes, only the settings that are safe to change from a script: the affiliate disclosure (on or off, its words and where it goes), how old a price may be before it is hidden (1 to 24 hours) and what an out-of-date product stops showing, the buy button's text and the price labels, the offer banner, the words beside your ratings, compact text, and whether clicks are also sent to Google Tag Manager, Google Analytics or Matomo.
Nothing else is shown or changed through the API: not your Amazon connections or any key or secret, the license, your team, the visitor-address settings, data deletion or white label. Those stay on their screens.
Changing settings needs the settings:write scope, which only an administrator's key can have. Read the settings first and send their ETag in the If-Match header. With dry_run=true the answer shows the settings before and after the change, and warns about a change with consequences (switching the disclosure off, or sending clicks to another tool), without saving anything. Changes are in the Audit Log.
With the analytics:read scope (a Manager's key or higher), GET /analytics/summary gives the clicks and views by day over the last 7, 30 or 90 days or between two dates, with the top products and pages; GET /analytics/audience gives the visitors by country, device and channel when Audience report is on; GET /analytics/realtime gives the last hour.