New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

tap-amazon-sp

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tap-amazon-sp

Singer.io tap for extracting data from Amazon Seller Partner API.

  • 0.1.1
  • PyPI
  • Socket score

Maintainers
1

tap-amazon-sp

This is a Singer tap that produces JSON-formatted data following the Singer spec.

This tap:

  • Pulls raw data from Amazon SP API
  • Extracts the following resources:
  • Outputs the schema for each resource
  • Incrementally pulls data based on the input state

Install

pip install tap-amazon-sp

Usage

  1. Follow Singer.io Best Practices for setting up separate tap and target virtualenvs to avoid version conflicts.
  2. Create a config file ~/config.json with Amazon Seller Partner API credentials. Multiple accounts across different marketplaces are supported. Here is a list of marketplace names.
    {
      "accounts": [
        {
          "selling_partner_id": "NA_SELLING_PARTNER_ID",
          "marketplaces": ["US", "MX", "CA"],
          "refresh_token": "env[NA_REFRESH_TOKEN]"
        },
        {
          "selling_partner_id": "AU_SELLING_PARTNER_ID",
          "marketplaces": ["AU"],
          "refresh_token": "env[AU_REFRESH_TOKEN]"
        }
      ],
      "access_key_id": "ACCESS_KEY_ID",
      "secret_access_key": "env[SECRET_ACCESS_KEY]",
      "sp_role_arn": "arn:aws:iam::1234567890:role/RoleName",
      "lwa_client_id": "CLIENT_ID",
      "lwa_client_secret": "env[LWA_CLIENT_SECRET]",
      "start_date": "2021-01-01T00:00:00Z",
      "rate_limit_backoff_seconds": 60
    }
    
  3. Discover catalog: tap-amazon-sp -d > catalog.json
  4. Select orders stream in the generated catalog.json.
    ...
    "stream": "orders",
    "metadata": [
      {
        "breadcrumb": [],
        "metadata": {
          "table-key-properties": [
            "AmazonOrderId"
          ],
          "forced-replication-method": "INCREMENTAL",
          "valid-replication-keys": [
            "LastUpdateDate"
          ],
          "inclusion": "available",
          "selected": true  <-- Somewhere in the huge catalog file, in stream metadata.
        }
      },
      ...
    ]
    ...
    
  5. Use following command to sync all orders with order items, buyer info and shipping address (when available).
tap-amazon-sp -c config.json --catalog catalog.json > output.txt

Copyright © 2021 Vibe Inc

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc