Scheduling & downloading Reports via the API

With the Repricer API you pre-schedule your reports to generate so they are ready for you when you need them. Once scheduled, Repricer will continue to generate a new file on the scheduled frequency until you turn off the report schedule.

📘

Every time a new Report is generated, it will overwrite the previous report.

Scheduling and downloading reports is a multistep process which I'll take you through below.

Scheduling a Report

The first step is to create a Report Schedule. You can do this with the Schedule Report call. Once the schedule has been created, you can remove the schedule using the same call.

The parameters for this call include,

  • reportType - Find a list of available Reports here.
  • channelName - This is the name of the Channel, set by you, on Repricer as a string (optional)
  • Schedule - This is how often you want your Report to be generated. Find a list of available options here.

❗️

Warning

Call parameter names and values are case sensitive.

Once you have submitted your request, your report will be generated periodically for you and you can make additional API calls to collect it. You can export a response such as the one below,

{
    "meta": [],
    "code": 200,
    "object": "report",
    "data": {
        "schedule": "__8_HOURS__",
        "scheduleDate": "2024-01-09T22:02:45+0000",
        "reportType": "__INVENTORY__"
    },
    "time": 1704808965
}

Collecting your Inventory Report ID

When you're report has been generated you can now collect it. We will use the List Reports call to bring up the most recent completed report for each Report Type. You will be able to see the time it was requested (In GMT). Example response below

{
    "meta": [],
    "code": 200,
    "object": "report",
    "data": [
        {
            "reportId": "X19JTlZFTlRPUllfX3wxNjE3",
            "reportType": "__INVENTORY__",
            "reportRequestId": "X19JTlZFTlRPUllfX3w2NGI4MDQ4NDNjMDZiNS4xMjUyMTM5Mw==",
            "availableDate": "2023-07-19T15:43:00+0000"
        }
    ],
    "time": 1689782468

The call will return the Report ID which you should save as you will need it for the final step.

Downloading your report

The final part of the process is to download your newly generated report. To download your report take the Report ID from your previous call and add it to the Download Report call. For example,

This final call will fetch the requested report for you.