Skip to content

Commit

Permalink
馃帀 Source Amazon Seller Partner: add restock inventory reports (#15063)
Browse files Browse the repository at this point in the history
* add restock inventory reports

* fix acceptance test

* add restock inventory reports

* fix acceptance test

* revert additionalProperties attribute to false

* add schema

* add entry for restock_inventory integration test

* update changelog

* remove additional properties attribute
  • Loading branch information
ganpatagarwal committed Aug 23, 2022
1 parent a4916a4 commit e040362
Show file tree
Hide file tree
Showing 10 changed files with 219 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
Original file line number Diff line number Diff line change
@@ -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"]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"type": ["null", "array"],
"items": {
"type": ["null", "object"],
"additionalProperties": false,
"properties": {
"taxRegistrationType": {
"type": ["null", "string"]
Expand Down Expand Up @@ -157,7 +156,6 @@
"type": ["null", "array"],
"items": {
"type": ["null", "object"],
"additionalProperties": false,
"properties": {
"taxRegistrationType": {
"type": ["null", "string"]
Expand Down Expand Up @@ -218,7 +216,6 @@
"type": ["null", "array"],
"items": {
"type": ["null", "object"],
"additionalProperties": false,
"properties": {
"packageIdentifier": {
"type": ["null", "string"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
ListFinancialEvents,
MerchantListingsReports,
Orders,
RestockInventoryReports,
SellerFeedbackReports,
VendorDirectFulfillmentShipping,
VendorInventoryHealthReports,
Expand Down Expand Up @@ -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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 2 additions & 0 deletions docs/integrations/sources/amazon-seller-partner.md
Original file line number Diff line number Diff line change
Expand Up @@ -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\)
Expand Down Expand Up @@ -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 |
Expand Down

0 comments on commit e040362

Please sign in to comment.