{"_id":"@alex-ov/n8n-nodes-amazon-api-selling-partner-customized","name":"@alex-ov/n8n-nodes-amazon-api-selling-partner-customized","dist-tags":{"latest":"1.9.12"},"versions":{"1.9.12":{"name":"@alex-ov/n8n-nodes-amazon-api-selling-partner-customized","version":"1.9.12","description":"Custom n8n node for the Amazon Selling Partner API","main":"index.js","scripts":{"build":"tsc && gulp build","dev":"tsc --watch","format":"prettier --write nodes credentials","lint":"eslint nodes credentials --ext .ts,.js","lint:fix":"eslint nodes credentials --ext .ts,.js --fix","test":"jest","test:watch":"jest --watch","test:ci":"jest --ci --json --outputFile=test-results.json"},"n8n":{"n8nNodesApiVersion":1,"credentials":["dist/credentials/AmazonSpApi.credentials.js"],"nodes":["dist/nodes/AmazonSellingPartner/AmazonSellingPartner.node.js"]},"repository":{"type":"git","url":"git+https://github.com/cashelastest/n8n-nodes-amazon-api-selling-partner-customized.git"},"author":{"name":"n8n"},"license":"MIT","bugs":{"url":"https://github.com/n8n-io/n8n-nodes-amazon-selling-partner/issues"},"homepage":"https://github.com/n8n-io/n8n-nodes-amazon-selling-partner#readme","dependencies":{"aws4":"^1.12.0","axios":"^1.6.8","papaparse":"^5.4.1"},"devDependencies":{"@types/aws4":"^1.11.6","@types/jest":"^29.5.12","@types/luxon":"^3.6.2","@types/node":"^18.19.31","@types/papaparse":"^5.3.14","@typescript-eslint/eslint-plugin":"^7.8.0","@typescript-eslint/parser":"^7.8.0","eslint":"^8.57.0","gulp":"^4.0.2","jest":"^29.7.0","lint-staged":"^15.2.2","n8n-workflow":"*","prettier":"^3.2.5","ts-jest":"^29.1.2","ts-node":"^10.9.2","typescript":"~4.8.4"},"peerDependencies":{"n8n-workflow":"*"},"_id":"@alex-ov/n8n-nodes-amazon-api-selling-partner-customized@1.9.12","gitHead":"226970cd4834a3017d080c8e7fff0331f4a5095b","_nodeVersion":"22.16.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-/lhKUKd1I6JLD4BkStG8ywxYT5EM2IErC+F1hWCLCcIX8JN0BF2lWveHFj34NbKfcEOf2djvH3E3M01rbNup7g==","shasum":"d8340fe9cdce06bc2cf361011484fdda4eb693ef","tarball":"https://registry.npmjs.org/@alex-ov/n8n-nodes-amazon-api-selling-partner-customized/-/n8n-nodes-amazon-api-selling-partner-customized-1.9.12.tgz","fileCount":58,"unpackedSize":328387,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCgd0VwiUlN0LHqZdXlCgvlC+JN2hZkTYdbuUid+UOy2gIhANBmmIIhJS64mJYVoAh0X8WXSX6xodBVs6W0Rna5GNBs"}]},"_npmUser":{"name":"alex-ov","email":"trew5804@gmail.com"},"directories":{},"maintainers":[{"name":"alex-ov","email":"trew5804@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/n8n-nodes-amazon-api-selling-partner-customized_1.9.12_1759742603233_0.45957819569117353"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-06T09:23:23.149Z","1.9.12":"2025-10-06T09:23:23.415Z","modified":"2025-10-06T09:23:23.730Z"},"maintainers":[{"name":"alex-ov","email":"trew5804@gmail.com"}],"description":"Custom n8n node for the Amazon Selling Partner API","homepage":"https://github.com/n8n-io/n8n-nodes-amazon-selling-partner#readme","repository":{"type":"git","url":"git+https://github.com/cashelastest/n8n-nodes-amazon-api-selling-partner-customized.git"},"author":{"name":"n8n"},"bugs":{"url":"https://github.com/n8n-io/n8n-nodes-amazon-selling-partner/issues"},"license":"MIT","readme":"# Amazon Selling Partner API Node for n8n\r\n\r\nA production-grade n8n custom node for Amazon Selling Partner API with comprehensive error handling, rate limiting, monitoring, and security features.\r\n\r\n## Features\r\n\r\n### 🚀 Core Functionality\r\n- **Orders Management**: Retrieve orders within date ranges with advanced filtering\r\n- **Order Details**: Fetch detailed information for a specific order by Order ID\r\n- **Order Items**: Retrieve all line items for a specific order, with automatic pagination\r\n- **Finance API**: Complete financial events, transaction history, and financial event groups\r\n- **Shipments Management**: Track and manage shipment operations and details\r\n- **Product Listings**: Manage product catalog and inventory operations\r\n- **Invoices & Reports**: Generate and retrieve invoices and financial reports\r\n- **Simplified Authentication**: LWA (Login with Amazon) credentials only - AWS credentials optional\r\n- **Multi-Marketplace Support**: Support for all Amazon marketplaces globally\r\n- **Automatic Pagination**: Handle large result sets seamlessly\r\n\r\n### 🛡️ Production-Ready Features\r\n- **Advanced Rate Limiting**: Token bucket algorithm matching SP-API requirements\r\n- **Intelligent Error Handling**: Comprehensive error categorization and recovery\r\n- **Request Queuing**: Smooth traffic spikes and prevent throttling\r\n- **Token Caching**: Efficient LWA token management with automatic refresh\r\n- **Circuit Breaker Pattern**: Graceful degradation during API outages\r\n\r\n### 🔒 Security & Compliance\r\n- **Secure Credential Storage**: Encrypted credential management\r\n- **Input Validation**: Comprehensive parameter validation\r\n- **Audit Logging**: Security event tracking\r\n- **Environment Isolation**: Separate sandbox and production configurations\r\n\r\n## Installation\r\n\r\n### Prerequisites\r\n- n8n version 1.0.0 or higher\r\n- Node.js 18.0.0 or higher\r\n- Amazon Selling Partner API application credentials\r\n\r\n### Install via npm\r\n```bash\r\nnpm install n8n-nodes-amazon-selling-partner\r\n```\r\n\r\n### Install via n8n Community Nodes\r\n1. Go to **Settings** > **Community Nodes** in your n8n instance\r\n2. Search for `n8n-nodes-amazon-selling-partner`\r\n3. Click **Install**\r\n\r\n## Setup\r\n\r\n### 1. Amazon SP-API Application Setup\r\n1. Register as a developer in the [Amazon Developer Console](https://developer.amazon.com/)\r\n2. Create a new SP-API application\r\n3. Obtain your LWA credentials (Client ID, Client Secret)\r\n4. Generate a refresh token through the authorization workflow\r\n\r\n### 2. n8n Credential Configuration\r\n\r\n#### Basic Setup (Recommended)\r\nFor most use cases, you only need LWA credentials:\r\n\r\n1. In n8n, create a new **Amazon Selling Partner API** credential\r\n2. Fill in the required fields:\r\n   - **Environment**: Choose Sandbox for testing, Production for live data\r\n   - **AWS Region**: Select your application's region\r\n   - **LWA Client ID**: From your SP-API application\r\n   - **LWA Client Secret**: From your SP-API application  \r\n   - **LWA Refresh Token**: Generated during authorization\r\n\r\n#### Advanced Setup (Optional AWS Signing)\r\nIf your application requires AWS SigV4 signing:\r\n\r\n1. Create AWS IAM user with SP-API permissions\r\n2. In the credential configuration, expand **Advanced Options**\r\n3. Add your AWS credentials:\r\n   - **AWS Access Key ID**: From your IAM user\r\n   - **AWS Secret Access Key**: From your IAM user\r\n   - **Use AWS SigV4 Signing**: Enable this option\r\n   - **AWS Role ARN**: (Optional) For enhanced security\r\n   - **SP-API Endpoint Override**: (Optional) Custom endpoint\r\n\r\n> **Note**: Most SP-API operations work with LWA-only authentication. AWS credentials are only needed for specific advanced operations or if your application configuration requires it.\r\n\r\n## Usage\r\n\r\n### Basic Orders Retrieval\r\n```json\r\n{\r\n  \"resource\": \"orders\",\r\n  \"operation\": \"getOrders\",\r\n  \"marketplaceIds\": [\"ATVPDKIKX0DER\"],\r\n  \"createdAfter\": \"2024-01-01T00:00:00Z\",\r\n  \"createdBefore\": \"2024-01-31T23:59:59Z\"\r\n}\r\n```\r\n\r\n### Get Order Details\r\n```json\r\n{\r\n  \"resource\": \"orders\",\r\n  \"operation\": \"getOrder\",\r\n  \"orderId\": \"123-1234567-1234567\"\r\n}\r\n```\r\n\r\n### Get Order Items\r\n```json\r\n{\r\n  \"resource\": \"orders\",\r\n  \"operation\": \"getOrderItems\",\r\n  \"orderId\": \"123-1234567-1234567\",\r\n  \"returnAll\": true\r\n}\r\n```\r\n\r\n### Advanced Filtering\r\n```json\r\n{\r\n  \"resource\": \"orders\",\r\n  \"operation\": \"getOrders\",\r\n  \"marketplaceIds\": [\"ATVPDKIKX0DER\", \"A2EUQ1WTGCTBG2\"],\r\n  \"createdAfter\": \"2024-01-01T00:00:00Z\",\r\n  \"createdBefore\": \"2024-01-07T23:59:59Z\",\r\n  \"additionalOptions\": {\r\n    \"orderStatuses\": [\"Unshipped\", \"PartiallyShipped\"],\r\n    \"fulfillmentChannels\": [\"AFN\"],\r\n    \"maxResultsPerPage\": 50,\r\n    \"returnAll\": true\r\n  }\r\n}\r\n```\r\n\r\n### Finance API Operations\r\n\r\n#### List Financial Event Groups\r\n```json\r\n{\r\n  \"resource\": \"finance\",\r\n  \"operation\": \"listFinancialEventGroups\",\r\n  \"financialEventGroupStartedAfter\": \"2024-01-01T00:00:00Z\",\r\n  \"financialEventGroupStartedBefore\": \"2024-01-31T23:59:59Z\",\r\n  \"additionalOptions\": {\r\n    \"maxResultsPerPage\": 100,\r\n    \"returnAll\": true\r\n  }\r\n}\r\n```\r\n\r\n#### List Financial Events\r\n```json\r\n{\r\n  \"resource\": \"finance\",\r\n  \"operation\": \"listFinancialEvents\",\r\n  \"postedAfter\": \"2024-01-01T00:00:00Z\",\r\n  \"postedBefore\": \"2024-01-31T23:59:59Z\",\r\n  \"additionalOptions\": {\r\n    \"maxResultsPerPage\": 100,\r\n    \"returnAll\": false\r\n  }\r\n}\r\n```\r\n\r\n#### List Financial Events by Group ID\r\n```json\r\n{\r\n  \"resource\": \"finance\",\r\n  \"operation\": \"listFinancialEventsByGroupId\",\r\n  \"eventGroupId\": \"12345678901234567890123456789012\",\r\n  \"postedAfter\": \"2024-01-01T00:00:00Z\",\r\n  \"additionalOptions\": {\r\n    \"maxResultsPerPage\": 50,\r\n    \"returnAll\": true\r\n  }\r\n}\r\n```\r\n\r\n#### List Financial Events by Order ID\r\n```json\r\n{\r\n  \"resource\": \"finance\",\r\n  \"operation\": \"listFinancialEventsByOrderId\",\r\n  \"orderId\": \"123-1234567-1234567\",\r\n  \"additionalOptions\": {\r\n    \"returnAll\": false\r\n  }\r\n}\r\n```\r\n\r\n#### List Transactions (Finances v2024-06-19)\r\n```json\r\n{\r\n  \"resource\": \"finance\",\r\n  \"operation\": \"listTransactions\",\r\n  \"postedAfter\": \"2024-01-01T00:00:00Z\",\r\n  \"postedBefore\": \"2024-01-31T23:59:59Z\",\r\n  \"marketplaceId\": \"ATVPDKIKX0DER\",\r\n  \"additionalOptions\": {\r\n    \"maxResultsPerPage\": 100,\r\n    \"returnAll\": true\r\n  }\r\n}\r\n```\r\n\r\n## Supported Marketplaces\r\n\r\n### North America\r\n- 🇺🇸 Amazon.com (US) - `ATVPDKIKX0DER`\r\n- 🇨🇦 Amazon.ca (Canada) - `A2EUQ1WTGCTBG2`\r\n- 🇲🇽 Amazon.com.mx (Mexico) - `A1AM78C64UM0Y8`\r\n- 🇧🇷 Amazon.com.br (Brazil) - `A2Q3Y263D00KWC`\r\n\r\n### Europe\r\n- 🇬🇧 Amazon.co.uk (UK) - `A1F83G8C2ARO7P`\r\n- 🇩🇪 Amazon.de (Germany) - `A1PA6795UKMFR9`\r\n- 🇫🇷 Amazon.fr (France) - `A13V1IB3VIYZZH`\r\n- 🇮🇹 Amazon.it (Italy) - `APJ6JRA9NG5V4`\r\n- 🇪🇸 Amazon.es (Spain) - `A1RKKUPIHCS9HS`\r\n- 🇳🇱 Amazon.nl (Netherlands) - `A1805IZSGTT6HS`\r\n- 🇸🇪 Amazon.se (Sweden) - `A2NODRKZP88ZB9`\r\n- 🇵🇱 Amazon.pl (Poland) - `A1C3SOZRARQ6R3`\r\n\r\n### Asia Pacific\r\n- 🇯🇵 Amazon.co.jp (Japan) - `A1VC38T7YXB528`\r\n- 🇦🇺 Amazon.com.au (Australia) - `A39IBJ37TRP1C6`\r\n- 🇸🇬 Amazon.sg (Singapore) - `A19VAU5U5O7RUS`\r\n- 🇦🇪 Amazon.ae (UAE) - `A2VIGQ35RCS4UG`\r\n- 🇸🇦 Amazon.sa (Saudi Arabia) - `A17E79C6D8DWNP`\r\n- 🇮🇳 Amazon.in (India) - `A21TJRUUN4KGV`\r\n\r\n## Rate Limiting\r\n\r\nThis node implements Amazon's token bucket algorithm for rate limiting:\r\n\r\n- **Automatic Rate Detection**: Reads rate limits from API response headers\r\n- **Intelligent Queuing**: Queues requests when rate limits are exceeded\r\n- **Exponential Backoff**: Implements backoff strategies for optimal throughput\r\n- **Per-Endpoint Limits**: Different rate limits for different API operations\r\n\r\n## Error Handling\r\n\r\n### Automatic Retry Logic\r\n- **Network Errors**: Automatic retry with exponential backoff\r\n- **Rate Limiting (429)**: Intelligent waiting and retry\r\n- **Temporary Server Errors (5xx)**: Configurable retry attempts\r\n\r\n### Error Categories\r\n- **Authentication Errors (401/403)**: Clear guidance on credential issues\r\n- **Not Found Errors (404)**: Helpful context for missing resources\r\n- **Validation Errors (400)**: Detailed parameter validation feedback\r\n- **Rate Limit Errors (429)**: Actionable rate limiting guidance\r\n\r\n## Development\r\n\r\n### Building from Source\r\n```bash\r\ngit clone https://github.com/your-org/n8n-nodes-amazon-selling-partner.git\r\ncd n8n-nodes-amazon-selling-partner\r\nnpm install\r\nnpm run build\r\n```\r\n\r\n### Running Tests\r\n```bash\r\n# Run all tests\r\nnpm test\r\n\r\n# Run tests in Docker (as per project convention)\r\nnpm run test:docker\r\n\r\n# Run with coverage\r\nnpm test -- --coverage\r\n```\r\n\r\n### Linting and Formatting\r\n```bash\r\n# Lint code\r\nnpm run lint\r\n\r\n# Fix linting issues\r\nnpm run lintfix\r\n\r\n# Format code\r\nnpm run format\r\n```\r\n\r\n## Troubleshooting\r\n\r\n### Common Issues\r\n\r\n#### \"LWA authentication failed\"\r\n- Verify your LWA Client ID and Client Secret\r\n- Ensure your refresh token is valid and not expired\r\n- Check that your application has the correct roles assigned\r\n\r\n#### \"Request throttled by Amazon SP-API\"\r\n- Reduce request frequency\r\n- Implement delays between requests\r\n- Check your rate limits in the Amazon Developer Console\r\n\r\n#### \"Authentication failed (403)\"\r\n- Verify AWS credentials are correct\r\n- Ensure IAM user has SP-API permissions\r\n- Check that your application is approved for production (if using production)\r\n\r\n#### \"Date range cannot exceed 30 days\"\r\n- Amazon SP-API limits order queries to 30 days maximum\r\n- Split larger date ranges into smaller chunks\r\n\r\n### Debug Mode\r\nEnable debug logging by setting the environment variable:\r\n```bash\r\nexport DEBUG=n8n-amazon-sp-api:*\r\n```\r\n\r\n## Security Considerations\r\n\r\n### Credential Security\r\n- Never commit credentials to version control\r\n- Use environment variables for sensitive data\r\n- Regularly rotate AWS access keys\r\n- Monitor credential usage in AWS CloudTrail\r\n\r\n### Network Security\r\n- Use HTTPS endpoints only\r\n- Implement proper firewall rules\r\n- Monitor for suspicious API activity\r\n- Use AWS IAM roles when possible\r\n\r\n## Performance Optimization\r\n\r\n### Best Practices\r\n- Use appropriate date ranges (avoid very large ranges)\r\n- Implement pagination for large result sets\r\n- Cache frequently accessed data\r\n- Monitor rate limit usage\r\n\r\n### Monitoring\r\n- Track API response times\r\n- Monitor error rates\r\n- Set up alerts for rate limit breaches\r\n- Monitor credential expiration\r\n\r\n## Contributing\r\n\r\n1. Fork the repository\r\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\r\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\r\n4. Push to the branch (`git push origin feature/amazing-feature`)\r\n5. Open a Pull Request\r\n\r\n### Development Guidelines\r\n- Follow TypeScript best practices\r\n- Add tests for new features\r\n- Update documentation\r\n- Follow the existing code style\r\n- Ensure all tests pass\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n## Support\r\n\r\n- 📖 [Documentation](https://github.com/your-org/n8n-nodes-amazon-selling-partner/wiki)\r\n- 🐛 [Issue Tracker](https://github.com/your-org/n8n-nodes-amazon-selling-partner/issues)\r\n- 💬 [Discussions](https://github.com/your-org/n8n-nodes-amazon-selling-partner/discussions)\r\n- 📧 [Email Support](mailto:support@yourorg.com)\r\n\r\n## Acknowledgments\r\n\r\n- Amazon Selling Partner API team for comprehensive documentation\r\n- n8n community for the excellent node development framework\r\n- All contributors who help improve this project\r\n\r\n---\r\n\r\n**Note**: This is an unofficial community-maintained node. It is not affiliated with or endorsed by Amazon or n8n. ","readmeFilename":"README.md","_rev":"1-8b72cec1c18df4402a8f8313791b1d7e"}