Recurly Exports API
The exports API from Recurly — 3 operation(s) for exports.
The exports API from Recurly — 3 operation(s) for exports.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/recurly:recurly-exports-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Recurly V2 Exports API
description: '# Getting Started
Welcome to the reference documentation for Recurly''s XML API v2. Here you will find a complete
reference for all API v2 operations. If you''re building a new product, or just getting started with Recurly, we recommend
using our newer JSON API v3. Now let''s get started with API v2. # Authentication
##### API Authentication (HTTP Basic)
Recurly uses HTTP Basic Authentication—your Private API key is securely encrypted by the SSL channel. If you are testing the API calls via the command line with cURL, try:
```
curl -H ''Accept: application/xml'' \
-H ''X-Api-Version: 2.29'' \
-H ''Content-Type: application/xml; charset=utf-8'' \
-u ''[apikey]'' \
https://[subdomain].recurly.com/v2/accounts
```
Replace `[apikey]` and `[subdomain]` with the appropriate values for your site. ##### Calculating your own authorization header
Most programming languages encode the authorization header automatically. With HTTP Basic Authentication, the `Authorization` header is a string containing a Base-64 encoded username and password. In the case of Recurly''s API, you need only specify the username as your API key. If your library requires a password, set it to an empty string. ```
"Authorization": "Basic " + base64_encode(API Key)
```
##### Additional Request Headers
**Accept Header**
Recurly API v2 returns results as XML. Your requests should always include the header requesting the results as XML:
```
Accept: application/xml
```
**Content-Type Header**
When sending data to Recurly in a POST or PUT request, your request must specify the content type of your request:
```
Content-Type: application/xml; charset=utf-8
```
**X-Api-Version Header**
When sending data to Recurly, your request should specify the API version you''re attempting to interact with:
```
X-Api-Version: 2.29
```
You learn more about the different versions in the API Versioning section. ##### Public API Key
Recurly uses two types of API keys: public and private. The Public API key is used by Recurly.js to identify its requests as belonging to your Recurly site. This key can be safely included in Javascript code. Recurly provides each site with one Public Key. The Public API Key can be regenerated on the API Credentials page. ##### Private API Keys
###### Treat your Private API Keys like passwords! The API key allows access to your site''s data. Do not include it in Javascript code exposed to browsers. Recurly supports the use of multiple Private API keys, which can be used to integrate third party services using unique, controlled credentials. **Limits & Pricing**
Merchants on the Starter or grandfathered Recurly plans or merchants in sandbox mode will be granted 5 private API keys. Merchants on Recurly''s Professional plan will be granted 10 private API keys. **Default Key**
Your default private API key should be used to integrate Recurly with your backend systems. There will be at least one key active at all times. **Additional Keys**
Additional private API keys should be used to connect your Recurly data to additional sources, like analytics software, accounting packages, or email tools. Recurly recommends clearly labeling the name of each key to identify the associated vendor. **Regenerating Private API Keys**
Your API key can be regenerated by clicking on the Regenerate button on the API credentials page. When you generate a private API key, you have two options:
1. Block the old key immediately. This is primarily recommended when the security of a key has been compromised. 2. Allow the old key access for 12 hours. This is primarily used when updating systems and a smooth transition between keys is needed. *If a private API key is changed, an email alert will be sent to your Recurly Site Technical Contact.*
**Read-Only Keys**
When creating a private key, you will have the option to set the key to “read-only”. This means the API key may make GET requests but cannot not PUT, POST or DELETE requests.'
version: '2.29'
servers:
- url: https://{subdomain}.{domain}/v2
variables:
subdomain:
description: Subdomain of your Recurly site.
default: my-super-successful-company
domain:
description: Domain of your Recurly site.
default: recurly.com
security:
- api_key: []
tags:
- name: Exports
x-displayName: Automated Exports
paths:
/export_dates:
get:
summary: List Export Dates
description: 'This endpoint returns a list of the dates for which there are exports are available. This provides you with historical information about what data is available.
Note: This endpoint requires some configuration. Refer to our docs for more information on configuring your site for Automated Exports.'
tags:
- Exports
operationId: listExportDates
parameters: []
responses:
'200':
description: ''
content:
application/xml:
example: "<export_dates type=\"array\">\n <export_date>\n <date>2016-08-01</date>\n <export_files href=\"https://your-subdomain.recurly.com/v2/export_dates/2016-08-01/export_files\"/>\n </export_date>\n</export_dates>"
'404':
description: ''
content:
application/xml:
example: "<error>\n <symbol>not_found</symbol>\n <description lang=\"en-US\">404 Resource Not Found</description>\n</error>"
x-codeSamples:
- lang: PHP
source: "<?php\nforeach (Recurly_ExportDateList::get() as $date) {\n print(\"{$date->date}\\n\");\n}"
- lang: Python
source: "for export_date in recurly.ExportDate.all():\n print 'Export Date: %s' % export_date"
/export_dates/{date}/export_files:
get:
summary: List Date's Export Files
description: 'Returns a list of the specific exports available for the date specified. This provides you with historical information about what data is available.
Note: This endpoint requires some configuration. Refer to our docs for more information on configuring your site for Automated Exports.'
tags:
- Exports
operationId: listDatesExportFiles
parameters:
- in: path
name: date
schema:
type: string
format: date
default: ''
required: true
description: The date the export file was generated in YYYY-MM-DD format.
responses:
'200':
description: ''
content:
application/xml:
example: "<export_files href=\"https://your-subdomain.recurly.com/v2/export_dates/2016-08-01/export_files\">\n <export_file href=\"https://https://your-subdomain.recurly.com/v2/export_dates/2016-08-01/export_files/revenue_schedules_full.csv\">\n <name>revenue_schedules_full.csv</name>\n <md5sum>9aa55980167ae522b27410edcd5303b0</md5sum>\n </export_file>\n</export_files>"
'404':
description: ''
content:
application/xml:
example: "<error>\n <symbol>not_found</symbol>\n <description lang=\"en-US\">404 Resource Not Found</description>\n</error>"
x-codeSamples:
- lang: PHP
source: "<?php\nforeach (Recurly_ExportFileList::get('2016-08-01') as $file) {\n print(\"\\t{$file->md5sum}\\t{$file->name}\\t{$file->getHref()}\\n\");\n}"
- lang: Python
source: "for export_file in recurly.ExportDate().files(\"2016-08-01\"):\n print(\"Export file: %s\" % export_file)"
/export_dates/{date}/export_files/{file_name}:
get:
summary: Get Export File URL
description: 'This endpoints returns a temporary URL where you can download the requested export file for the indicated date.
Note: This endpoint requires some configuration. Refer to our docs for more information on configuring your site for Automated Exports.
###### Automated Exports
This feature must first be configured for your site via the admin console before exports are available for download via this endpoint. More information about how to set up this feature is available in the product documentation - Automated Exports
* If the nightly data is not yet fully available for download, the endpoint will return a 404.
* If you are unsure of what data is available for download, this information is available via the List Exports dates (export_dates) and List Dates''s exports (export_files) endpoints.
* The secure URL returned from this endpoint will be active for 60 minutes. After this time, a new authentication request must be sent.
* The secure URL returned from this endpoint will provide access to the requested individual export for the requested date.'
tags:
- Exports
operationId: downloadExportFile
parameters:
- in: path
name: date
schema:
type: string
format: date
default: ''
required: true
description: The date the export file was generated.
- in: path
name: file_name
schema:
type: string
default: ''
required: true
description: The name of the export file.
responses:
'200':
description: ''
content:
application/xml:
example: "<export_file href=\"https://your-subdomain.recurly.com/v2/export_dates/2016-08-01/export_files/revenue_schedules_full.csv\">\n <expires_at type=\"datetime\">2016-08-19T18:32:06Z</expires_at>\n <download_url>https://recurly-download-url.com/freightliner/1234567890/dates/2016-09-27/download_file.csv.gz?AWSAccessKeyId=KEY&Expires=1471631526&Signature=ttIDgi25oQLHo7jrj%2BU83GzipIQ%3D</download_url>\n</export_file>"
'404':
description: ''
content:
application/xml:
example: "<error>\n <symbol>not_found</symbol>\n <description lang=\"en-US\">404 Resource Not Found</description>\n</error>"
x-codeSamples:
- lang: PHP
source: '<?php
// Get the file
$file = Recurly_ExportFile::get(''2016-08-01'', ''revenue_schedules_full.csv'');
// And then you can save it locally
$fp = fopen("./revenue_schedules_full.csv", ''w'');
$file->download($fp);
fclose($fp);'
- lang: Python
source: 'export_date_files = recurly.ExportDate().files("2016-08-01")
url = export_date_files[0].download_information().download_url
# Download your data somehow with the URL
print(url)'
components:
securitySchemes:
api_key:
type: http
description: Enter the API key as the username and set the password to an empty string. You can locate and manage your API keys from the [API Credentials](https://app.recurly.com/go/developer/api_keys) page.
scheme: basic