Link Search Menu Expand Document

Delete

/api/v2/badge/delete

Post

badges


Purpose

To allow the admin to delete an existing badge.

Body Content [input]

{
    secret: string,
    badgeID: string
}

Returns if valid [output]

{
    message: string,
    error: 0
}

What the API does

  • Checks if the value of the secret field passed is valid [401].
  • Ensures that there is a badge in the badges collection corresponding to the value of the badgeID field passed [404].
  • Removes the badge corresponding to the value of the badgeID field passed from the badges collection.