List exchanges for an account - Dwolla Developer Portal
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
List exchanges for an account
GET
https://api.dwolla.com/exchanges
cURL
curl --request GET \
--url https://api.dwolla.com/exchanges \
--header 'Accept: <accept>' \
--header 'Authorization: Bearer <token>'
JavaScript (Fetch)
const options = {method: 'GET', headers: {Accept: '<accept>', Authorization: 'Bearer <token>'}};
fetch('https://api.dwolla.com/exchanges', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
Python (Requests)
import requests
url = "https://api.dwolla.com/exchanges"
headers = {
"Accept": "<accept>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)
PHP (cURL)
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dwolla.com/exchanges",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Ruby (Net::HTTP)
require 'uri'
require 'net/http'
url = URI("https://api.dwolla.com/exchanges")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = '<accept>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body
Response Codes
- 200
- 403
- 404
Example Responses
Successful Response
{
"_links": {},
"_embedded": {
"exchanges": [
{
"_links": {},
"id": "d3d6b41e-5567-4bc6-9c6e-0efd0a3e647e",
"status": "active",
"created": "2022-07-23T00:18:21.419Z"
}
]
},
"total": 3
}
Forbidden Response
{
"code": "Forbidden",
"message": "The supplied credentials are not authorized for this resource."
}
Not Found Response
{
"code": "NotFound",
"message": "The requested resource was not found."
}
Authorizations
Authorization
- Type: string
- Location: header
- Requirement: required
- Description: The access token received from the authorization server in the OAuth 2.0 flow.
Headers
Accept
- Type: enum
- Default:
application/vnd.dwolla.v1.hal+json - Requirement: required
- Description: The media type of the response. Must be
application/vnd.dwolla.v1.hal+json.
Response Formats
Responses should conform to the structures outlined in the example responses.