diff --git a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml index a1f4e9d97c9e8..7c5c09fefeaa7 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -25,7 +25,7 @@ - name: Amazon Seller Partner sourceDefinitionId: e55879a8-0ef8-4557-abcf-ab34c53ec460 dockerRepository: airbyte/source-amazon-seller-partner - dockerImageTag: 0.2.24 + dockerImageTag: 0.2.25 sourceType: api documentationUrl: https://docs.airbyte.io/integrations/sources/amazon-seller-partner icon: amazonsellerpartner.svg diff --git a/airbyte-config/init/src/main/resources/seed/source_specs.yaml b/airbyte-config/init/src/main/resources/seed/source_specs.yaml index c50e4ef8bcbe0..c1e3d75e478ff 100644 --- a/airbyte-config/init/src/main/resources/seed/source_specs.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_specs.yaml @@ -211,7 +211,7 @@ type: "string" path_in_connector_config: - "client_secret" -- dockerImage: "airbyte/source-amazon-seller-partner:0.2.24" +- dockerImage: "airbyte/source-amazon-seller-partner:0.2.25" spec: documentationUrl: "https://docs.airbyte.io/integrations/sources/amazon-seller-partner" changelogUrl: "https://docs.airbyte.io/integrations/sources/amazon-seller-partner" diff --git a/airbyte-integrations/connectors/source-amazon-seller-partner/Dockerfile b/airbyte-integrations/connectors/source-amazon-seller-partner/Dockerfile index 37138c236500c..85351e33fa190 100644 --- a/airbyte-integrations/connectors/source-amazon-seller-partner/Dockerfile +++ b/airbyte-integrations/connectors/source-amazon-seller-partner/Dockerfile @@ -12,5 +12,5 @@ RUN pip install . ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py" ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] -LABEL io.airbyte.version=0.2.24 +LABEL io.airbyte.version=0.2.25 LABEL io.airbyte.name=airbyte/source-amazon-seller-partner diff --git a/airbyte-integrations/connectors/source-amazon-seller-partner/acceptance-test-config.yml b/airbyte-integrations/connectors/source-amazon-seller-partner/acceptance-test-config.yml index ba2bff97284a1..dbefb426e98e4 100644 --- a/airbyte-integrations/connectors/source-amazon-seller-partner/acceptance-test-config.yml +++ b/airbyte-integrations/connectors/source-amazon-seller-partner/acceptance-test-config.yml @@ -42,6 +42,8 @@ tests: # configured_catalog_path: "integration_tests/configured_catalog_fba_fulfillment_customer_shipment_replacement_data.json" # - config_path: "secrets/config.json" # configured_catalog_path: "integration_tests/configured_catalog_browse_tree_data.json" +# - config_path: "secrets/config.json" +# configured_catalog_path: "integration_tests/configured_catalog_restock_inventory.json" # TODO: uncomment when Orders (or any other incremental) stream is filled with data # incremental: # - config_path: "secrets/config.json" diff --git a/airbyte-integrations/connectors/source-amazon-seller-partner/integration_tests/configured_catalog_restock_inventory.json b/airbyte-integrations/connectors/source-amazon-seller-partner/integration_tests/configured_catalog_restock_inventory.json new file mode 100644 index 0000000000000..35fa951e3dfa6 --- /dev/null +++ b/airbyte-integrations/connectors/source-amazon-seller-partner/integration_tests/configured_catalog_restock_inventory.json @@ -0,0 +1,107 @@ +{ + "streams": [ + { + "stream": { + "name": "GET_RESTOCK_INVENTORY_RECOMMENDATIONS_REPORT", + "json_schema": { + "title": "Restock Inventory Report", + "description": "Restock Inventory Report", + "type": "object", + "$schema": "http://json-schema.org/draft-07/schema#", + "properties": { + "Country": { + "type": ["null", "string"] + }, + "Product Name": { + "type": ["null", "string"] + }, + "FNSKU": { + "type": ["null", "string"] + }, + "Merchant SKU": { + "type": ["null", "string"] + }, + "ASIN": { + "type": ["null", "string"] + }, + "Condition": { + "type": ["null", "string"] + }, + "Supplier": { + "type": ["null", "string"] + }, + "Supplier part no.": { + "type": ["null", "string"] + }, + "Currency code": { + "type": ["null", "string"] + }, + "Price": { + "type": ["null", "string"] + }, + "Sales last 30 days": { + "type": ["null", "string"] + }, + "Units Sold Last 30 Days": { + "type": ["null", "string"] + }, + "Total Units": { + "type": ["null", "string"] + }, + "Inbound": { + "type": ["null", "string"] + }, + "Available": { + "type": ["null", "string"] + }, + "FC transfer": { + "type": ["null", "string"] + }, + "FC Processing": { + "type": ["null", "string"] + }, + "Customer Order": { + "type": ["null", "string"] + }, + "Unfulfillable": { + "type": ["null", "string"] + }, + "Working": { + "type": ["null", "string"] + }, + "Shipped": { + "type": ["null", "string"] + }, + "Receiving": { + "type": ["null", "string"] + }, + "Fulfilled by": { + "type": ["null", "string"] + }, + "Total Days of Supply (including units from open shipments)": { + "type": ["null", "string"] + }, + "Days of Supply at Amazon Fulfillment Network": { + "type": ["null", "string"] + }, + "Alert": { + "type": ["null", "string"] + }, + "Recommended replenishment qty": { + "type": ["null", "string"] + }, + "Recommended ship date": { + "type": ["null", "string"] + }, + "Recommended action": { + "type": ["null", "string"] + } + } + }, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + } + ] +} diff --git a/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/schemas/GET_RESTOCK_INVENTORY_RECOMMENDATIONS_REPORT.json b/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/schemas/GET_RESTOCK_INVENTORY_RECOMMENDATIONS_REPORT.json new file mode 100644 index 0000000000000..b84b87085fd8b --- /dev/null +++ b/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/schemas/GET_RESTOCK_INVENTORY_RECOMMENDATIONS_REPORT.json @@ -0,0 +1,95 @@ +{ + "title": "Restock Inventory Report", + "description": "Restock Inventory Report", + "type": "object", + "$schema": "http://json-schema.org/draft-07/schema#", + "properties": { + "Country": { + "type": ["null", "string"] + }, + "Product Name": { + "type": ["null", "string"] + }, + "FNSKU": { + "type": ["null", "string"] + }, + "Merchant SKU": { + "type": ["null", "string"] + }, + "ASIN": { + "type": ["null", "string"] + }, + "Condition": { + "type": ["null", "string"] + }, + "Supplier": { + "type": ["null", "string"] + }, + "Supplier part no.": { + "type": ["null", "string"] + }, + "Currency code": { + "type": ["null", "string"] + }, + "Price": { + "type": ["null", "string"] + }, + "Sales last 30 days": { + "type": ["null", "string"] + }, + "Units Sold Last 30 Days": { + "type": ["null", "string"] + }, + "Total Units": { + "type": ["null", "string"] + }, + "Inbound": { + "type": ["null", "string"] + }, + "Available": { + "type": ["null", "string"] + }, + "FC transfer": { + "type": ["null", "string"] + }, + "FC Processing": { + "type": ["null", "string"] + }, + "Customer Order": { + "type": ["null", "string"] + }, + "Unfulfillable": { + "type": ["null", "string"] + }, + "Working": { + "type": ["null", "string"] + }, + "Shipped": { + "type": ["null", "string"] + }, + "Receiving": { + "type": ["null", "string"] + }, + "Fulfilled by": { + "type": ["null", "string"] + }, + "Total Days of Supply (including units from open shipments)": { + "type": ["null", "string"] + }, + "Days of Supply at Amazon Fulfillment Network": { + "type": ["null", "string"] + }, + "Alert": { + "type": ["null", "string"] + }, + "Recommended replenishment qty": { + "type": ["null", "string"] + }, + "Recommended ship date": { + "type": ["null", "string"] + }, + "Recommended action": { + "type": ["null", "string"] + } + } +} diff --git a/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/schemas/VendorDirectFulfillmentShipping.json b/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/schemas/VendorDirectFulfillmentShipping.json index e7a56df4734e6..56bae0c6f47b3 100644 --- a/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/schemas/VendorDirectFulfillmentShipping.json +++ b/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/schemas/VendorDirectFulfillmentShipping.json @@ -55,7 +55,6 @@ "type": ["null", "array"], "items": { "type": ["null", "object"], - "additionalProperties": false, "properties": { "taxRegistrationType": { "type": ["null", "string"] @@ -157,7 +156,6 @@ "type": ["null", "array"], "items": { "type": ["null", "object"], - "additionalProperties": false, "properties": { "taxRegistrationType": { "type": ["null", "string"] @@ -218,7 +216,6 @@ "type": ["null", "array"], "items": { "type": ["null", "object"], - "additionalProperties": false, "properties": { "packageIdentifier": { "type": ["null", "string"] diff --git a/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/source.py b/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/source.py index f678777f2cdb5..72bf28b674125 100644 --- a/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/source.py +++ b/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/source.py @@ -34,6 +34,7 @@ ListFinancialEvents, MerchantListingsReports, Orders, + RestockInventoryReports, SellerFeedbackReports, VendorDirectFulfillmentShipping, VendorInventoryHealthReports, @@ -126,6 +127,7 @@ def streams(self, config: Mapping[str, Any]) -> List[Stream]: FbaShipmentsReports(**stream_kwargs), FbaReplacementsReports(**stream_kwargs), FbaStorageFeesReports(**stream_kwargs), + RestockInventoryReports(**stream_kwargs), FlatFileOpenListingsReports(**stream_kwargs), FlatFileOrdersReports(**stream_kwargs), FlatFileOrdersReportsByLastUpdate(**stream_kwargs), diff --git a/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/streams.py b/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/streams.py index 165bc6175997b..c8921760d3c3f 100644 --- a/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/streams.py +++ b/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/streams.py @@ -431,6 +431,14 @@ class FbaReplacementsReports(ReportsAmazonSPStream): name = "GET_FBA_FULFILLMENT_CUSTOMER_SHIPMENT_REPLACEMENT_DATA" +class RestockInventoryReports(ReportsAmazonSPStream): + """ + Field definitions: https://sellercentral.amazon.com/help/hub/reference/202105670 + """ + + name = "GET_RESTOCK_INVENTORY_RECOMMENDATIONS_REPORT" + + class VendorInventoryHealthReports(ReportsAmazonSPStream): name = "GET_VENDOR_INVENTORY_HEALTH_AND_PLANNING_REPORT" diff --git a/docs/integrations/sources/amazon-seller-partner.md b/docs/integrations/sources/amazon-seller-partner.md index 518f8a4f06505..7d93888223c9a 100644 --- a/docs/integrations/sources/amazon-seller-partner.md +++ b/docs/integrations/sources/amazon-seller-partner.md @@ -65,6 +65,7 @@ This source is capable of syncing the following tables and their data: - [FBA Shipments Reports](https://sellercentral.amazon.com/gp/help/help.html?itemID=200989100) - [FBA Replacements Reports](https://sellercentral.amazon.com/help/hub/reference/200453300) - [FBA Storage Fees Report](https://sellercentral.amazon.com/help/hub/reference/G202086720) +- [Restock Inventory Reports](https://sellercentral.amazon.com/help/hub/reference/202105670) - [Flat File Open Listings Reports](https://developer-docs.amazon.com/sp-api/docs/reports-api-v2021-06-30-reference) - [Flat File Orders Reports](https://developer-docs.amazon.com/sp-api/docs/reports-api-v2021-06-30-reference) - [Flat File Orders Reports By Last Update](https://developer-docs.amazon.com/sp-api/docs/reports-api-v2021-06-30-reference) \(incremental\) @@ -99,6 +100,7 @@ This source is capable of syncing the following tables and their data: | Version | Date | Pull Request | Subject | |:---------|:-----------|:-----------------------------------------------------------|:-----------------------------------------------------------------------| +| `0.2.25` | 2022-07-27 | [\#15063](https://github.com/airbytehq/airbyte/pull/15063) | Add Restock Inventory Report | | `0.2.24` | 2022-07-12 | [\#14625](https://github.com/airbytehq/airbyte/pull/14625) | Add FBA Storage Fees Report | | `0.2.23` | 2022-06-08 | [\#13604](https://github.com/airbytehq/airbyte/pull/13604) | Add new streams: Fullfiments returns and Settlement reports | | `0.2.22` | 2022-06-15 | [\#13633](https://github.com/airbytehq/airbyte/pull/13633) | Fix - handle start date for financial stream |