Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "amazon_selling_partner-check-fba-inventory-levels",
name: "Check FBA Inventory Levels",
description: "Retrieves inventory summaries from Amazon fulfillment centers to monitor stock availability. [See the documentation](https://developer-docs.amazon.com/sp-api/reference/getinventorysummaries)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "amazon_selling_partner-fetch-orders-by-date-range",
name: "Fetch Orders by Date Range",
description: "Retrieves a list of orders based on a specified date range, buyer email, or order ID. [See the documentation](https://developer-docs.amazon.com/sp-api/reference/getorders)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "amazon_selling_partner-generate-sales-inventory-reports",
name: "Generate Sales & Inventory Reports",
description: "Requests reports on sales, inventory, and fulfillment performance. [See the documentation](https://developer-docs.amazon.com/sp-api/reference/getreports)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "amazon_selling_partner-get-order-details",
name: "Get Order Details",
description: "Fetches detailed information about a specific order using its order ID. [See the documentation](https://developer-docs.amazon.com/sp-api/reference/getorder)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "amazon_selling_partner-list-inbound-shipments",
name: "List Inbound Shipments",
description: "Fetches inbound shipment details to track stock movement and replenishment. [See the documentation](https://developer-docs.amazon.com/sp-api/reference/getshipments)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "amazon_selling_partner-optimize-product-pricing",
name: "Optimize Product Pricing",
description: "Retrieves pricing data to adjust product prices dynamically based on market trends. [See the documentation](https://developer-docs.amazon.com/sp-api/reference/getcompetitivepricing)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import amazonSellingPartner from "../../amazon_selling_partner.app.mjs";
import { ConfigurationError } from "@pipedream/platform";
import amazonSellingPartner from "../../amazon_selling_partner.app.mjs";

export default {
key: "amazon_selling_partner-retrieve-sales-performance-reports",
name: "Retrieve Sales Performance Reports",
description: "Fetches sales reports for visualization in third-party dashboarding tools. [See the documentation](https://developer-docs.amazon.com/sp-api/reference/getordermetrics)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
33 changes: 32 additions & 1 deletion components/amazon_selling_partner/amazon_selling_partner.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,39 @@ export default {
},
},
methods: {
_getApiEndpoint(sellerCentralUrl) {
const na = "https://sellingpartnerapi-na.amazon.com";
const eu = "https://sellingpartnerapi-eu.amazon.com";
const fe = "https://sellingpartnerapi-fe.amazon.com";

const map = {
// North America
"https://sellercentral.amazon.com": na,
"https://sellercentral.amazon.ca": na,
"https://sellercentral.amazon.com.mx": na,
"https://sellercentral.amazon.com.br": na,

// Europe (The Big 5 often share one URL, but newer ones have specific URLs)
"https://sellercentral-europe.amazon.com": eu,
"https://sellercentral.amazon.com.be": eu,
"https://sellercentral.amazon.nl": eu,
"https://sellercentral.amazon.pl": eu,
"https://sellercentral.amazon.se": eu,
"https://sellercentral.amazon.com.tr": eu,

// India (Uses EU endpoint)
"https://sellercentral.amazon.in": eu,

// Far East
"https://sellercentral.amazon.sg": fe,
"https://sellercentral.amazon.com.au": fe,
"https://sellercentral.amazon.co.jp": fe,
};

return map[sellerCentralUrl];
},
_baseUrl() {
return "https://sellingpartnerapi-na.amazon.com";
return this._getApiEndpoint(this.$auth.marketplace);
},
_makeRequest({
$ = this, path, ...opts
Expand Down
2 changes: 1 addition & 1 deletion components/amazon_selling_partner/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/amazon_selling_partner",
"version": "0.1.0",
"version": "0.2.0",
"description": "Pipedream Amazon Selling Partner Components",
"main": "amazon_selling_partner.app.mjs",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "amazon_selling_partner-new-inbound-shipment-to-fba-created",
name: "New Inbound Shipment to FBA Created",
description: "Emit new event when a new inbound shipment to FBA is created. [See the documentation](https://developer-docs.amazon.com/sp-api/reference/getshipments)",
version: "0.0.1",
version: "0.0.2",
type: "source",
dedupe: "unique",
props: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "amazon_selling_partner-new-order-created",
name: "New Order Created",
description: "Emit new event when a new order is created in Amazon Seller Central. [See the documentation](https://developer-docs.amazon.com/sp-api/reference/getorders)",
version: "0.0.1",
version: "0.0.2",
type: "source",
dedupe: "unique",
methods: {
Expand Down
Loading