# People - Debts

# Events

--- DEBTS_UPDATED ---
{
    "event": "DEBTS_UPDATED",
    "data": {
          "person_id": 999
    }
}

# Validation

WARNING

It is only possible to change the liga debt through the API.

{
  "debt": [
    "required",
    "numeric",
    "greater or equal than 0"
  ],
  "remarks": [
    "nullable",
  ],
}

# List

--- ENDPOINT ---

Domain: equidata 
Url: /people/123/debts
Method: GET

--- EXAMPLE RESPONSE ---
{
    "KBRSF": {
        "debt": "0.00",
        "remarks": ""
    },
    "Liga": {
        "debt": "123.45",
        "remarks": "Vel vel ullam eum quibusdam eligendi assumenda.",
    },
    "Regional": {
        "debt": "0.00",
        "remarks": ""
    }
}

# Update

--- ENDPOINT ---

Domain: equidata 
Url: /people/123/debts
Method: PUT

--- EXAMPLE PAYLOAD ---
{
    "debt": 123.45,
    "remarks": "Some remarks"
}
--- EXAMPLE RESPONSE ---
{
    "KBRSF": {
        "debt": "0.00",
        "remarks": ""
    },
    "Liga": {
        "debt": "123.45",
        "remarks": "Some remarks",
    },
    "Regional": {
        "debt": "0.00",
        "remarks": ""
    }
}