Amazon-MWS

 view release on metacpan or  search on metacpan

lib/Amazon/MWS.pm  view on Meta::CPAN

package Amazon::MWS;

=head1 NAME

Amazon::MWS - Perl interface to Amazon Marketplace Web Services

=head1 VERSION

0.150

=cut

our $VERSION = '0.150';

=head1 DESCRIPTION

See L<Amazon::MWS::Client> for the implementation of the low level
Amazon MWS API.

For the high level methods provided by the L<Amazon::MWS::Uploader>
you are going to need to supply database storage.

=head2 Uploading products

Basically you take the products which need to be uploaded to Amazon
and create L<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 L<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:

=over 4

=item product

Basic product data.

=item inventory

Product inventory count (required).

=item price

Product price (required).

=item image

Product images (required).

Please note that B<only http:// links> are allowed. If you pass https://
links, they will be rejected by Amazon.

=item variants

Product variants (optional).

=back

You are not by any means finished with the upload, see L</Resume uploads>.

=head2 Delete products

Deleting products is much more straightforward, but you have still to



( run in 0.539 second using v1.01-cache-2.11-cpan-ceb78f64989 )