Skip to main content
The ConservationStatus resource stores the IUCN Red List categories used to classify the threat level of each animal species in the park. Every Animals record must reference one of these statuses.
Status codes follow the IUCN Red List classification system. The name field stores the two-letter code; the API returns the full human-readable label via get_name_display().
Write operations (POST, PUT, DELETE) require authentication via IsAuthenticatedAndRole. GET endpoints are publicly accessible.

IUCN categories

The following categories are defined in the model’s STATUS_CHOICES:
CodeLabel
LCLeast Concern
NTNear Threatened
VUVulnerable
ENEndangered
CRCritically Endangered
EWExtinct in the Wild
EXExtinct

Endpoints

List conservation statuses

Returns all conservation status records ordered alphabetically by code.
curl --request GET \
  --url https://api.parquemarino.org/api/conservation_status/
[
  {
    "id": 1,
    "name": "CR"
  },
  {
    "id": 2,
    "name": "EN"
  },
  {
    "id": 3,
    "name": "EW"
  },
  {
    "id": 4,
    "name": "EX"
  },
  {
    "id": 5,
    "name": "LC"
  },
  {
    "id": 6,
    "name": "NT"
  },
  {
    "id": 7,
    "name": "VU"
  }
]

Response fields

id
integer
required
Unique identifier for the conservation status record.
name
string
required
Two-letter IUCN code (e.g., "EN", "VU"). Must be unique. Valid values are LC, NT, VU, EN, CR, EW, and EX. Records are ordered alphabetically by this field.

Create conservation status

Requires admin authentication. Only one record per IUCN code is permitted — name has a unique constraint.
name
string
required
Two-letter IUCN code. Must be one of: LC, NT, VU, EN, CR, EW, EX.
curl --request POST \
  --url https://api.parquemarino.org/api/conservation_status/create/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{"name": "VU"}'
{
  "id": 7,
  "name": "VU"
}

Retrieve conservation status

id
integer
required
Primary key of the conservation status record.
curl --request GET \
  --url https://api.parquemarino.org/api/conservation_status/2/
{
  "id": 2,
  "name": "EN"
}

Update conservation status

Requires admin authentication. Only PUT is supported; PATCH is not exposed.
Changing a status code affects all animals that reference this record. Review animal assignments before updating.
id
integer
required
Primary key of the status record to update.
name
string
required
Replacement IUCN code. Must be one of the valid choices and must remain unique.
curl --request PUT \
  --url https://api.parquemarino.org/api/conservation_status/2/update/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{"name": "CR"}'
{
  "id": 2,
  "name": "CR"
}

Delete conservation status

Deleting a conservation status cascades to all animals that reference it. This action cannot be undone.
Requires admin authentication.
id
integer
required
Primary key of the conservation status record to delete.
curl --request DELETE \
  --url https://api.parquemarino.org/api/conservation_status/7/delete/ \
  --header 'Authorization: Bearer <token>'
{}

Build docs developers (and LLMs) love