POST
/
api
/
credits
/
{credit_id}
/
update
/
curl --request POST \
  --url https://api.uselotus.io/api/credits/{credit_id}/update/ \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "description": "<string>",
  "expires_at": "2023-11-07T05:31:56Z"
}'
{
  "credit_id": "<string>",
  "customer": {
    "customer_name": "<string>",
    "email": "jsmith@example.com",
    "customer_id": "<string>"
  },
  "amount": 5000000000,
  "amount_remaining": 5000000000,
  "currency": {
    "code": "<string>",
    "name": "<string>",
    "symbol": "<string>"
  },
  "description": "<string>",
  "effective_at": "2023-11-07T05:31:56Z",
  "expires_at": "2023-11-07T05:31:56Z",
  "status": "active",
  "amount_paid": 0,
  "amount_paid_currency": {
    "code": "<string>",
    "name": "<string>",
    "symbol": "<string>"
  },
  "drawdowns": [
    {
      "credit_id": "<string>",
      "amount": -5000000000,
      "description": "<string>",
      "applied_at": "2023-11-07T05:31:56Z"
    }
  ]
}

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

Authorization
string
headerrequired

Token-based authentication with required prefix "Token"

Path Parameters

credit_id
string
required

The ID of the credit to retrieve or update.

Body

description
string | null
expires_at
string | null

Response

200 - application/json
credit_id
string
required
customer
object
required
amount
number
required
amount_remaining
number
required
currency
object
required
description
string | null
required
effective_at
string
required
expires_at
string | null
required
status
enum<string>
required
  • active - Active
  • inactive - Inactive
Available options:
active,
inactive
amount_paid
number
required
amount_paid_currency
object
required
drawdowns
object[]
required