Credit Resource - List
Purpose
Retrieve a list of Credits which your API Credentials have access to. This JSON response includes Credit data and a count of the number of Utilizations attached to it (in case you need to run a subsequent request to get Utilizations Resources.
Request - Credits List
Endpoint
/credits
Authentication
Include your API Key within the x-api-key
header as described here.
Parameters
The following table lists the parameters that this query supports. All of the parameters listed are query parameters.
Parameter | Type | Definition |
---|---|---|
page | int | The page number of the results you want (set to 1, if not provided) |
Request Body
Do not provide a request body when calling this method.
Response - Credits List
If successful, this method returns a response body with the following structure:
Response Body
{
"code":200,
"success":1,
"data": [
Credits Resources listed here... (See "Credits Overview" page)
]
"errors": []
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "[path_to_endpoint]",
"per_page": 50,
"to": 10,
"total": 10
},
"links": {
"first": "[path_to_endpoint]?page=1",
"last": "[path_to_endpoint]?page=1",
"prev": null,
"next": null
}
}
Properties
The following table defines the properties that appear in this resource:
Key | Type | Definition |
---|---|---|
code | integer | HTTP Status Code (ie; 200, 403, etc). |
success | integer | Either 1 (success) or 0 (fail). |
data | list | List of Credits returned. The data structure of each Credits is a Credits Resource. |
errors | object | If the request fails, this will contain information about the error. |
meta | object | Contains information about pagination and total record count. |
links | object | Contains pre-built links for forward/backward pagination. |