Delete an expiry type
post
https://api.expiryedge.com/v1/deleteExpiryTypeeditor or admin60/minAny method
Request
curl -X POST 'https://api.expiryedge.com/v1/deleteExpiryType' \
-H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"typeId": "et_5Gm1rT",
"option": "move",
"newTypeNameOrId": "et_2Kd9wB"
}'Response
{
"message": "Moved 12 expiries to new type and deleted old type",
"moved_expiries": 12
}If expiries use the type, option decides what happens to them: move (to type newTypeNameOrId), rename
(keep the type under the new name newTypeNameOrId) or delete_all (permanently delete those expiries).
typeIdstringrequiredoptionstringRequired when the type is in use.Allowedmoverenamedelete_allnewTypeNameOrIdstringTarget type id formove, new name forrename.
200
Deleted (or renamed). Exactly one of the count fields is present.
messagestringrequireddeleted_expiriesintegerPresent when the type was unused oroptionwasdelete_all.moved_expiriesintegerPresent foroption: move.updated_expiriesintegerPresent foroption: rename.
400 | The request is missing required fields or contains invalid values. |
401 | Missing, expired or invalid bearer token. |
403 | Authenticated, but your role or organization does not allow this action. |
404 | The record does not exist or is not in your organization. |
429 | Too many requests for this endpoint from your IP. Wait Retry-After seconds. |
