Linking Amazon Selling Partner as a source

Let AI connect your sources for you

Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog.

Learn more
PostHog Wizard hedgehog

The Amazon Selling Partner connector syncs your Amazon seller and vendor data into the PostHog data warehouse – orders, financial transactions, payouts, FBA inventory, fulfillment orders, vendor purchase orders and analytics reports.

You need a Login with Amazon (LWA) application with Selling Partner API access. PostHog uses your LWA credentials to authenticate with Amazon's SP-API and sync data from the endpoints your app is authorized for.

Prerequisites

Create a Selling Partner API application in the Amazon Developer Console and authorize it for the seller or vendor account you want to sync.

Your app needs different SP-API roles depending on which tables you sync:

  • Inventory and Order Tracking – required for orders, order_items, inventory_summaries, inbound_plans, fulfillment_orders and vendor_purchase_orders
  • Finance and Accounting – required for transactions and payouts
  • Amazon Fulfillment – required for fulfillment_orders
  • Brand Analytics – required for vendor report tables (vendor_sales, vendor_inventory, vendor_net_pure_product_margin, vendor_forecasts, vendor_real_time_sales)

Vendor report tables also require marketplace IDs.

Adding a data source

  1. Go to the sources tab of the data pipeline section in PostHog.
  2. Click + New source and then click Link next to Amazon Selling Partner.
  3. Select the Region that matches your Amazon account:
    • North America – US, Canada, Mexico, Brazil
    • Europe – UK, Germany, France, Italy, Spain, and others
    • Far East – Japan, Australia, Singapore
  4. Enter your Login with Amazon credentials:
    • LWA client ID – your application's client ID (starts with amzn1.application-oa2-client...)
    • LWA client secret – your application's client secret
    • Refresh token – an authorized refresh token from your LWA app (starts with Atzr|...)
  5. (Optional) Enter Marketplace IDs as a comma-separated list. Required for vendor report tables. For sellers, this filters orders, order items and inventory to specific marketplaces – leave it blank to sync every marketplace you sell in. Transactions always cover every marketplace regardless of this setting.
  6. Click Next.
  7. Select the tables you want to sync, set the sync method and frequency, then click Import.

PostHog validates your credentials at connect time. If the refresh token or LWA credentials are invalid, the connection fails immediately.

Available tables

Seller tables

TableDescriptionSync method
ordersA customer order placed with the seller, with its items nested in orderItems.Incremental on lastUpdatedTime
order_itemsOne row per item in an order, with the order's id, creation time and last update time.Incremental on lastUpdatedTime
transactionsA financial transaction on the seller account, such as an order payment, refund or fee.Incremental on postedDate
inventory_summariesFBA inventory levels per seller SKU and marketplace.Full refresh
payoutsA disbursement from Amazon to the seller's bank account or other payment instrument.Incremental on creationDate
inbound_plansA Fulfillment by Amazon inbound plan, used to send inventory to Amazon fulfillment centers.Full refresh
fulfillment_ordersA multi-channel fulfillment order that Amazon ships from FBA inventory for a sale outside Amazon.Incremental on statusUpdateTime

Note: orders and order_items read the same Amazon endpoint, so syncing both takes roughly twice as long.

Note: The fulfillment_orders table removes recipient personal data (name, street address, contact details and delivery notes) for privacy.

Vendor tables

TableDescriptionSync method
vendor_purchase_ordersA purchase order Amazon Retail placed with the vendor, with its line items. Amazon keeps 6 months of data.Incremental on purchaseOrderDate
vendor_salesDaily retail sales per ASIN (manufacturing view, retail program).Incremental on startDate
vendor_inventoryDaily inventory and operational health per ASIN.Incremental on startDate
vendor_net_pure_product_marginDaily net pure product margin per ASIN.Incremental on startDate
vendor_forecastsThe latest weekly customer demand forecast per ASIN (retail program).Full refresh
vendor_real_time_salesHourly ordered units and revenue per ASIN.Incremental on startTime

Vendor report tables require the Brand Analytics SP-API role and marketplace IDs in the source configuration.

Configuration

OptionDescription
Region
Type: select
Required: True
LWA client ID
Type: text
Required: True
LWA client secret
Type: password
Required: True
Refresh token
Type: password
Required: True
Marketplace IDs
Type: text
Required: False

Comma-separated. Required for vendor reports. For sellers it applies to orders, order items and inventory, while transactions always cover every marketplace. Sellers can leave it blank to use every marketplace they sell in.

Supported tables

TableDescriptionSync methodIncremental fieldPrimary key
orders

A customer order placed with the seller, with its items nested in orderItems.

Incremental, Full refreshlastUpdatedTime—
order_items

One row per item in an order, with the order's id, creation time and last update time.

Incremental, Full refreshlastUpdatedTime—
transactions

A financial transaction on the seller account, such as an order payment, refund or fee.

Incremental, Full refreshpostedDate—
inventory_summaries

FBA inventory levels per seller SKU and marketplace.

Full refresh——
payouts

A disbursement from Amazon to the seller's bank account or other payment instrument.

Incremental, Full refreshcreationDate—
inbound_plans

A Fulfillment by Amazon inbound plan, used to send inventory to Amazon fulfillment centers.

Full refresh——
fulfillment_orders

A multi-channel fulfillment order that Amazon ships from FBA inventory for a sale outside Amazon. The recipient's name, street address, contact details and delivery notes are removed.

Incremental, Full refreshstatusUpdateTime—
vendor_sales

Daily retail sales per ASIN for a vendor, from the Vendor Sales report (manufacturing view, retail program).

Incremental, Full refreshstartDate—
vendor_inventory

Daily inventory and operational health per ASIN for a vendor, from the Vendor Inventory report.

Incremental, Full refreshstartDate—
vendor_net_pure_product_margin

Daily net pure product margin per ASIN, a measure of Amazon's profitability on the vendor's items.

Incremental, Full refreshstartDate—
vendor_forecasts

The latest weekly customer demand forecast per ASIN, from the Vendor Forecasting report (retail program).

Full refresh——
vendor_real_time_sales

Hourly ordered units and revenue per ASIN, from the Vendor Real-Time Sales report.

Incremental, Full refreshstartTime—
vendor_purchase_orders

A purchase order Amazon Retail placed with the vendor, with its line items. Amazon keeps 6 months.

Incremental, Full refreshpurchaseOrderDate—
order_metrics

Amazon-computed order totals for one marketplace and one UTC day, for all buyer types and fulfillment networks.

Incremental, Full refreshstartTime—
invoices

Header of an invoice between Amazon and the selling partner, such as fees billed to a seller or a vendor invoice to Amazon.

Incremental, Full refreshlastUpdatedDate—
replenishment_offers

An offer enrolled in the Subscribe and Save replenishment program, with its program settings.

Full refresh——

Still have questions?

Was this page useful?