All Questions
17 questions
0
votes
1
answer
23
views
Use APIv4 to change Case Manager role and to add another role as well
Some of these API calls get complicated, and I am unable to figure out the following...
I am able to create a new case using the APIv4 as follows (client contact_id=3175):
$results = civicrm_api4('...
2
votes
1
answer
30
views
Can rename(AS) a column/field from SELECT using APIv4
I want to rename the column/fields I am retreiving in the SELECT statement. Best way to ask this is by showing an example...
Given this select call:
$contacts = civicrm_api4('Contact', 'get', [
'...
1
vote
1
answer
79
views
Do strings used in API version 4 need to be escaped?
When running something like this:
$result = civicrm_api4('Event', 'get', [
'select' => ['id'],
'where' => [
['OR', [
['title', 'LIKE', $keyword],
[...
0
votes
1
answer
24
views
Can't store is_confirmation_enabled via API
I can't for the life of me store the value of is_confirmation_enabled for creating a new event via API. This is in a PHP file that creates new events on the front end of Joomla based on input ...
2
votes
1
answer
61
views
Use Order API or use APIv4?
I am using a script that creates a MembershipPayment to connect an existing Membership to an existing Contribution (bugfix for CiviSepa). This script produces the following error:
Deprecated: Not ...
1
vote
1
answer
30
views
Api get all option within sub entity
get all options from a sub entity named payment_instrument within a entity called OptionGroup
1
vote
0
answers
19
views
API 4 problem while running composer
everybody.
Since the installation of CiviCRM I have problems in composer.
Another installation, on the same VPS, is not causing any problems.
The website is a Drupal based one (9.5.10)
I started it ...
1
vote
1
answer
85
views
Invalid field 'contact_id.is_deceased' Apiv4
CiviCRM 5.61.2., wordpress.
Hovering over icons on search results page brings "where was an error processing your request.." message and Invalid field 'contact_id.is_deceased' message
...
0
votes
0
answers
75
views
CiviCRM: access AJAX API not respected in Wordpress
CiviCRM 5.58.1, vanilla WordPress 6.1.1 with the default theme.
Both CiviCRM: access AJAX API and CiviCRM: access CiviCRM backend and API are checked. Still, executing
CRM.api4('Contact', '...
0
votes
0
answers
28
views
api pull custom field value based on id not label
Using API 4 (php), how do I retreive a custom field value for a specific contact, using the custom field id instead of the custom field name.
This works (for contact with id=1234), but requires the ...
2
votes
1
answer
75
views
APIv4 Base URL for external applications
I am trying to write an external app with python, that should make a call to the CiviCRM's APIv4 to get a list of contacts & relationships.
I am using CiviCRM's with Wordpress and debian 11.
...
2
votes
0
answers
213
views
API v4 REST on Wordpress not returning any data
Problem:
I am attempting to use my CiviCRM instance's API v4 REST endpoint to get and post data. I eventually want to script tasks like importing new contacts and event registrations using Python, but ...
1
vote
1
answer
91
views
Is the use of API4 already recommended?
I am currently working on a custom module for CiviCRM (5.48) and Drupal 9 (9.3.9)
I opted to use API4 but I notice that some things are missing compared to API3:
Contribution -> ...
1
vote
1
answer
344
views
API4 PHP Fatal error Uncaught API_Exception Authorization failed
So I was happily programming and testing away, and everything was working and then suddenly I started getting this error:
PHP Fatal error: Uncaught API_Exception: [0]: Authorization failed
thrown ...
0
votes
2
answers
243
views
Using API4 to get contact based on email match
The API Explorer is excellent for testing proper queries, but I can not figure out how to get a contact based on matching email address.
For example, I can get a contact based on a partial match of ...
1
vote
1
answer
82
views
Make API queries - two methods failing
I'm trying to query my data for records with a given firstname/lastname pair (see Map firstname-lastname pairs to IDs for some previous context) using a couple different methods, and failing.
API4
The ...
4
votes
1
answer
79
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 ...