This app demonstrates how to use the APIs listed in Building Listings Management Workflows Guide to build a sample specifically for JSON listing schema validation. The app covers steps
- Check item exist in the Amazon Catalog.
- Find listing restrictions if item exist
- Search Product type given the keywords and get Amazon recommended product type
- Get the json schema and meta schema of the given product from the product type definition API
- Store the two schema files locally
- use online json editor tool to fillout the values
- Store the json values payload locally
- Validate the json payload against the schema and check any syntax error
- Send putListingItem request with validation preview mode
- This app requires Java 11 or above, so please install a supported version
- This sample app is build using the SP-API Java SDK So make sure your project has this dependency in latest version. As of May/21/2025, the latest version is 1.5.6
<dependency>
<groupId>com.networknt</groupId>
<artifactId>json-schema-validator</artifactId>
<version>1.5.6</version>
</dependency>- This sample app is using netoworknt as its open sourced JSON schema validate library but you could use own one. And here is the Maven dependency look like
<dependency>
<groupId>com.networknt</groupId>
<artifactId>json-schema-validator</artifactId>
<version>1.5.6</version>
</dependency> - Check out the repository to your computer from Git
- Edit config.yml file to include all the necessary values such as client id, client secret, and refresh token
- Use IntelliJ to open the project
- Navigate to the Main.java and click the Run button
- Check the printed result in the console