Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
383 commits
Select commit Hold shift + click to select a range
bd244e6
Merge pull request #243 from amzn/dependabot/maven/clients/sellingpar…
avvarga Jun 13, 2022
c4de707
Update listingsItems models
jevoniuk Jun 13, 2022
9e3f9f2
Bump Newtonsoft.Json
dependabot[bot] Jun 23, 2022
fb180ee
Merge pull request #251 from amzn/dependabot/nuget/clients/sellingpar…
EstebanSP-506 Jun 23, 2022
8bbea90
Add usage plan table for getMyFeesEstimates
jevoniuk Jun 27, 2022
7127fcf
Add notification schemas
waldrogi Jun 27, 2022
71e29df
Updates and corrections to OrdersV0 model
salric Jul 21, 2022
75037de
Update messaging-api-model
hudalexa Jul 21, 2022
4e7567f
Fix resource description of the uploads model and reference
waldrogi Jul 22, 2022
06bd99e
Improvements to the Orders API in support of Easy Ship shipments
salric Aug 10, 2022
ab5c62b
Update Services model
jevoniuk Aug 10, 2022
d24e230
Add a CallOut in shipping v1 api doc to use Shipping V2 API doc
waldrogi Aug 15, 2022
266fcc2
Update the Product Pricing model
jevoniuk Aug 17, 2022
acaa4a0
Update broken link to marketplace support table for EasyShip
waldrogi Aug 19, 2022
54f2285
Description updates and corrections
salric Aug 19, 2022
eccd0ea
Update marketplaceids description
waldrogi Aug 24, 2022
9f5342a
Add CarrierName examples for PartneredSmallParcelDataInput
hudalexa Aug 30, 2022
a8e2824
Update SP-API throttling rates Catalog Items v2022-04-01
waldrogi Aug 31, 2022
f3c11a6
Update SP-API throttling rates Catalog Items v2020-12-01
waldrogi Aug 31, 2022
a2405b9
Update SP-API throttling rates for Product Pricing v0
waldrogi Aug 31, 2022
d44bbe0
Update SP-API throttling rates
waldrogi Aug 31, 2022
ac2cd2a
Update SP-API throttling rates Catalog Items v0
waldrogi Aug 31, 2022
4895c48
Update searchCatalogItems ItemSearchResults numberOfResults description.
waldrogi Sep 20, 2022
a9b4515
Add new release of vendor DF Shipping API model
salric Sep 21, 2022
c2383c7
Merge branch 'main' of https://github.com/amzn/selling-partner-api-mo…
salric Sep 21, 2022
fc5c10d
Update getInventorySummaries description
jevoniuk Sep 29, 2022
8261af8
Add the FBA Inventory Availability Change schema
jevoniuk Oct 12, 2022
c31037d
Add vendorTrafficReport and sellingPartnerMarketBasketAnalysisReport
waldrogi Oct 17, 2022
5c6303b
Update listing description in productPricing
andiec1 Oct 25, 2022
bd7a00d
Update compression algorithm details for getReportDocument in Reports…
waldrogi Nov 1, 2022
784e994
Update compression algorithm details for getReportDocument in Reports…
waldrogi Nov 1, 2022
238a1ea
Update compression algorithm details for FeedDocument in Feeds API v2…
waldrogi Nov 7, 2022
41cec54
Update compression algorithm details for FeedDocument in Feeds API v2…
waldrogi Nov 8, 2022
c8ae5a5
Update compression algorithm details for FeedDocument in Feeds API v2…
waldrogi Nov 8, 2022
310d4a5
Add sellerSalesAndTrafficReport to github.
waldrogi Nov 9, 2022
85e2cbf
Update operations descriptions in Catalog Items v0
waldrogi Nov 17, 2022
40727ba
Publish updated fulfillmentInboundV0 to github and readme.
waldrogi Dec 5, 2022
a2adc12
catalogItems_2022-04-01.json Update for missing data elements
waldrogi Dec 6, 2022
bdcffc7
update descriptions in reports_2021_06_30.json
andiec1 Dec 28, 2022
b13082e
update descriptions in financesV0.json
andiec1 Dec 30, 2022
4ca23c0
update shipment invoicing model on github to match model on readme
andiec1 Jan 11, 2023
e8fe064
update broken links and update usage plan table to easy-ship-2022-03-23
andiec1 Jan 19, 2023
bb972b3
updated easyship with correct licesing information
andiec1 Jan 23, 2023
b3b92e5
Add new productPricing_2022-05-01 model
salric Jan 25, 2023
955fe20
Orders API - new serialNumber attribute
waldrogi Jan 25, 2023
8b546b8
Finances API update for StorageReservationBillingList
waldrogi Jan 25, 2023
53763b8
Update SP-API throttling rates Catalog Items v2022-04-01
waldrogi Feb 7, 2023
b04225f
Remove shipmentConfirmation (beta) content and republish Orders V0 mo…
waldrogi Feb 8, 2023
a0abf2e
Update Usage plans table for the Uploads API V2020-11-01 model
waldrogi Feb 20, 2023
c1f2940
Update Usage plans table for the Messaging API reference.
waldrogi Feb 20, 2023
b460f52
Update Usage plans table for the Feeds V2021 model
waldrogi Feb 21, 2023
446793b
Migrate Feeds Schemas to GitHub repo
waldrogi Feb 21, 2023
555574f
update usage plans and typo in vendorShipments.json
andiec1 Feb 22, 2023
606fa61
Add delivery preferences attribute to getOrderAddress
waldrogi Feb 22, 2023
c592499
Update the Vendor DF Orders model
jevoniuk Feb 22, 2023
6254d99
Add delivery preferences attribute to getOrderAddress for OrdersV0.
waldrogi Feb 22, 2023
4611547
Update usage plan table for the Tokens API model.
waldrogi Feb 22, 2023
cdda871
Update Orders V0 model
jevoniuk Feb 22, 2023
264f3de
Merge branch 'main' of https://github.com/amzn/selling-partner-api-mo…
salric Feb 23, 2023
72c8d5a
Add a constructor for AWSSigV4Signer so that a request can be signed …
amvreddy-amazon Feb 24, 2023
48a6b35
Merge branch 'main' of https://github.com/amzn/selling-partner-api-mo…
salric Feb 27, 2023
514c566
Commiting changes to boiler plate info for 3 models
Feb 28, 2023
e98a425
Merge branch 'main' of https://github.com/amzn/selling-partner-api-mo…
salric Mar 1, 2023
21c5283
Add vendorInventoryReport.json report schema.
waldrogi Mar 3, 2023
127b657
Add vendorSalesReport.json report schema to Github.
waldrogi Mar 3, 2023
05e473f
Add vendorForecastingReport.json report schema to github.
waldrogi Mar 3, 2023
29766d6
Update Usage plans table for FBA Inbound Eligibility v1
waldrogi Mar 3, 2023
5b4f9fa
Update Usage plans table for the Vendor DF Inventory v1 model.
waldrogi Mar 3, 2023
900a9ad
Update the usage plans table for the Vendor DF Orders v1 model.
waldrogi Mar 6, 2023
a7e5930
Update boiler plate info in descriptions solicitations.json
Mar 6, 2023
62aa0ed
Updating boiler plate information for vendorInvoices
Mar 6, 2023
4bcb088
Updating boiler plate info for models/merchant-fulfillment-api-model/…
Mar 6, 2023
f0da749
Add the vendorNetPureProductMarginReport.json report schema.
waldrogi Mar 6, 2023
451a6a9
Merge branch 'main' of https://github.com/amzn/selling-partner-api-mo…
waldrogi Mar 6, 2023
f48a62a
Updating boiler plate info for vendorOrders.json
Mar 6, 2023
f50e67b
Merge branch 'main' of https://github.com/amzn/selling-partner-api-mo…
salric Mar 6, 2023
b58dcea
Update description for operationType
salric Mar 7, 2023
8a1f599
updated descriptions to vendor DF paymentsV1 and shippingV1
andiec1 Mar 14, 2023
93e7bcc
Add sellingPartnerAlternatePurchaseReport.json report schema to GitHub.
waldrogi Mar 21, 2023
d632dcb
Add the vendorCouponReport.json report schema to GitHub.
waldrogi Mar 22, 2023
444cdec
Add the sellingPartnerSearchTermsReport.json report schema to GitHub.
waldrogi Mar 22, 2023
e166236
Add sellingPartnerRepeatPurchaseReport.json report schema to GitHub.
waldrogi Mar 22, 2023
ef92cd1
Add sellingPartnerItemComparisonReport.json report schema to GitHub.
waldrogi Mar 22, 2023
e5fc680
Add the sellerCouponReport.json report schema to GitHub.
waldrogi Mar 22, 2023
dcb3dac
Update Fulfillment Inbound
jevoniuk Mar 23, 2023
ee174e4
Add reference to URL encoding for the FBA Small & Light reference.
waldrogi Mar 23, 2023
62608c6
Update boiler plate information in financesV0.json
Mar 28, 2023
7d29003
updated fba inventory model nextToken expiration
andiec1 Mar 29, 2023
21f6bdf
Merge branch 'main' of https://github.com/amzn/selling-partner-api-mo…
andiec1 Mar 29, 2023
cc2fdaa
Add new fulfillment outbound model with dynamic sandbox support
salric Mar 29, 2023
3385f98
Updating with changes - links to report type values
Mar 30, 2023
adb24da
Update Listings Items models
jevoniuk Mar 30, 2023
b4bb213
Add reference to URL encoding for the FBA Inventory v1 model.
waldrogi Apr 7, 2023
ac1ce68
Change city to optional in address
salric Apr 19, 2023
f53dfd6
Remove deprecated reports sellingPartnerAlternatePurchaseReport.json …
waldrogi Apr 26, 2023
393f0de
Update Reports v2020-09-04 model description for deprecation.
waldrogi Apr 26, 2023
e71df5f
Update the Feeds v2020-09-04 model for deprecation.
waldrogi Apr 26, 2023
0edb210
update description to vendorTransactionStatus.json
andiec1 May 3, 2023
375117d
updates to productPricingv0
andiec1 May 11, 2023
71893ce
Remove IN MP data from Vendor Invoices API v1 model and update taxReg…
waldrogi May 16, 2023
5d3fcce
updated description for feesEstimateRequest and added url encoding bo…
andiec1 May 16, 2023
0711054
Remove ItemApprovalTypes and ItemApprovalStatus
jevoniuk May 17, 2023
f4ad1fc
Update vendor DirectFulfillment shipping for dynamic sandbox.
waldrogi May 17, 2023
73b3898
Update descriptions in InboundShipmentHeader
jevoniuk May 18, 2023
5bbb600
Update the Vendor DF Shipping v2021-12-28 weight description in the m…
waldrogi Jun 2, 2023
ea5c7b9
Update the Vendor Orders v1 shipToParty description in the model.
waldrogi Jun 2, 2023
e0f689f
update description about delay in retrieiving financial event
andiec1 Jun 5, 2023
d51bdf2
Add b2bProductOpportunitiesRecommendedForYouReport-2020-11-19.json to…
waldrogi Jun 6, 2023
4b3b97a
updated description to listFinancialEventsbyGroupID
andiec1 Jun 7, 2023
31d6c04
Add b2bProductOpportunitiesNotYetOnAmazonReport-2020-11-19.json to Gi…
waldrogi Jun 9, 2023
fd6317e
deprecation tags added to feeds and reports 2020-09-04
andiec1 Jun 20, 2023
87a7629
Merge branch 'main' of https://github.com/amzn/selling-partner-api-mo…
andiec1 Jun 20, 2023
7774a5c
Add marketplaceAsinPageViewMetrics.json to report schemas GitHub.
waldrogi Jun 20, 2023
a78f69d
Merge branch 'main' of https://github.com/amzn/selling-partner-api-mo…
waldrogi Jun 20, 2023
e10f27b
Add vendorRealTimeTrafficReport.json to the GitHub report schemas.
waldrogi Jun 21, 2023
babbd7f
Add vendorRealTimeInventoryReport.json to the report schema GitHub.
waldrogi Jun 21, 2023
e22fbef
Add vendorRealTimeSalesReport.json to the GitHub report schema.
waldrogi Jun 21, 2023
dc4bbd7
Add new replenishment API model
salric Jun 21, 2023
68e596c
Add new notification schemas
jevoniuk Jun 21, 2023
dbc88d0
Add B2bAnyOfferChangedNotification schema
jevoniuk Jun 21, 2023
4a1a6ec
Add promotionReport.json report schema to GitHub.
waldrogi Jun 27, 2023
4091347
Update Notifications model
jevoniuk Jun 29, 2023
e475529
Remove generic_keyword from Catalog Items
jevoniuk Jun 29, 2023
dccc183
Update Notifications model for ORDER_CHANGE
jevoniuk Jun 29, 2023
f55e0ab
Update the Vendor DF Shipping v1 Weight description in model.
waldrogi Jul 7, 2023
9ca9ef2
Update Vendor DF Payments v1 taxRegistrationNumber description in the…
waldrogi Jul 7, 2023
f3b0bc6
Include Invoice as PaymentMethod in Orders model
jevoniuk Jul 26, 2023
1ec815c
Update the Orders API model for ShipmentServiceLevelCategory.
waldrogi Aug 16, 2023
e352253
Update the Product Pricing v0 model
jevoniuk Aug 21, 2023
806b438
Update transparency information in Orders and MFN
jevoniuk Aug 31, 2023
6902c19
Update Orders model
jevoniuk Sep 20, 2023
39dd71c
Update the orders model for data archival FE.
waldrogi Sep 25, 2023
fcf32fd
Java Auth and auth lib changes
MeenaAmz Sep 29, 2023
f48b0a3
CSharp Auth and auth lib changes
MeenaAmz Oct 1, 2023
c24f91e
Add business object AssocaitedItems to orders api reference.
waldrogi Oct 11, 2023
3155f7f
update descriptions in pricingpricingv0
andiec1 Oct 11, 2023
4b38ffa
update descriptions to listingsItems_2021-08-01
andiec1 Oct 11, 2023
7781b52
ds store
andiec1 Oct 11, 2023
6a9f116
Update the listingsItems model.
waldrogi Oct 11, 2023
fd8ba3a
Update the product pricing api model.
waldrogi Oct 11, 2023
026dc52
Update the description for the Replenishment API.
waldrogi Oct 24, 2023
3e6dd55
Updating to most recent file
Nov 2, 2023
3c05ad8
Update productPricing_2022-05-01.json to add new resultStatus value.
waldrogi Nov 8, 2023
f6bbb4d
Product Type Definitions API Update.
waldrogi Nov 8, 2023
650b911
Update weight to mandatory
Nov 8, 2023
a50fd98
Merge branch 'main' of https://github.com/amzn/selling-partner-api-mo…
andiec1 Nov 8, 2023
5266d37
NOV8 release financesv0 model update
andiec1 Nov 8, 2023
96e3da1
Update weight to mandatory
Nov 8, 2023
f9c2f18
new model and reference for supply sources api
andiec1 Nov 8, 2023
63b0cfb
Merge branch 'main' of https://github.com/amzn/selling-partner-api-mo…
andiec1 Nov 8, 2023
1330518
Update weight to mandatory
Nov 8, 2023
b54be3d
Update Finances API
jevoniuk Nov 14, 2023
c434399
Update Finances model
jevoniuk Nov 14, 2023
08db8c3
Add Data Kiosk model and notification
jevoniuk Nov 15, 2023
29bb076
Update Data Kiosk notification schema
jevoniuk Nov 15, 2023
ecea184
Add the Sales and Traffic schema for Data Kiosk
jevoniuk Nov 17, 2023
550642b
Add throttle rate for getCompetitiveSummary.
waldrogi Nov 22, 2023
c1a9cdf
updated ListingsItemissuesChangeNotification
andiec1 Nov 21, 2023
4d2dc8e
Remove DS Store
jevoniuk Nov 27, 2023
c0f75b7
Remove DS Store
jevoniuk Nov 27, 2023
6f94832
Update shipmentStatusUpdates for vendorDirectFulfillmentShippingV1 mo…
waldrogi Dec 7, 2023
c255fc2
Update shipmentStatusUpdates for the vendor df shipping v2021-12-28 m…
waldrogi Dec 7, 2023
61a660b
Update Product Type Definitions API
jevoniuk Dec 8, 2023
7eb7f25
Notifications API enforcement actions update.
waldrogi Dec 13, 2023
0816dee
Update ListingsItemIssuesChangeNotification_2023-12-13.json schema.
waldrogi Dec 13, 2023
4c13e1b
Add Shipping v2 model
jevoniuk Dec 13, 2023
842bfe8
Add Application Management model
jevoniuk Dec 13, 2023
122c726
Updates for December release
Dec 13, 2023
563dd65
December release description updates
Dec 13, 2023
977602c
December release
Dec 13, 2023
8d48d65
Update vendorDirectFulfillmentOrdersV1.json
alex-rupprecht Dec 13, 2023
af7310b
Update Listings Items 2021 model
jevoniuk Dec 13, 2023
40ed177
Update Listings Items model
jevoniuk Jan 2, 2024
b651d70
Update listingsItems_2021-08-01.json
alex-rupprecht Jan 12, 2024
7a99d82
Clarify Fee Estimation Differences Between Product fees API and Reven…
waldrogi Jan 16, 2024
cef2765
Fix link in App Management model
jevoniuk Jan 22, 2024
9a13892
Update Orders v0 model
jevoniuk Jan 29, 2024
acb49e6
Updating with brazil extendedaddresses and iso 8601 links
Jan 31, 2024
bea2055
fba small and light deprecation note added
andiec1 Jan 31, 2024
9e01aa2
Updated respective links to point to new notifications type values page.
waldrogi Jan 31, 2024
b586f61
Update Listings Items 2021 model
jevoniuk Jan 31, 2024
e655a28
Update Data Kiosk model
jevoniuk Jan 31, 2024
ab590eb
deprecation note fba snl
andiec1 Jan 31, 2024
eadf784
fba snl deprecation note on productfees
andiec1 Jan 31, 2024
4226656
Update ShipsInPackage for release
Jan 31, 2024
52d73ae
Update Finances API Financial Events Group originaltotal description.
waldrogi Feb 15, 2024
51b3630
Fixing github issue with wrong file information
Feb 19, 2024
28f5a33
Add javascript SDK
Feb 20, 2024
23f3f5f
Merge pull request #351 from umedats/main
hinavinayak Feb 20, 2024
1453655
Add Python SDK
Feb 21, 2024
478762d
Add endUserDataReport.json to GitHub.
waldrogi Feb 21, 2024
1dcd1bc
Merge pull request #353 from umedats/main
hinavinayak Feb 21, 2024
a0db67e
Update analytics_salesAndTraffic_2023_11_15
jevoniuk Mar 5, 2024
7bde415
Update the Fulfillment Outbound model
jevoniuk Mar 20, 2024
3a799fd
Update Feed_Processing_Finished and Report_Processing_Finished notifi…
waldrogi Mar 20, 2024
49e1257
Update Vendor Shipments model
jevoniuk Mar 20, 2024
8697e1a
Update MarketplaceAsinPageViewMetrics.json scema.
waldrogi Mar 20, 2024
5265498
Update Fulfillment Inbound v0 model
jevoniuk Mar 27, 2024
7c59ac5
Update Merchant Fulfillment model
jevoniuk Mar 27, 2024
759f36b
Add redirect for FBA small and light API.
waldrogi Mar 29, 2024
959218b
Add redirect for the authorization API.
waldrogi Mar 29, 2024
5f6ac80
Add Fulfillment Inbound v2024 model
jevoniuk Apr 1, 2024
b894336
Update Data Kiosk schemas
jevoniuk Apr 24, 2024
d58ccf3
orders v0 update release
andiec1 Apr 24, 2024
f7fd547
Update Easy Ship model
jevoniuk Apr 24, 2024
1f84755
Merge branch 'main' of https://github.com/amzn/selling-partner-api-mo…
andiec1 Apr 24, 2024
d2e6f7f
Update Feeds model
jevoniuk Apr 24, 2024
62ecbcf
Update Reports model
jevoniuk Apr 24, 2024
eb3b6d3
Update Vendor report schemas
jevoniuk Apr 24, 2024
77558ea
Update Sales and Traffic 2024 schema
jevoniuk Apr 24, 2024
1fb5f84
Update Data Kiosk Economics schema
jevoniuk Apr 24, 2024
c56f882
Update OrdersV0 model.
waldrogi May 1, 2024
63d9cfa
Remove analytics_economics_2024_03_15.graphql from GitHub.
waldrogi May 6, 2024
d1a573d
Update closing_inactive_issues.yml
shreeharsh-a May 9, 2024
28abda5
Update closing_inactive_issues.yml
shreeharsh-a May 9, 2024
03a1825
Update closing_inactive_issues.yml
shreeharsh-a May 9, 2024
11e00a7
Add Economics DK schema, and update sales and trafic schemas.
waldrogi May 9, 2024
368f916
Update Product Pricing API v2022-05-01 getCompetitiveSummary.
waldrogi May 22, 2024
f15a5da
Update Catalog Items API v2022
lisa-delaney May 22, 2024
9a43701
Update Product Pricing API v2022-05-01 getCompetitiveSummary.
waldrogi May 22, 2024
0362691
Update closing_inactive_issues.yml
shreeharsh-a May 23, 2024
53e20ab
Update README.md
shreeharsh-a May 29, 2024
86d5ed0
Update README.md
shreeharsh-a May 29, 2024
5a98a87
Update the Fulfillment Inbound v2024-03-20 model
jevoniuk Jun 4, 2024
3890eb8
Add Amazon Warehousing and Distribution model to Github.
waldrogi Jun 19, 2024
12eeac8
Update Replenishment API model
jevoniuk Jun 19, 2024
ebf7908
Add Vendor Analytics dataset for Data Kiosk
jevoniuk Jun 19, 2024
c744c40
Update FBA Inventory and Fulfillment Outbound models
lisa-delaney Jun 19, 2024
cb9e781
Update Vendor Analytics dataset
jevoniuk Jun 19, 2024
dff7a79
Update dates in the Feeds and Reports models
jevoniuk Jun 21, 2024
20de4e7
Update Analytics Sales and Traffic schema
jevoniuk Jun 25, 2024
773915d
Vendor df models update.
waldrogi Jun 27, 2024
0778c44
Clarify format for FreightReadyDate
jevoniuk Jun 27, 2024
8537cf9
Update Merchant Fulfillment v0 model with Benefits to ShippingService.
waldrogi Jun 27, 2024
f31e2c2
Update Fulfillment Outbound model
lisa-delaney Jun 28, 2024
36c1b13
Update descriptions in awd_2024-05-09.json.
waldrogi Jul 2, 2024
eab4b08
Added the Benefits object to Merchant Fulfillment
jevoniuk Jul 8, 2024
e3ed9ac
Add unitOfMeasure to the vendorOrders model.
waldrogi Aug 14, 2024
4897fc2
Update Sellers API model
jevoniuk Aug 14, 2024
b856edd
Update AWD model
jevoniuk Aug 14, 2024
df8cba3
Update 400 Error Response Message for rotateApplicationClientSecret.
waldrogi Aug 14, 2024
21de6a2
Revert "Update AWD model"
lisa-delaney Aug 19, 2024
5979ca6
Update AWD model
lisa-delaney Aug 19, 2024
1b5662a
Add rate limit difference note to the Feeds API.
waldrogi Aug 22, 2024
2b183a1
Update README.md
dengarcia Aug 25, 2024
0d3b270
Update rate limits in Catalog Items
jevoniuk Aug 26, 2024
72351e5
Merge branch 'SPAPIDoc-2419-listingsitemsissueschange-schema'
nusrath1133 Sep 5, 2024
35ff346
Merge branch 'main' into pr/4121
nusrath1133 Sep 5, 2024
14bc20f
Added basic IAM Role Implementation to C# Auth and Auth client with n…
avvarga Apr 27, 2021
d9b5771
Added AWSSDK Dependencies
avvarga May 5, 2021
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
Binary file added .DS_Store
Binary file not shown.
29 changes: 29 additions & 0 deletions .github/workflows/closing_inactive_issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
#
# You can adjust the behavior by modifying this file.
# For more information, see:
# https://github.com/actions/stale
name: Mark stale issues and pull requests

on:
schedule:
- cron: '5 * * * *'

jobs:
stale:

runs-on: ubuntu-latest
permissions:
issues: write
contents: write

steps:
- uses: actions/stale@v9
with:
days-before-issue-stale: 30
days-before-issue-close: 3
close-issue-message: 'closed for inactivity'
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This is a very old issue that is probably not getting as much attention as it deserves. We encourage you to check if this is still an issue after the latest release and if you find that this is still a problem, please feel free to open a new issue and make a reference to this one.'
stale-issue-label: 'closing soon'
operations-per-run: 1000
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
## Selling Partner API Models
This repository contains Swagger models for developers to use to create software to call Selling Partner APIs. Developers can use [swagger codegen](https://github.com/swagger-api/swagger-codegen) to generate client libraries from these models. Please refer to [selling-partner-api-docs](https://github.com/amzn/selling-partner-api-docs) for additional documentation and read the [Selling Partner Api Developer Guide](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/developer-guide/SellingPartnerApiDeveloperGuide.md) for instructions to get started.
This repository contains Swagger models for developers to use to create software to call Selling Partner APIs. Developers can use [swagger codegen](https://github.com/swagger-api/swagger-codegen) to generate client libraries from these models. Please refer to [selling-partner-api-docs](https://github.com/amzn/selling-partner-api-docs) for additional documentation and read the [Selling Partner API Developer Guide](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/developer-guide/SellingPartnerApiDeveloperGuide.md) for instructions to get started.

The [models directory](https://github.com/amzn/selling-partner-api-models/tree/main/models) contains all of the currently available Selling Partner API models.

The [clients directory](https://github.com/amzn/selling-partner-api-models/tree/main/clients) contains a [Java library](https://github.com/amzn/selling-partner-api-models/tree/main/clients/sellingpartner-api-aa-java) and a [C# library](https://github.com/amzn/selling-partner-api-models/tree/main/clients/sellingpartner-api-aa-csharp) with mustache templates for use with [swagger-codegen](https://swagger.io/tools/swagger-codegen/) to generate client libraries with authentication and authorization functionality included. The templates are located in *resources/swagger-codegen*.

The [schemas directory](https://github.com/amzn/selling-partner-api-models/tree/main/schemas) contains all of the currently available Selling Partner Api schemas.

**Note:** For any issues related to SP API like bugs or troubleshooting, please reach out to [Developer Support](https://developer.amazonservices.com/support) so that the right team can help / channel your inputs (in case of bugs / feature requests) to the development team.

## Security

See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.

## License

This project is licensed under the Apache-2.0 License.

Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
package sampleCode;

// Imports from the Selling Partner API (SP-API) Auth & Auth client library.
import com.amazon.SellingPartnerAPIAA.AWSAuthenticationCredentials;
import com.amazon.SellingPartnerAPIAA.AWSAuthenticationCredentialsProvider;
import com.amazon.SellingPartnerAPIAA.AWSSigV4Signer;
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.Request;
import com.squareup.okhttp.RequestBody;
import com.squareup.okhttp.Response;

import java.io.IOException;

public class DelegatedRestrictedDataTokenWorkflowForDelegatee {

// This represents a workflow for a simple use case. Other use cases can be implemented using similar patterns.
public static void main(String[] args) throws IOException {
// The values for method, path and restrictedDataToken should match the RDT request made by delegator and the response.
String method = "GET";
String path = "/orders/v0/orders/123-1234567-1234567";
String restrictedDataToken = "Atz.sprdt|AYABeKCs7hKXXXXXXXXXXXXXXXXXX...";

// Build, sign, and execute the request, specifying method, path, RDT, and RequestBody.
// Pass a RequestBody only if required by the restricted operation. The requestBody is not required in this example.
Response restrictedRequestResponse = buildAndExecuteDelegatedRestrictedRequest(method, path, restrictedDataToken, null);

// Check the restricted operation response status code and headers.
System.out.println(restrictedRequestResponse.code());
System.out.println(restrictedRequestResponse.headers());
}

// The SP-API endpoint.
private static final String sellingPartnerAPIEndpoint = "https://sellingpartnerapi-na.amazon.com";

// Configure the AWSAuthenticationCredentials object.
// If you registered your application using an IAM Role ARN, the AWSAuthenticationCredentials and AWSAuthenticationCredentialsProvider objects are required.
private static final AWSAuthenticationCredentials awsAuthenticationCredentials = AWSAuthenticationCredentials.builder()
// If you registered your application using an IAM Role ARN, use the AWS credentials of an IAM User that is linked to the IAM Role through the AWS Security Token Service policy.
// Or, if you registered your application using an IAM User ARN, use the AWS credentials of that IAM User. Be sure that the IAM User has the correct IAM policy attached.
.accessKeyId("aws_access_key")
.secretKey("aws_secret_key")
.region("aws_region")
.build();

// Configure the AWSAuthenticationCredentialsProvider object. This is only needed for applications registered using an IAM Role.
// If the application was registered using an IAM User, the AWSAuthenticationCredentialsProvider object should be removed.
private static final AWSAuthenticationCredentialsProvider awsAuthenticationCredentialsProvider = AWSAuthenticationCredentialsProvider.builder()
// The IAM Role must have the IAM policy attached as described in "Step 3. Create an IAM policy" in the SP-API Developer Guide.
.roleArn("arn:aws:iam::XXXXXXXXX:role/XXXXXXXXX")
.roleSessionName("session-name")
.build();

// An example of a helper method to build, sign, and execute a restricted operation, specifying RestrictedResource, (String) RDT, and RequestBody.
// Returns the restricted operation Response object.
private static Response buildAndExecuteDelegatedRestrictedRequest(String method, String path, String restrictedDataToken, RequestBody requestBody) throws IOException {
// Construct a request with the specified RestrictedResource, RDT, and RequestBody.
Request signedRequest = new Request.Builder()
.url(sellingPartnerAPIEndpoint + path) // Define the URL for the request, based on the endpoint and restricted resource path.
.method(method, requestBody) // Define the restricted resource method value, and requestBody, if required by the restricted operation.
.addHeader("x-amz-access-token", restrictedDataToken) // Sign the request with the RDT by adding it to the "x-amz-access-token" header.
.build(); // Build the request.

// Initiate an AWSSigV4Signer instance using your AWS credentials. This example is for an application registered using an AIM Role.
AWSSigV4Signer awsSigV4Signer = new AWSSigV4Signer(awsAuthenticationCredentials, awsAuthenticationCredentialsProvider);

/*
// Or, if the application was registered using an IAM User, use the following example:
AWSSigV4Signer awsSigV4Signer = new AWSSigV4Signer(awsAuthenticationCredentials);
*/

// Sign the request with the AWSSigV4Signer.
signedRequest = awsSigV4Signer.sign(signedRequest);

// Execute the signed request.
OkHttpClient okHttpClient = new OkHttpClient();
Response response = okHttpClient.newCall(signedRequest).execute();

return response;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
package sampleCode;

// Imports from the Selling Partner API (SP-API) Auth & Auth client library.
import com.amazon.SellingPartnerAPIAA.AWSAuthenticationCredentials;
import com.amazon.SellingPartnerAPIAA.AWSAuthenticationCredentialsProvider;
import com.amazon.SellingPartnerAPIAA.LWAAuthorizationCredentials;

// Imports from the generated Tokens API client library.
import io.swagger.client.ApiException;
import io.swagger.client.api.TokensApi;
import io.swagger.client.model.CreateRestrictedDataTokenRequest;
import io.swagger.client.model.CreateRestrictedDataTokenResponse;
import io.swagger.client.model.RestrictedResource;

// Imports from the generated Tokens API client library dependencies.
import java.io.IOException;
import java.util.Arrays;
import java.util.List;


public class DelegatedRestrictedDataTokenWorkflowForDelegator {

public static void main(String[] args) throws IOException, ApiException {
// This method represents a workflow for a simple use case. More use cases can be defined using a similar pattern.
callDelegatedRestrictedOperationWorkflow();
}

// The SP-API endpoint.
private static final String sellingPartnerAPIEndpoint = "https://sellingpartnerapi-na.amazon.com";

// Declare a string variable for the Restricted Data Token (RDT).
private static String restrictedDataToken;

// Configure the LWAAuthorizationCredentials object.
private static final LWAAuthorizationCredentials lwaAuthorizationCredentials = LWAAuthorizationCredentials.builder()
.clientId("<application_client_id>")
.clientSecret("<application_client_secret>")
.refreshToken("Atzr|XXXXXXXXXXX")
.endpoint("https://api.amazon.com/auth/O2/token")
.build();

// Configure the AWSAuthenticationCredentials object.
// If you registered your application using an IAM Role ARN, the AWSAuthenticationCredentials and AWSAuthenticationCredentialsProvider objects are required.
private static final AWSAuthenticationCredentials awsAuthenticationCredentials = AWSAuthenticationCredentials.builder()
// If you registered your application using an IAM Role ARN, use the AWS credentials of an IAM User that is linked to the IAM Role through the AWS Security Token Service policy.
// Or, if you registered your application using an IAM User ARN, use the AWS credentials of that IAM User. Be sure that the IAM User has the correct IAM policy attached.
.accessKeyId("aws_access_key")
.secretKey("aws_secret_key")
.region("aws_region")
.build();

// Configure the AWSAuthenticationCredentialsProvider object. This is only needed for applications registered using an IAM Role.
// If the application was registered using an IAM User, the AWSAuthenticationCredentialsProvider object should be removed.
private static final AWSAuthenticationCredentialsProvider awsAuthenticationCredentialsProvider = AWSAuthenticationCredentialsProvider.builder()
// The IAM Role must have the IAM policy attached as described in "Step 3. Create an IAM policy" in the SP-API Developer Guide.
.roleArn("arn:aws:iam::XXXXXXXXX:role/XXXXXXXXX")
.roleSessionName("session-name")
.build();

// The SP-API Tokens API instance used to call the createRestrictedDataToken operation.
private static final TokensApi tokensApi = new TokensApi.Builder()
.awsAuthenticationCredentials(awsAuthenticationCredentials)
.awsAuthenticationCredentialsProvider(awsAuthenticationCredentialsProvider) // If the application uses User ARN, this line is not needed. Remove it or pass a null value.
.lwaAuthorizationCredentials(lwaAuthorizationCredentials)
.endpoint(sellingPartnerAPIEndpoint)
.build();

// This method wraps the workflow to request an RDT and make a call to a restricted operation.
private static void callDelegatedRestrictedOperationWorkflow() throws IOException, ApiException {

// Define the target application to which access is being delegated.
final String targetApplication = "amzn1.sellerapps.app.target-application";

// Define the path for the restricted operation that requires an RDT.
final String resourcePath = "/orders/v0/orders/123-1234567-1234567";

// Define the dataElements to indicates the type of Personally Identifiable Information requested.
// This parameter is required only when getting an RDT for use with the getOrder, getOrders, or getOrderItems operation of the Orders API
final List<String> dataElements = Arrays.asList("buyerInfo","shippingAddress");

// Build the RestrictedResource object with the respective Method (MethodEnum from RestrictedResource class), Path and dataElements.
RestrictedResource resource = buildRestrictedResource(RestrictedResource.MethodEnum.GET, resourcePath, dataElements);

// Make a list of the RestrictedResource objects that will be included in the request to create the RDT.
List<RestrictedResource> resourceList = Arrays.asList(resource);

// Get a delegated RDT for a list of RestrictedResource objects for a target application.
restrictedDataToken = getDelegatedRestrictedDataToken(targetApplication, resourceList);

// Pass the delegated RDT to the targetApplication owner.
// Delegated party should build, sign, and execute the request.
// An RDT expires after 60 minutes.

// Below is a example of how the workflow would look when requesting an RDT for multiple restricted resources.
// You can specify a maximum of 50 restricted resources.
/*
// Define a path for each restricted operation that requires an RDT.
final String resourcePath1 = "/orders/v0/orders";
final String resourcePath2 = "/orders/v0/orders/123-7654321-1234567";
final String resourcePath3 = "/orders/v0/orders/123-1234567-7654321/items";
final String resourcePath4 = "/mfn/v0/shipments/FBA1234ABC5D";
// Define the dataElements to indicate the type of Personally Identifiable Information to be requested.
// This parameter is required only when getting an RDT for use with the getOrder, getOrders, or getOrderItems operation of the Orders API
final List<String> dataElements = Arrays.asList("buyerInfo","shippingAddress");
// Build each RestrictedResource object with the respective Method (MethodEnum from RestrictedResource class) and Path.
RestrictedResource resource1 = buildRestrictedResource(RestrictedResource.MethodEnum.GET, resourcePath1, dataElements);
RestrictedResource resource2 = buildRestrictedResource(RestrictedResource.MethodEnum.GET, resourcePath2, dataElements);
RestrictedResource resource3 = buildRestrictedResource(RestrictedResource.MethodEnum.GET, resourcePath3, dataElements);
RestrictedResource resource4 = buildRestrictedResource(RestrictedResource.MethodEnum.GET, resourcePath4);
// Make a list of the RestrictedResource objects that will be included in the request to create the RDT.
List<RestrictedResource> resourceList = Arrays.asList(resource1,resource2,resource3,resource4);
// Get a delegated RDT for a list of RestrictedResource objects for a target application.
restrictedDataToken = getDelegatedRestrictedDataToken(targetApplication, resourceList);
// Pass the delegated RDT to the targetApplication owner.
// If you request an RDT for multiple restricted resources; the delegated party should build, sign and execute each restricted operation separately.
// An RDT expires after 60 minutes.
*/
}

// An example of a helper method for building RestrictedResource objects with dataElements parameters.
private static RestrictedResource buildRestrictedResource(RestrictedResource.MethodEnum method, String path, List<String> dataElements){
RestrictedResource resource = buildRestrictedResource(method,path);
resource.dataElements(dataElements);
return resource;
}

// An example of a helper method for building RestrictedResource objects, specifying the method (MethodEnum from RestrictedResource class) and path parameters.
private static RestrictedResource buildRestrictedResource(RestrictedResource.MethodEnum method, String path){
RestrictedResource resource = new RestrictedResource();
resource.setMethod(method);
resource.setPath(path);
return resource;
}

// An example of a helper method for creating a delegated RDT for a list of RestrictedResource objects for a target application.
private static String getDelegatedRestrictedDataToken(String targetApplication, List<RestrictedResource> resourceList) throws ApiException {
// Initialize a CreateRestrictedDataTokenRequest object that represents the Restricted Data Token request body.
CreateRestrictedDataTokenRequest restrictedDataTokenRequest = new CreateRestrictedDataTokenRequest();

// Set target application in the CreateRestrictedDataTokenRequest object
restrictedDataTokenRequest.setTargetApplication(targetApplication);

// Add a resource list to the CreateRestrictedDataTokenRequest object.
restrictedDataTokenRequest.setRestrictedResources(resourceList);

try {
CreateRestrictedDataTokenResponse response = tokensApi.createRestrictedDataToken(restrictedDataTokenRequest);
restrictedDataToken = response.getRestrictedDataToken();
return restrictedDataToken;
} catch (ApiException e) {
System.out.println(e.getResponseHeaders()); // Capture the response headers when a exception is thrown.
throw e;
}
}
}
Loading