CSV API Data Endpoint

CSV API Data Endpoint

It is possible to generate CSV reports programmatically using our CSV API endpoint.
This article assumes that you have already created an OAuth Client User with the "order-it.reporting" permission enabled.
This article assumes that you have already generated an OAuth access token with "scope=order-it.reporting".
Below is an example of a sample token request:

curl "https://oauth.custom-gateway.net/token" -d"client_id=***REDACTED***&client_secret=***REDACTED***&grant_type=client_credentials&scope=order-it.reporting" | jq .access_token -r 

The CSV reporting endpoint is located at:
  1. https://oms.custom-gateway.net/v2/apis/misc/csv-reporting/:type/?period=:period
where :type and :period should be replaced depending on your requirements as per the following table.
Placeholder
Value
Description
:type
order-details


order-summary

:period
last-day


last-week


last-month


last-year


this-month


current-month


previous-month


The endpoint should be called via a  GET request. It is necessary to include your OAuth access token using the Authorization header.

For example:
Where :accessToken should be replaced with your OAuth access token.