Introduction
You can run any of your Rakuten Advertising reports, both standard and customized, via the Reporting API. This allows you to run reports without logging in to your account.
Instructions
Follow these steps to get the API URL for your reports:
- Access the Reporting Interface.
- Select a standard report from the Choose Reports drop-down menu or build your own.
- Select date range parameters.
- If you wish, customize the report by applying any filters or adding or removing any columns of metrics and data points and click Save Report.
- Click the arrow next to View Report and select Get API:
- A Get API URL pop-up appears. It displays a URL that includes your web token. Copy the API URL and save it to a secure location.
Caution
Your API URL features a token that allows access your reporting data without logging in to your account. It should be kept as securely as you would keep your username and password. See the API URL section below for more information on the token parameter.
Application
You can paste the API URL into any browser at any time to generate your report without needing to access the Reporting Interface. The CSV file with your report data will download to your computer. CSV files can be opened in Excel.
API URL
You can modify existing API parameters you are currently using or build new reporting API URLs without returning to the Reporting Interface. This is an example API URL:
https://ran-reporting.rakutenmarketing.com/en/reports/revenue-report-by-day/filters?start_date=20XX-10-25&end_date=20XX-10-26&include_summary=Y&network=1&previous-start-date=20XX-09-25& previous-end-date=20XX-09-26&tz=GMT&date_type=process&date_format=m-d-yy&token=xxxxxxx
Everything in green above can be edited. Click the + next to each parameter name for more information:
Description: The start date for the first date range for your report data. Formatted YYYY-MM-DD.
Description: The end date for the first date range for your report date. Formatted YYYY-MM-DD.
Description: Set this to Y if you want the six-row report summary at the top of the file you download. Set this to N if you do not. The default is Y.
Description: Use this filter to display data for one network at a time, so multiple currencies do not appear in the same report.
- US=1
- UK=3
- CA=5
- BR=8
- AU=41
- FR=7
- DE=9
- JP=11
Description: The start date for the second range for your report data. Formatted YYYY-MM-DD.
Description: The end date for the second date range for your report data. Formatted YYYY-MM-DD.
Description: This is the time zone that the report uses. GMT is the default time zone. Users can change the time zone when selecting dates and see it reflected in the API.
Description: The date type. Use process for Process Date and transaction for Transaction Date.
Description: This is an optional parameter with default values. Use one of the below fields to format the dates in the report. If not specified, we will set default values for all networks to be m/d/yy for non-Japanese networks and yyyy/mm/dd for the Japan network. The values allowed in this parameter are:
- m/d/YY
- YYYY/mm/dd
- mm/dd/YY
- dd/mm/YY
- dd/mm/YYYY
- m-d-yy
- YYYY-mm-dd
- mm-dd-YY
- dd-mm-YY
- dd-mm-YYYY
Description: This token ensures the security of your data. It is derived from your security token. Keep the token safe. Do not modify this value. If you want to update your token, you can do so in the Publisher Dashboard.
Preset Date Ranges
We support both preset date ranges and exact date ranges as specified in the start_date and end_date values.
This reduces the need for additional logic to generate the dates for the APIs. The Reporting Interface will set the API URL to use the preset date range when you choose a preset date range from the date range drop-down menu.
Preset Date Range | Current period values for date_range parameter |
---|---|
Yesterday | yesterday |
Last 7 Days | last-7-days |
This Month | this-month |
Last Month | last-month |
This Quarter | this-quarter |
Last Quarter | last-quarter |
This Year | this-year |
Last Year | last-year |
When comparing to another period, these are the previous_date_range values:
Date Range | Date Range Values |
---|---|
Previous Week | previous-week |
Previous Month | previous-month |
Previous Quarter | previous-quarter |
Previous Year | previous-year |
The interface will generate an API URL with specific dates if you choose Custom Date Range from the date picker. For example, if you selected a Custom Date Range with April 22, 20XX as the start date and May 5, 20XX as the end date, this is what your API URL will look like:
/filters?start_date=20XX-04-22&end_date=20XX-05-05
The selected time zone offset will be applied to your report. Dates and Times will reflect the time zone for the Transaction Date, Transaction Time, Process Date, and Process Time columns only.
A report without these columns, like the Sales and Activity Report, will have the time zone offset applied. Reports that do include these columns, like the Individual Item Report, will also have the time zone offset applied as seen in the converted Transaction Date and Time.
However, the time zone conversion is not done for the following Date and Time columns:
- Booking Consumed Date
- Click Date
- Order Ship Date
- Signature Match Date
- Signature Match Time
- Transaction Created On Date
- Transaction Created On Time
Date Format Parameter
This is an optional parameter with default values. You can input the date_format parameter values encoded or not encoded into the Get API URL.
Attention
Depending on your locale settings, your Excel or other file applications might not support or may override our date format parameter in certain date formats. You may have to adjust your applications to support our date format parameter.
API Limit
Requests using the Reporting APIs are limited to one concurrent call at any given time. If we receive more than one request running concurrently, you will receive an error on all further requests until one or more of their existing requests are complete. The error will be an HTTP 429 response with the message You have exceeded your request limits for this session please try again later.
If you are using scripted calls, ensure that you are not making more than one simultaneous call, such as in a threaded loop. If you are executing unlimited API calls, put either a pause or a limit on calls in your code.
API Errors
As your run your reports via API, you may receive an error code or message. View examples of possible API errors and instructions for how to address them. For additional assistance with API errors, contact Customer Support.
Comments
Please sign in to leave a comment.