Credits
Update credit
POST
/api/credits/{credit_id}/update/
X-API-KEY*
curl --request POST \
--url https://api.uselotus.io/api/credits/{credit_id}/update/ \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <x-api-key>'
{
"amount": "number",
"amount_paid": "number",
"amount_paid_currency": {
"code": "string",
"name": "string",
"symbol": "string"
},
"amount_remaining": "number",
"credit_id": "string",
"currency": {
"code": "string",
"name": "string",
"symbol": "string"
},
"customer": {
"customer_id": "string",
"customer_name": "string",
"email": "string"
},
"description": "string",
"drawdowns": [
{
"amount": "number",
"applied_at": "string",
"credit_id": "string",
"description": "string"
}
],
"effective_at": "string",
"expires_at": "string",
"status": "active"
}
This can be used to alter the description or expiration date of a credit. If the credit expiry is in the past, this will throw an error. If the targeted credit is no longer active, this will throw an error.
lotus.update_credit(
credit_id='credit_0569173ee6654369',
description='New description',
expires_at='2027-01-01T00:00:00Z'
)
Authorizations
Authorizationheaderrequired
string
Token-based authentication with required prefix "Token"
Path Parameters
credit_idrequired
string
The ID of the credit to retrieve or update.
Body
description
string
expires_at
string
Response
amountrequired
number
amount_paidrequired
number
amount_paid_currencyrequired
object
amount_remainingrequired
number
credit_idrequired
string
currencyrequired
object
customerrequired
object
descriptionrequired
string
drawdownsrequired
array
effective_atrequired
string
expires_atrequired
string
statusrequired
string
active
- Activeinactive
- Inactive
Available options:
active
, inactive
curl --request POST \
--url https://api.uselotus.io/api/credits/{credit_id}/update/ \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <x-api-key>'
{
"amount": "number",
"amount_paid": "number",
"amount_paid_currency": {
"code": "string",
"name": "string",
"symbol": "string"
},
"amount_remaining": "number",
"credit_id": "string",
"currency": {
"code": "string",
"name": "string",
"symbol": "string"
},
"customer": {
"customer_id": "string",
"customer_name": "string",
"email": "string"
},
"description": "string",
"drawdowns": [
{
"amount": "number",
"applied_at": "string",
"credit_id": "string",
"description": "string"
}
],
"effective_at": "string",
"expires_at": "string",
"status": "active"
}