Marketplace::Rakuten - Interface to http://webservice.rakuten.de/documentation
Version 0.04
The list of categories for the German marketplace can be downloaded from the http://api.rakuten.de/categories/csv/download.
When adding or editing a product, you can pass the rakuten_category_id to add_product or edit_product
rakuten_category_id
add_product
edit_product
use Marketplace::Rakuten; my $rakuten = Marketplace::Rakuten->new(key => 'xxxxxxx', endpoint => 'http://webservice.rakuten.de/merchants/' ); my $res = $rakuten->get_key_info;
The API key (required).
The URL of the endpoint. Default to http://webservice.rakuten.de/merchants/
If you need a specific api version, it could be something like http://webservice.rakuten.de/v2.05/merchants
The user-agent. Built lazily.
Generic method to do any call. The first argument is the HTTP request method (get or post). The second argument is the path of the api, e.g. (misc/getKeyInfo). The third is the structure to send (an hashref).
misc/getKeyInfo
Return a Marketplace::Rakuten::Response object.
The key is injected into the data hashref in any case.
http://webservice.rakuten.de/documentation/method/add_product
Mandatory params: name, price, description
name
price
description
Recommended: product_art_no (the sku)
product_art_no
Return hashref: product_id
product_id
http://webservice.rakuten.de/documentation/method/add_product_image
Mandatory params: product_art_no (the sku) or product_id (rakuten id).
Return hashref: image_id
image_id
http://webservice.rakuten.de/documentation/method/add_product_variant
Mandatory params: product_art_no (the sku) or product_id, price, color, label
color
label
Return hashref: variant_id
variant_id
Mandatory params: product_art_no (the sku) or product_id
Recommended: variant_1 Size variant_2 Color
variant_1
variant_2
You need to call this method before trying to upload variants. The data returned are however just a boolean (kind of) success.
http://webservice.rakuten.de/documentation/method/add_product_multi_variant
Mandatory params: product_art_no (the sku) or product_id, variation1_type, variation1_value, price
variation1_type
variation1_value
Recommended: variant_art_no
variant_art_no
http://webservice.rakuten.de/documentation/method/add_product_link
Mandatory params: product_art_no (the sku) or product_id, name (100 chars), url (255 chars)
url
Return hashref: link_id
link_id
http://webservice.rakuten.de/documentation/method/add_product_attribute
Mandatory params: product_art_no (the sku) or product_id, title (50 chars), value
title
value
Return hashref: attribute_id
attribute_id
The following methods require and id passed (sku or id) and work the same as for product adding, but no argument is mandatory.
They all return just a structure with a boolean success (-1 is failure, 1 is success).
Requires product_id or product_art_no
Requires variant_id or variant_art_no
Requires attribute_id, title, value
The following methods require just an id or sku. Return a boolean success.
Requires image_id (returned by add_product_image).
Requires link_id (returned by add_product_link).
Requires attribute_id (returned by add_product_attribute).
No argument is required, but you probably want to pass something like
{ status => pending }
See http://webservice.rakuten.de/documentation/method/get_orders for the full list of options.
List of statuses:
This is what you want to get for importing.
Order is paid. Unclear when the status switches to this one.
The response is paginated and from here you get only the raw data.
Use get_parsed_orders to get the full list of objects.
The hashref with the parameters is the same of get_orders (which get called). This method takes care of the pagination and return a list of Marketplace::Rakuten::Order objects. You can access the raw structures with $object->order.
get_orders
Shortcut for $self->get_parsed_orders({ status => 'pending' });
Shortcut for $self->get_parsed_orders({ status => 'editable' });
Required parameter: order_no (the rakuten's order number).
Accepted parameters:
Required paramater: order_no (rakuten's order number)
order_no
Optional: comment
comment
Required paramater: order_no (rakuten's order number) and type (fully or partly):
type
fully
partly
http://webservice.rakuten.de/documentation/method/set_order_returned
Required parameter: name
http://webservice.rakuten.de/documentation/method/add_shop_category
Returned: shop_category_id
shop_category_id
Required parameter shop_category_id or external_shop_category_id
external_shop_category_id
http://webservice.rakuten.de/documentation/method/edit_shop_category
No mandatory parameter.
http://webservice.rakuten.de/documentation/method/get_shop_categories
http://webservice.rakuten.de/documentation/method/delete_shop_category
Required parameters: shop_category_id or external_shop_category_id, product_id or product_art_no (Rakuten's id or our sku).
http://webservice.rakuten.de/documentation/method/add_product_to_shop_category
Marco Pessotto, <melmothx at gmail.com>
<melmothx at gmail.com>
Please report any bugs or feature requests to bug-marketplace-rakuten at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Marketplace-Rakuten. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-marketplace-rakuten at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Marketplace::Rakuten
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Marketplace-Rakuten
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Marketplace-Rakuten
CPAN Ratings
http://cpanratings.perl.org/d/Marketplace-Rakuten
Search CPAN
http://search.cpan.org/dist/Marketplace-Rakuten/
Copyright 2015 Marco Pessotto.
This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at:
http://www.perlfoundation.org/artistic_license_2_0
Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license.
If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license.
This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder.
This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement, then this Artistic License to you shall terminate on the date that such litigation is filed.
Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
To install Marketplace::Rakuten, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Marketplace::Rakuten
CPAN shell
perl -MCPAN -e shell install Marketplace::Rakuten
For more information on module installation, please visit the detailed CPAN module installation guide.