Secure Payments API – Export

General

Before you export, you should search Secure Payments.

How To

Search results can be exported to a report in comma-separated values (CSV) format. Simply specify export=true as a query parameter:

POST https://securepayments.loanpro.io/api/search/import?export=true

JSON payload:

{
"search": {
"size": 10,
"from": 0,
"aggregations": {
"services": {
"terms": {
"field": "service",
"size": 100
}
}
},
"sort": [
{
"created": "asc"
}
],
"query": {
"bool": {
"must": [
{
"bool": {
"should": {
"query_string": {
"query": "*",
"fields": [
"verify_key"
]
}
}
}
}
]
}
}
}
}

And the same payload as a cURL request:

curl -X POST --header 'Content-Type: application/json' --header
'Accept: application/json' --header 'secret: your-secret' --header
'authorization: your-token' -d '{"search": {"size": 10, "from": 0, "aggregations": {"services": { "terms": { "field": "service", "size": 100}}}, "sort": [{"created": "asc"}], "query": {"bool": {"must":[{"bool": {"should": {"query_string": {"query": "*","fields": ["verify_key"]}}}}]}}}} ' 'https://securepayments.loanpro.io/api/search/import?export=true'

If everything is done correctly, you should get a 200 response telling you that the report is in progress:

{
"result": "Report is being generated. You will receive an email when the export is complete."
}


How did we do?


Powered by HelpDocs (opens in a new tab)