5.10: Retrieve Current Credit Balance

The API will respond with your current credit balance, which is represented in Thai Baht (THB).

The balance value provided in the response should be divided by 100 to obtain the equivalent amount in THB.

5.10.1: Endpoint

To retrieve the current credit balance, you will use the following endpoint:

  • Endpoint: /api/v1/ext/balance
  • Method: GET

5.10.2: Request Parameters

In your API request, include the following parameter:

  • Authorization (Header): Use Basic Authentication with your API credentials.

5.10.3: Request Example

Here's an example of how to structure your API request to retrieve the current credit balance:

GET /api/v1/ext/balance
Host: ota-api.golfdigg.com
Authorization: Basic base64_encoded(apiKey)

5.10.4: Response Example

{
    "balance": 1525100
}

This means that your current credit balance is 15,251 THB (Thai Baht).

To get the balance in THB, simply divide the provided balance value by 100.