Skip to content

Download a settlement invoice

GET
/api/v1/settlements/{id}/invoice
curl --request GET \
--url https://example.com/api/v1/settlements/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/invoice \
--header 'Authorization: Bearer <token>'

Streams the generated settlement invoice file for the given settlement. The response body is a binary stream; use the Content-Disposition header to determine the suggested filename.

id
required
string format: uuid

ID of the settlement whose invoice to download

Invoice file stream

Media type application/octet-stream
string format: binary
Content-Disposition
string
Example
attachment; filename="invoice-<id>.pdf"

Suggested filename for the downloaded file

Unauthorized

Media type application/json
object
error_code
required
string
Allowed values: UNAUTHORIZED NOT_FOUND INTERNAL_ERROR BAD_REQUEST FORBIDDEN CONFLICT
message
required
string
Example
{
"error_code": "UNAUTHORIZED",
"message": "Authentication credentials were not provided or are invalid."
}

Settlement or invoice not found

Media type application/json
object
error_code
required
string
Allowed values: UNAUTHORIZED NOT_FOUND INTERNAL_ERROR BAD_REQUEST FORBIDDEN CONFLICT
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
Allowed values: UNAUTHORIZED NOT_FOUND INTERNAL_ERROR BAD_REQUEST FORBIDDEN CONFLICT
message
required
string
Example
{
"error_code": "UNAUTHORIZED",
"message": "Authentication credentials were not provided or are invalid."
}