Questions tagged [apiv4]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
24 views

Group of unsolvable API and core errors

I really would appreciate any advice to dig deeper into the debugging of some errors. The reason may lay in our installation which is grown since late 2015 (I think it was version 4.2) and widely ...
3
votes
2answers
48 views

How to see the SQL generated by Api4 calls?

When trying to express SQL joins with API4 I feel the need to check the SQL that's being created, as there's some 'magic' that might or might not be happening. It wasn't clear to me how to do this.
2
votes
1answer
14 views

Best (api4) way to chain save a contact so that the email updates, without creating a new one?

Using civicrm api4, what's the best way to chain save a contact so that the email updates, without creating a new one? For example, I want to update this existing contact: entity: Contact, action: get,...
0
votes
1answer
13 views

API V4 - Uncaught Exception: Authorization failed

With this code I created contact, but only when I'm authorized. civicrm_api4('Contact', 'create', [ 'values' => [ 'contact_type' => 'Individual', ...
0
votes
0answers
8 views

Access data from log table with API4?

I found out, that the date of joining and exiting a group is stored in log_civicrm_group_contact table, in the log_date column. Is it possible to get this value with API4? Thank you!
0
votes
2answers
28 views

How to get Target Contacts from Api4 Activity.get call?

I have an Api4 call that gets a particular set of activities. I'd like the call to return the names of the "target"/"with" contacts. I've tried: Joining the Contact directly "...
0
votes
1answer
13 views

Searchkit Buttons not working

Using beta version of SearchKit. Buttons for Add, Compose Search and AND,OR,Not options are not working/unresponsive.
2
votes
1answer
20 views

api4: get(FALSE) vs get()->setCheckPermissions(FALSE): which is preferred?

In ap4, there are apparently two different ways to specify skipping permissions: In the api4 browser at /civicrm/api4, when you un-check the "CheckPermissions" checkbox, the action method is ...
1
vote
1answer
30 views

Validating options in API4?

Is there a way to make APIv4 validate options when creating/updating? For example, using the demo data I can run: $ cv api4 Contact.update '{"where":[["id","=",202]],&...
0
votes
2answers
128 views

Use complete address and full county name in mailings

Working on a mailing that includes contacts full address details. And I'm encountering an issue for UK addresses where the county is abbreviated in the same way US states are. I've never seen such 3-...
4
votes
1answer
50 views

Finding contacts without relationships (API)

How can I find contacts using the APIv4 that don't have any relationships of a specific type? I want the first n contacts ordered by a date field meeting various conditions excluding those with a ...
0
votes
0answers
32 views

apiv4 no longer sees custom fields that allow for multiple entry

I just noticed an error on a site I maintain. Some custom code uses apiv4 to return a value from a set of custom fields (on individual contacts) and that function now throws an error: API_Exception: ...