Credits
Grant credit
Changed onGrant credit
post/credits
Request
- Base URLhttps://api.togai.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"creditRequests": [
{
"accountId": "ACC001",
"purpose": "PREPAID_CREDIT",
"effectiveFrom": "2020-07-04",
"effectiveUntil": "2021-07-04",
"creditAmount": 1000,
"priority": 1
}
]
}Response
Response for List credits request
Example response
{
"credits": [
{
"accountId": "ACC001",
"purpose": "PREPAID_CREDIT",
"effectiveFrom": "2020-07-04",
"effectiveUntil": "2021-07-04",
"creditAmount": 1000,
"priority": 1,
"id": "cred.1znqBOVcai0.0tBFz",
"customerId": "7VcRw9xZDIqsC5E",
"status": "ACTIVE",
"creditUnit": "USD",
"holdAmount": 500,
"consumedAmount": 400
}
]
}Changes
- breaking
the response property
//////became optional for the status - info
the request property
//became optional
- breaking
- info
added the new optional request property
// - info
added the optional property
//////to the response with the status
- info