Credits
Update Credit Definition
Update an existing credit definition. All fields are optional.
Authorization
bearerAuth AuthorizationBearer <token>
Use your secret API key as the bearer token
In: header
Path Parameters
id*string
Credit definition ID
Match
^cred_def_[A-Za-z0-9]+$Request Body
application/json
name?string
Length
1 <= lengthdescription?string
billingDescription?string
applicationType?string
Value in
"usage" | "monetary"scope?string
Value in
"component" | "price" | "plan" | "merchant"planId?string|null
featureId?string|null
featureSlug?string|null
priceId?string|null
priceComponentId?string|null
defaultAmount?integer
Range
1 <= valuerefillAmount?integer
Range
1 <= valueexpiryDays?integer
Range
1 <= valuerefillRrule?string
renewOnBilling?boolean
priority?integer
isActive?boolean
Response Body
application/json
application/json
application/json
curl -X POST "https://api.getlumen.dev/v1/credits/definitions/string/update" \ -H "Content-Type: application/json" \ -d '{}'{
"definition": {
"id": "string",
"merchantId": "string",
"name": "string",
"description": "string",
"scope": "component",
"applicationType": "usage",
"planId": "string",
"featureId": "string",
"featureSlug": "string",
"priceId": "string",
"priceComponentId": "string",
"defaultAmount": 0,
"refillAmount": 0,
"expiryDays": 0,
"refillRrule": "string",
"renewOnBilling": false,
"billingVisible": false,
"billingDescription": "string",
"currency": "string",
"priority": 0,
"isActive": true,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"deletedAt": "2019-08-24T14:15:22Z"
}
}{
"error": "Credit definition not found"
}{
"error": "Failed to update credit definition"
}