Export a settlement as CSV
GET
/api/v1/settlements/{id}/export
const url = 'https://example.com/api/v1/settlements/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/export';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1/settlements/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/export \ --header 'Authorization: Bearer <token>'Generates and streams a CSV export of the settlement’s commission amounts, including commission IDs, amounts, attribution IDs and attribution dates. Available for any settlement regardless of status.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string format: uuid
ID of the settlement to export
Responses
Section titled “ Responses ”CSV export of the settlement
Media type text/csv
string format: binary
Headers
Section titled “Headers ” Content-Disposition
string
Example
attachment; filename="settlement-<id>.csv"Suggested filename for the downloaded file
Unauthorized
Media type application/json
object
error_code
required
string
message
required
string
Example
{ "error_code": "UNAUTHORIZED", "message": "Authentication credentials were not provided or are invalid."}Settlement not found
Media type application/json
object
error_code
required
string
message
required
string
Example
{ "error_code": "UNAUTHORIZED", "message": "Authentication credentials were not provided or are invalid."}Internal server error
Media type application/json
object
error_code
required
string
message
required
string
Example
{ "error_code": "UNAUTHORIZED", "message": "Authentication credentials were not provided or are invalid."}