Delete an expiry type

posthttps://api.expiryedge.com/v1/deleteExpiryType
editor or admin60/minJede Methode
Anfrage
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"
}'
Antwort
{
  "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).

Body-Parameter

application/json
  • typeIdstringerforderlich
  • optionstring
    Required when the type is in use.
    Erlaubtmoverenamedelete_all
  • newTypeNameOrIdstring
    Target type id for move, new name for rename.

Rückgabe

200
Deleted (or renamed). Exactly one of the count fields is present.
  • messagestringerforderlich
  • deleted_expiriesinteger
    Present when the type was unused or option was delete_all.
  • moved_expiriesinteger
    Present for option: move.
  • updated_expiriesinteger
    Present for option: rename.

Fehler

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.