-
Notifications
You must be signed in to change notification settings - Fork 8
/
README
240 lines (148 loc) · 5.89 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
NAME
Amazon::MWS - Perl interface to Amazon Marketplace Web Services
VERSION
0.150
DESCRIPTION
See Amazon::MWS::Client for the implementation of the low level Amazon
MWS API.
For the high level methods provided by the Amazon::MWS::Uploader you
are going to need to supply database storage.
Uploading products
Basically you take the products which need to be uploaded to Amazon and
create Amazon::MWS::XML::Product objects from them:
use Amazon::MWS::XML::Product;
use Amazon::MWS::Uploader;
use Try::Tiny;
my @upload;
foreach my $product_object (@send_to_amazon) {
my %prod = ....
try {
my $product = Amazon::MWS::XML::Product->new(%prod);
push @upload, $product;
} catch {
warn "Failure with $prod{sku} : $_";
};
}
Now you create an Amazon::MWS::XML::Uploader object and do the actual
upload.
my $uploader = Amazon::MWS::XML::Uploader->new(...);
try {
$uploader->products(\@upload);
$uploader->upload;
} catch {
die "Uploader failure with: $_";
};
A product upload goes through the following steps:
product
Basic product data.
inventory
Product inventory count (required).
price
Product price (required).
image
Product images (required).
Please note that only http:// links are allowed. If you pass https://
links, they will be rejected by Amazon.
variants
Product variants (optional).
You are not by any means finished with the upload, see "Resume
uploads".
Delete products
Deleting products is much more straightforward, but you have still to
care of tracking the upload process, see again "Resume uploads".
my $uploader = Amazon::MWS::Uploader->new(...);
$uploader->delete_skus(@skus);
Resume uploads
This is necessary to check whether the upload has been processed by
Amazon.
my $uploader = Amazon::MWS::XML::Uploader->new(...);
$uploader->resume;
The uploader also goes automatically through the steps for the product
uploads.
MWS in practice
Product price
Every product uploaded needs a price of 0.01 or higher, otherwise you
get the following error:
0.00 price (standard or sales) will not be accepted.
Please ensure that every SKU in your feed has a price at least equal to or greater than 0.01
Shipping costs
You need to configure the shipping costs in Amazon Seller Central, you
can't pass them through MWS:
https://sellercentral.amazon.com/gp/shipping/dispatch.html
Stuck uploads
There is no guarantee that Amazon finishes your uploads at all. We had
uploads stuck for at least a week.
Multiple marketplaces
You can use this module and the uploader for multiple Amazon
marketplaces. Please make sure that you disable Amazon's
synchronisation between marketplaces.
For marketplaces with a different currency you need to convert your
price first.
The list of marketplaces can be found at:
http://docs.developer.amazonservices.com/en_US/dev_guide/DG_Endpoints.html
Throttling and Quota
With Amazon MWS you have to deal with Amazon throttling your uploads
and imposing quotas.
Possible reasons:
Upload too often
Stuck uploads
Orders with orderlines
Throttle Reponse
<?xml version="1.0"?>
<ErrorResponse xmlns="http://mws.amazonaws.com/doc/2009-01-01/">
<Error>
<Type></Type>
<Code>RequestThrottled</Code>
<Message>Request is throttled</Message>
</Error>
<RequestID>a7b39ee6-4f76-48ee-92f1-43bc54f693df</RequestID>
</ErrorResponse>
Quota Exceeded Error Response
<?xml version="1.0"?>
<ErrorResponse xmlns="http://mws.amazonaws.com/doc/2009-01-01/">
<Error>
<Type></Type>
<Code>QuotaExceeded</Code>
<Message>You exceeded your quota of 80.0 requests per 1 hour for operation Feeds/2009-01-01/GetFeedSubmissionList. Your quota will reset on Thu Dec 18 07:39:00 UTC 2014</Message>
</Error>
<RequestID>5115e00d-35a8-4589-8083-f0ef998f76ef</RequestID>
</ErrorResponse>
Upload Errors
Error 8572: Incorrect UPCs/EANs/...
error: You are using UPCs, EANs, ISBNs, ASINs, or JAN codes
that do not match the products you are trying to list. Using incorrect UPCs,
EANs, ISBNs, ASINs or JAN codes is prohibited and it can result in your ASIN
creation privileges being suspended or permanently removed.
This happened in our case with products having self assigned EAN codes,
but with a well known manufacturer. Apparently Amazon knows about the
EAN ranges for this manufacturer.
Error 18181
The format of the tracking number passed to Amazon was invalid, e.g.
wrong number of characters.
Error 20013: Image file size
error: Image file size: 13972730 bytes exceeds the the maximum allowed file size: 10485760 bytes.
There is no point in using such big image files for Amazon.
Error 99001: "brand_name"
Brand is a required field for products.
Uploader Module
Amazon::MWS::Uploader is an upload agent for Amazon::MWS.
XML Modules
Generic Feed
Amazon::MWS::XML::GenericFeed
Feed
Amazon::MWS::XML::Feed
Product
Amazon::MWS::XML::Product
Address
Amazon::MWS::XML::Address
Order
Amazon::MWS::XML::Order
OrderlineItem
Amazon::MWS::XML::OrderlineItem
ACKNOWLEDGEMENTS
James Risner (additional API methods).
AUTHORS
Paul Driver Phil Smith Marco Pessotto Stefan Hornburg (Racke)
COPYRIGHT
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.