Request
Endpoint: !getAccountBalance
https://secure.trust-provider.com/products/!getAccountBalance
Use the POST method for this endpoint.
Submit parameters in the x-www-form-urlencoded format.
Request parameters
The following table lists the required and optional parameters.
| Parameter | Requirement | Type | Max.Length | Description |
|---|---|---|---|---|
|
required |
string |
64 chars |
Your account username. This value is case sensitive. |
|
required |
string |
128 chars |
Your account password. This value is case sensitive. |
|
optional |
char |
1 chars |
Specifies the response format. The possible values are:
If omitted, the value defaults to |
Sample request
curl --location 'https://secure.trust-provider.com/products/!getAccountBalance' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'loginName=login_name' \
--data-urlencode 'loginPassword=login_password'
Response
The request is successful when the server returns a response with the status code 0.
Any errorCode less than 0 indicates an error condition.
|
The list of codes and their descriptions can be found in Error codes. |
The user can change the response format by adding the responseFormat parameter to the request.
Response parameters
The response may contain the following parameters:
| Parameter | Response Format | Description |
|---|---|---|
|
text/plain |
Returns a line-based response. Success:
Failure:
|
|
|
Returns a URL-encoded response containing named parameters. Success:
Failure:
|
|
|
Returns a JSON object containing named parameters. Success:
Failure:
|
Error codes
The following table outlines error responses returned by the getAccountBalance API endpoint.
Each error response consists of an errorCode and an errorMessage indicating why the request failed.
| Error Code | Error Message | Description |
|---|---|---|
|
|
The request must use HTTPS protocol. |
|
|
The required argument is missing from the request. |
|
|
The argument value does not meet validation requirements. |
|
|
An unknown error occurred. |
|
|
The user does not have permission for the requested content. |
|
|
The request method should be |
|
|
The API is only available for SCM accounts. |
|
|
The API call limit has been reached. |