Credits

Delete Credit Definition

Soft delete a credit definition.

POST
/credits/definitions/{id}/delete

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]+$

Response Body

application/json

application/json

application/json

curl -X POST "https://api.getlumen.dev/v1/credits/definitions/string/delete"
{
  "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 delete credit definition"
}