Contact id 2, is_deleted is set to 1. Permissions not an issue since running as admin and no acl's present.


  • api3 explorer: Ask for return value "contact is in trash" which translates to 'return' => ['is_deleted'], so in full civicrm_api3('contact', 'get', ['id' => 2, 'return' => ['is_deleted']]);. This returns 0 results in api3 explorer (which is wrong).

  • command line with cv: also no results

  • command line with cv but change is_deleted to contact_is_deleted: civicrm_api3('contact', 'get', ['id' => 2, 'return' => ['contact_is_deleted']]);. This does return results.

  • Seeing same on 5.35 and master. I don't remember having this issue before but maybe I never put it in the return clause. It does work as a "where" clause on the command line, e.g. civicrm_api3('contact', 'get', ['id' => 2, 'is_deleted' => 1]);, but not in api3 explorer.

1 Answer 1


Certain field values are blocked through ajax call that includes from api explorer as well. The ajax call makes check permission to true by default and cannot be over-riden from api params. The result may vary incase calling from php or smarty

  • When you say "blocked" do you mean that if I specify is_deleted as a return value and am using ajax api, then it's on purpose that it doesn't return any records? It's not a permissions issue - everything in this case is running as admin.
    – Demerit
    Dec 15, 2021 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.