@@ -53,6 +53,41 @@ amazonMws.setApiKey(accessKey, accessSecret);
5353- Contributors can send their Pull Request to ` development ` branch.
5454- Kindly validate test cases & linting before opening new PR.
5555
56+ #### Success or Error StatusCode can be obtained directly using StatusCode property of response. It will give you same as what Amazon MWS provides.
57+ #### It is also sample of the error responses.
58+ ```
59+ {
60+ Type:'Sender',
61+ Code:'InvalidRequestException',
62+ Message:'Invalid xxxxx: ',
63+ Headers: {
64+ 'x-mws-quota-max': '',
65+ 'x-mws-quota-remaining': '',
66+ 'x-mws-quota-resetson': '',
67+ 'x-mws-timestamp': '2018-09-05T06:13:00.276Z',
68+ 'content-type': 'text/xml',
69+ 'content-charset': '',
70+ 'content-length': '',
71+ 'content-md5': '',
72+ 'date': ''
73+ },
74+ StatusCode:400,
75+ RequestId: 'XXXXX-XXXXXX-XXXXX'
76+ }
77+ ```
78+
79+ #### Additionally all api returns Throttling: Limits to how often you can submit requests
80+ Reference : http://docs.developer.amazonservices.com/en_CA/dev_guide/DG_Throttling.html
81+ ``` json
82+ {
83+ "x-mws-quota-max" : " 60.0" ,
84+ "x-mws-quota-remaining" : " 38.0" ,
85+ "x-mws-quota-resetson" : " 2017-12-08T08:21:00.000Z" ,
86+ "x-mws-timestamp" : " 2017-12-08T07:52:15.567Z"
87+ }
88+ ```
89+ Originally by [ Bhushankumar Lilapara] ( https://github.com/bhushankumarl ) (bhushankumar.lilapara@gmail.com ).
90+
5691### Feeds
5792
5893#### Submit Feed
@@ -300,7 +335,6 @@ amazonMws.setApiKey(accessKey, accessSecret);
300335 });
301336```
302337
303-
304338### Orders
305339
306340#### List Orders
@@ -432,15 +466,16 @@ amazonMws.setApiKey(accessKey, accessSecret);
432466 });
433467```
434468
435- ### Sellers
469+ ### Recommendations
436470
437- #### List Marketplace Participations
471+ #### Get Last Updated Time For Recommendations
438472``` js
439- amazonMws .sellers . search ({
440- ' Version' : ' 2011-07 -01' ,
441- ' Action' : ' ListMarketplaceParticipations ' ,
473+ amazonMws .recommendations . searchFor ({
474+ ' Version' : ' 2013-04 -01' ,
475+ ' Action' : ' GetLastUpdatedTimeForRecommendations ' ,
442476 ' SellerId' : ' SELLER_ID' ,
443- ' MWSAuthToken' : ' MWS_AUTH_TOKEN'
477+ ' MWSAuthToken' : ' MWS_AUTH_TOKEN' ,
478+ ' MarketplaceId' : ' MARKET_PLACE_ID'
444479 }, function (error , response ) {
445480 if (error) {
446481 console .log (' error ' , error);
@@ -450,14 +485,17 @@ amazonMws.setApiKey(accessKey, accessSecret);
450485 });
451486```
452487
453- #### List Marketplace Participations By Next Token
488+ #### List Recommendations
454489``` js
455- amazonMws .sellers . search ({
456- ' Version' : ' 2011-07 -01' ,
457- ' Action' : ' ListMarketplaceParticipationsByNextToken ' ,
490+ amazonMws .recommendations . searchFor ({
491+ ' Version' : ' 2013-04 -01' ,
492+ ' Action' : ' ListRecommendations ' ,
458493 ' SellerId' : ' SELLER_ID' ,
459494 ' MWSAuthToken' : ' MWS_AUTH_TOKEN' ,
460- ' NextToken' : ' NEXT_TOKEN'
495+ ' MarketplaceId' : ' MARKET_PLACE_ID' ,
496+ ' CategoryQueryList.CategoryQuery.1.FilterOptions.FilterOption.1' : ' QualitySet=Defect' ,
497+ ' CategoryQueryList.CategoryQuery.1.FilterOptions.FilterOption.2' : ' ListingStatus=Active' ,
498+ ' CategoryQueryList.CategoryQuery.1.RecommendationCategory' : ' ListingQuality'
461499 }, function (error , response ) {
462500 if (error) {
463501 console .log (' error ' , error);
@@ -555,37 +593,99 @@ amazonMws.setApiKey(accessKey, accessSecret);
555593 }
556594```
557595
558- #### Success or Error StatusCode can be obtained directly using StatusCode property of response. It will give you same as what Amazon MWS provides.
559- #### It is also sample of the error responses.
596+ ### Sellers
597+
598+ #### List Marketplace Participations
599+ ``` js
600+ amazonMws .sellers .search ({
601+ ' Version' : ' 2011-07-01' ,
602+ ' Action' : ' ListMarketplaceParticipations' ,
603+ ' SellerId' : ' SELLER_ID' ,
604+ ' MWSAuthToken' : ' MWS_AUTH_TOKEN'
605+ }, function (error , response ) {
606+ if (error) {
607+ console .log (' error ' , error);
608+ return ;
609+ }
610+ console .log (' response' , response);
611+ });
560612```
561- {
562- Type:'Sender',
563- Code:'InvalidRequestException',
564- Message:'Invalid xxxxx: ',
565- Headers: {
566- 'x-mws-quota-max': '',
567- 'x-mws-quota-remaining': '',
568- 'x-mws-quota-resetson': '',
569- 'x-mws-timestamp': '2018-09-05T06:13:00.276Z',
570- 'content-type': 'text/xml',
571- 'content-charset': '',
572- 'content-length': '',
573- 'content-md5': '',
574- 'date': ''
575- },
576- StatusCode:400,
577- RequestId: 'XXXXX-XXXXXX-XXXXX'
578- }
613+
614+ #### List Marketplace Participations By Next Token
615+ ``` js
616+ amazonMws .sellers .search ({
617+ ' Version' : ' 2011-07-01' ,
618+ ' Action' : ' ListMarketplaceParticipationsByNextToken' ,
619+ ' SellerId' : ' SELLER_ID' ,
620+ ' MWSAuthToken' : ' MWS_AUTH_TOKEN' ,
621+ ' NextToken' : ' NEXT_TOKEN'
622+ }, function (error , response ) {
623+ if (error) {
624+ console .log (' error ' , error);
625+ return ;
626+ }
627+ console .log (' response' , response);
628+ });
579629```
580630
581- #### Additionally all api returns Throttling: Limits to how often you can submit requests
582- Reference : http://docs.developer.amazonservices.com/en_CA/dev_guide/DG_Throttling.html
583- ``` json
584- {
585- "x-mws-quota-max" : " 60.0" ,
586- "x-mws-quota-remaining" : " 38.0" ,
587- "x-mws-quota-resetson" : " 2017-12-08T08:21:00.000Z" ,
588- "x-mws-timestamp" : " 2017-12-08T07:52:15.567Z"
589- }
631+ ### Subscriptions
632+
633+ #### Create Subscription
634+ ``` js
635+ amazonMws .subscriptions .create ({
636+ ' Version' : ' 2013-07-01' ,
637+ ' Action' : ' CreateSubscription' ,
638+ ' SellerId' : ' SELLER_ID' ,
639+ ' MWSAuthToken' : ' MWS_AUTH_TOKEN' ,
640+ ' MarketplaceId' : ' MARKET_PLACE_ID' ,
641+ ' Subscription.Destination.AttributeList.member.1.Key' : ' DESTINATION_KEY' ,
642+ ' Subscription.Destination.AttributeList.member.1.Value' : ' DESTINATION_VALUE' ,
643+ ' Subscription.Destination.DeliveryChannel' : ' DESTINATION_CHANNEL' ,
644+ ' Subscription.IsEnabled' : ' true' ,
645+ ' Subscription.NotificationType' : ' AnyOfferChanged'
646+ }, function (error , response ) {
647+ if (error) {
648+ console .log (' error ' , error);
649+ return ;
650+ }
651+ console .log (' response' , response);
652+ });
590653```
591- Originally by [ Bhushankumar Lilapara] ( https://github.com/bhushankumarl ) (bhushankumar.lilapara@gmail.com ).
654+
655+ #### Delete Subscription
656+ ``` js
657+ amazonMws .subscriptions .remove ({
658+ ' Version' : ' 2013-07-01' ,
659+ ' Action' : ' DeleteSubscription' ,
660+ ' SellerId' : ' SELLER_ID' ,
661+ ' MWSAuthToken' : ' MWS_AUTH_TOKEN' ,
662+ ' MarketplaceId' : ' MARKET_PLACE_ID' ,
663+ ' Destination.AttributeList.member.1.Key' : ' DESTINATION_KEY' ,
664+ ' Destination.AttributeList.member.1.Value' : ' DESTINATION_VALUE' ,
665+ ' Destination.DeliveryChannel' : ' DESTINATION_CHANNEL' ,
666+ ' NotificationType' : ' AnyOfferChanged'
667+ }, function (error , response ) {
668+ if (error) {
669+ console .log (' error ' , error);
670+ return ;
671+ }
672+ console .log (' response' , response);
673+ });
674+ ```
675+
676+ #### List Subscription
677+ ``` js
678+ amazonMws .subscriptions .searchFor ({
679+ ' Version' : ' 2013-07-01' ,
680+ ' Action' : ' ListSubscriptions' ,
681+ ' SellerId' : ' SELLER_ID' ,
682+ ' MWSAuthToken' : ' MWS_AUTH_TOKEN' ,
683+ ' MarketplaceId' : ' MARKET_PLACE_ID'
684+ }, function (error , response ) {
685+ if (error) {
686+ console .log (' error ' , error);
687+ return ;
688+ }
689+ console .log (' response' , response);
690+ });
691+ ```
0 commit comments