GoCardlessDeveloper Docs
Create a sandbox account

Export

View as Markdown

File-based exports of data

Get a single export#

GET/exports/{export_id}

Returns a single export.

Path Parameters

NameTypeDescription
export_idrequiredstring

The export id

GET https://api.gocardless.com/exports/EX123 HTTP/1.1
@client.exports.get("EX123")
client.exports.get("EX123")
const exportData = await client.exports.find("EX123");
$client->exports()->get('EX123');
Export export = client.exports().get("EX123").execute();
export, err := client.Exports.Get(ctx, "EX123")
var exportResponse = await client.Exports.GetAsync("EX123");
GoCardless.Resources.Export export = exportResponse.Export;
Responsehttp
HTTP/1.1 200 OK
Content-Type: application/json
{
  "exports": {
    "id": "EX123",
    "created_at": "2014-01-01T12:00:00.000Z",
    "export_type": "payout_transactions_reconciliation",
    "download_url": "https://downloads.gocardless.com/EX123/example.csv",
    "currency": "GBP",
    "error_message": null
  }
}
Response 200

Successful response

exportsobject
6 properties
idstring

Unique identifier, beginning with "EX".

created_atstring

Fixed timestamp, recording when this resource was created.

export_typestring

The type of the export

payments_indexevents_indexrefunds_indexpayouts_indexcustomers_indexsubscriptions_indexpayment_eventssubscription_eventspayout_eventsrefund_eventsmandate_eventspayout_events_breakdownpayout_events_reconciliationpayout_transactions_breakdownpayout_transactions_reconciliationauthorisation_requestscustomer_bank_accountsusersorganisation_authorisationsgc_invalid_authorisation_requestspartner_feespayments_import_templatepayment_account_statementoutbound_payments_index
download_urlstring

Download url for the export file. Subject to expiry.

currencystring

The currency of the export (if applicable)

error_messagestring

Error message if the export encountered an error during processing.

Errors 400401404422500
400

Bad Request

401

Unauthorised

404

Not found

422

Validation Error

500

Internal Error

Error Body
codeinteger
documentation_urlstring
errorsarray
2 properties
reasonstring
messagestring
messagestring
request_idstring
typestring
metadataobject
linksobject

List exports#

GET/exports

Returns a list of exports which are available for download.

GET https://api.gocardless.com/exports HTTP/1.1
@client.exports.list
client.exports.list().records
const exports = await client.exports.list();
$client->exports()->list();
for (Export export : client.exports().all().execute()) {
  System.out.println(export.getId());
}
exportListParams := gocardless.ExportListParams{}
exportListResult, err :=  client.Exports.List(ctx, exportListParams)
for _, export := range exportListResult.Exports {
    fmt.Println(export.Id)
}
var exportListResponse = client.Exports.All();
foreach (GoCardless.Resources.Export export in exportListResponse)
{
    Console.WriteLine(export.Id);
}
Responsehttp
HTTP/1.1 200 OK
Content-Type: application/json
{
"exports": [
    {
        "id": "EX123",
        "created_at": "2014-01-01T12:00:00.000Z",
        "export_type": "payout_transactions_reconciliation",
        "currency": "GBP"
    },
    {
        "id": "EX456",
        "created_at": "2014-01-01T12:00:00.000Z",
        "export_type": "payout_transactions_reconciliation",
        "currency": "EUR"
    }
  ]
}
Response 200

Successful response

exportsarray
4 properties
idstring

Unique identifier, beginning with "EX".

export_typestring

The type of the export

payments_indexevents_indexrefunds_indexpayouts_indexcustomers_indexsubscriptions_indexpayment_eventssubscription_eventspayout_eventsrefund_eventsmandate_eventspayout_events_breakdownpayout_events_reconciliationpayout_transactions_breakdownpayout_transactions_reconciliationauthorisation_requestscustomer_bank_accountsusersorganisation_authorisationsgc_invalid_authorisation_requestspartner_feespayments_import_templatepayment_account_statementoutbound_payments_index
currencystring

The currency of the export (if applicable)

created_atstring

Fixed timestamp, recording when this resource was created.

metaobject
2 properties
limitinteger
cursorsobject
2 properties
beforestring

Cursor pointing to the end of the desired set.

afterstring

Cursor pointing to the start of the desired set.

Errors 400401404422500
400

Bad Request

401

Unauthorised

404

Not found

422

Validation Error

500

Internal Error

Error Body
codeinteger
documentation_urlstring
errorsarray
2 properties
reasonstring
messagestring
messagestring
request_idstring
typestring
metadataobject
linksobject