Skip to main content

Get account balance by id

GET /api/v1/Accounts/:id/balance

Description

This endpoint retrieves the balance of an account by its ID.

Request

Headers:

  • Accept-Language: Change default response message language from English(en). Available languages fr,en

Path Parameters:

  • id: The ID of the account.
  • version: The version of the API.

URL: -/api/v{version}/Accounts/{id}/balance

Response:

  • 200: Success, returns the account balance.
  • 400: Bad Request, the request is not valid.
  • 404: Not Found, the account does not exist.

Error Codes:

  • 400: Bad Request, the request is not valid.
  • 404: Not Found, the specified account does not exist.
  • 500: Internal server error, something went wrong while processing the request.

Example Response:

jsonCopy codeHTTP/1.1 200 OK
{
"id": "123",
"balance": 1000.00,
"currency": "USD",
"createdAt": "2024-02-16T12:00:00Z",
"updatedAt": "2024-02-17T12:00:00Z"
}

Notes:

  • This endpoint is useful for retrieving the balance of an account by its ID.
  • The response includes the account's balance, currency, and creation/update timestamps.
  • If the specified account does not exist, a 404 Not Found response will be returned.
  • The Accept-Language header can be used to change the default response message language. Currently supported languages are English (en) and French (fr).

Headers

Content-typeValue
Accept-LanguageChange default response message language from English(en). Available languages fr,en
Content-typeValue
Accepttext/plain
Path variablesValue
id<string> (required)

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request GET \ 
--url /api/v1/Accounts/:id/balance \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!