Record Does Not Exist

We can't link up a reference

Purple gradient wave Purple wave used to give a visual break between the header and body of the page.

Summary

This error happens when you have supplied an Id or another type of reference and the API is unable to find a record that matches.

For example, if you attempt to update an Employee's manager but supply an Id that does not correspond to any Manager in the system you will receive this error response.

curl -X PUT -H "Authorization: ApiKey {ApiKey}" \
  "Content-Type: application/json" \
  --data "{\"Manager\": 666}" \
  https://api.youmanage.co.uk/employees/5

{
  "error": {
    "code": "YM1000",
    "reference": "https://developer.youmanage.co.uk/api/errors/ym1000",
    "target": "Validation",
    "message": "Validation failed",
    "details": [
      {
        "message": "Validation failed for a specific property",
        "details": [
          {
            "code": "YM1009",
            "reference": "https://developer.youmanage.co.uk/api/errors/ym1009",
            "target": "Manager",
            "message": "Manager does not match any existing record",
            "details": null
          }
        ]
      }
    ]
  }
}

  

Solution

Ensure that the references you are passing exist in the system before attempting to link other records to them. See our guide on filtering for ways to search and verify data.

Once the data has been verified reissue the request with the corrected reference values.

curl -i -X PUT -H "Authorization: ApiKey {ApiKey}" \
  "Content-Type: application/json" \
  --data "{\"Manager\": 2}" \
  https://api.youmanage.co.uk/employees/5

HTTP/1.1 204 No Content