Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [api]

Questions about the CiviCRM API.

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

Rest API shows no results

This is the first time I have been trying to integrate with a CiviCRM instance. I have admin rights to the instance, however I am having issues getting the REST API to come back with any results. I am ...
Charles Todd's user avatar
2 votes
1 answer
21 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', [ '...
jsherk's user avatar
  • 583
0 votes
1 answer
20 views

How to access CiviCRM API functions from a WordPress plugin

Wondering what I need to include/require in a WordPress plugin to access the CiviCRM API functions from within that plugin (assuming that CiviCRM is installed on this WordPress installation). Or is ...
jsherk's user avatar
  • 583
1 vote
1 answer
18 views

membership application form w/o access to civicim

We are evaluating the use of civicrm. Regarding data security we have a need vor very high standards, so the policy is never to store any personal information on a computer that is directly accessible ...
Guido's user avatar
  • 11
1 vote
1 answer
41 views

CiviCRM fatal error API 'is not of type String'

I need help figuring out what's causing an error in CiviCRM and how to fix it. It happens when trying to install or uninstall new civi extensions (both from UI and CLI), when trying to rebuild the ...
Will Lee's user avatar
3 votes
1 answer
22 views

Error: API (SearchDisplay, save) does not exist

I upgraded CiviCRM (from 5.53 to 5.58) after disabling non native CiviCRM extensions and when I want to enable these extensions again, I get an error message I don't understand: Sorry, due to an ...
Pierre François's user avatar
0 votes
0 answers
22 views

civi api response limit working in postman but not in javascript

I created a postman test with api4 of civicrm. It adds to the body as x-www-form-urlencoded: key: params value: {"limit": 5} This works fine and returns only 5 results. I tried to do the ...
Gesko's user avatar
  • 11
1 vote
1 answer
78 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], [...
marcelo2605's user avatar
1 vote
1 answer
48 views

CIVICRM: Custom Field that uses financial type id

I'm new to Civicrm PHP and extension development so I'm sorry if this is a dumb question. ^-^ I'm making an extension that creates a new custom field group, the custom field group is meant to ...
BellaDoll's user avatar
2 votes
1 answer
90 views

Fetch Bounces Failure, Error message: Unknown api version

For some reason, the fetch bounce api method is unrecognized (Fetch Bounces Finished execution of Fetch Bounces with result: Failure, Error message: Unknown api version). not sure if related to ...
Hilary Binder's user avatar
0 votes
1 answer
28 views

civicrm_api3('Contact', 'create', in hook_civicrm_pre?

Getting a loop and consequently out of memory while executing the code: function hook_civicrm_pre($op, $objectName, $id, &$params){ if ('Individual' === $objectName && 'edit' === $...
yurg's user avatar
  • 2,050
0 votes
0 answers
71 views

System status page not working and other loading errors after upgrade

After upgrading to latest CiviCRM (5.66.0) on WordPress. We have been getting errors loading the system status page, and sometime getting the default "The is an issue with your Wordpress site&...
sweetwater_media_inc's user avatar
0 votes
1 answer
19 views

How to delete all financial contributions via the API?

I want to create an extension to delete all financial contributions from the database. The database only contains simple contributions that are not tied to memberships or events. The developers guide ...
cray146's user avatar
  • 153
1 vote
0 answers
17 views

Batch Memberships Update via Profile - Expiration Date changes not saved due to "Is_override" field not avail in Profile

Thought it is possible to batch update a few membership statuses via profile, wanted to clear Expiration Dates, however changes only partially stick: while Status saves, Expiration Date stays, which ...
yurg's user avatar
  • 2,050
1 vote
0 answers
21 views

How can I create a Membership Payment with the Order API?

I have a script that is (among other things) a workaround for a bug in CiviSEPA extension. For this workaround, I need to create a Membership Payment to connect an existing Membership with an existing ...
emma's user avatar
  • 493
0 votes
1 answer
23 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 ...
MtnPavlas's user avatar
  • 856
2 votes
1 answer
44 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 ...
emma's user avatar
  • 493
1 vote
1 answer
22 views

Api get all option within sub entity

get all options from a sub entity named payment_instrument within a entity called OptionGroup
James's user avatar
  • 11
0 votes
1 answer
39 views

Permanently delete more than 100k trashed records

Is there a proper way to permanently delete more than 100k records already in trash ? For instance, Is there anyway to do this using the API ?
Pierre's user avatar
  • 15
1 vote
1 answer
180 views

I have the dreaded "[unauthorized: Authorization failed" error on a WordPress dev site

We're testing CiviCRM to determine if it's fit for our purpose. Tests were going well until we hit an unexplained snag for which we can't find a definitive fix. The error is as follows .. Fatal error: ...
Kerry Denten's user avatar
1 vote
0 answers
17 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 ...
Alessandro Bronzo's user avatar
1 vote
1 answer
71 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 ...
yurg's user avatar
  • 2,050
0 votes
2 answers
37 views

Activities created by API not emailing assignee

Creating an activity with either API (api3, api4) does not trigger an email to the assignee. Is this by design or is there a problem with my instance of CiviCRM? Activities generated via the GUI and ...
wil_SRQ's user avatar
  • 703
1 vote
1 answer
34 views

Error: Class "CRM_Dkbrapi_APIWrapper_Attachment" not found in dkbrapi_civicrm_apiWrappers()

This is my first module in CiviCRM and I have the example from the documentation but I can't get it to work. Every time I try to run in CiviCRM API Explorer v3 for attachments I get the following: ...
ItsMe's user avatar
  • 133
0 votes
1 answer
46 views

Where does the QR Code Extension store the value "enable qr code token for this event" in Database?

I installed the "QR Code Checkin" Extension in CiviCRM 5.58.1 with Drupal. When I create a new event, I can activate "enable qr code token for this event". Now, I want to update my ...
emma's user avatar
  • 493
0 votes
1 answer
29 views

How to list records from the given custom group via API?

I've custom data stored in custom fields. I've submitted few records as part of the same Contact. I can use the following API to fetch information about custom group by: $result = civicrm_api3('...
kenorb's user avatar
  • 131
1 vote
1 answer
85 views

Nagios script returns 403 error when querying CiviCRM via Ajax API

I've recently started using the check_civicrm script from https://github.com/MegaphoneJon/check_civicrm It works great and my monitoring is greatly improved. However, on some sites I get a 403 error ...
kapn's user avatar
  • 919
1 vote
0 answers
16 views

Problems with API Key Management (v1.3.5) extension?

When I go to API Key section, it does not provide any controls to add or remove keys, just two narrowish grey lines where key should be. Is it a bug and how to fix it? CiviCRM 5.53.0 on Drupal 7.
Aivars's user avatar
  • 1,034
0 votes
0 answers
68 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', '...
yurg's user avatar
  • 2,050
0 votes
0 answers
25 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 ...
jsherk's user avatar
  • 583
0 votes
0 answers
33 views

Error message of "Found more than one Organisation with same Name"

Getting the following error whenever a user tries to create a new account on the system: CRM_Core_Exception: Found more than one Organisation with same Name. in civicrm_api3() (line 135 of /storage/...
JonathanBP's user avatar
1 vote
1 answer
37 views

Access event type details with query from wordpress

I'm writing a WordPress plugin to display a list of CiviCRM Events, but I'm having a difficult time figuring out how to obtain the label for the event type. I can retrieve the list of events, and the ...
Paul Dufresne's user avatar
0 votes
1 answer
11 views

How to find the number of participants of a past event?

How to find the number of participants happened in the past?
Quiana's user avatar
  • 1
2 votes
1 answer
58 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. ...
Rafa Gomez's user avatar
0 votes
1 answer
28 views

API Explorer DB error: Field 'entity_table' doesn't have a default value

I am using the CiviCRM API Explorer v3 and try to create a LineItem. The following fields appear as obligatory fields for that: 'entity_id', 'qty', 'unit_price', 'line_total' But when I try to create ...
emma's user avatar
  • 493
2 votes
1 answer
90 views

API error: 'afform_type' is not a valid option for field option_group_id on OptionValue.create( entity name form)"

Getting this error out of sudden: apparently the only thing changed was "CRM/Core/Payment.php" file moved to the custom php directory and a "City" field attribute changed to "...
yurg's user avatar
  • 2,050
0 votes
1 answer
67 views

Database Connection Only Works Some of the Time

I have a CiviCRM instance that has its database hosted in RDS Aurora. This has worked well for several years. Recently I needed to restore from a copy of the Aurora cluster and I changed the name of ...
Josh's user avatar
  • 887
0 votes
0 answers
21 views

How to access entity newly created via API

How can one access, e.g., the newly created contact ID and relationship ID? Code example: $result = civicrm_api3('Contact', 'create', array( 'sequential' => 1, 'contact_type' => "...
MtnPavlas's user avatar
  • 856
2 votes
0 answers
195 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 ...
SunriseGV's user avatar
0 votes
1 answer
38 views

Getting fatal error when doing things with extension

Whenever Im doing anything with extensions Im getting this error CiviCRM_API3_Exception: "API error: on OptionValue.getsingle" #0 /home/lgsecrmo/hub.littlegate.org.uk/sites/all/modules/...
Tony Horrocks's user avatar
1 vote
1 answer
145 views

How can I call api directly from external http?

According to https://docs.civicrm.org/dev/en/latest/api/v3/rest : "As of v5.47+, there should be no reason to use extern/rest.php - other end-points should be more compatible and more featureful....
MikeSteigerwald's user avatar
2 votes
1 answer
73 views

API3 Error Custom Fields

Deleted Custom Field set called Area and added a new custom field set called Regions and I get the below. I cannot access any Contacts now. CiviCRM_API3_Exception: "'group_areas' is not a valid ...
Paul Williams's user avatar
0 votes
1 answer
27 views

PHP Fatal Error trying to create contribution with duplicate Transaction ID causes script to crash (using api4 on WordPress)

If I use the API Explorer V4, and I try to create a new contribution with a Transaction ID that already exists, then the response I get back is as follows: status: 500, statusText: Internal Server ...
jsherk's user avatar
  • 583
0 votes
1 answer
43 views

How to get Unique Opens with CiviCRM API?

I am getting summary report of email by using CiviCRM API but not able to get the field Unique Opens I can see on the report page. Currently I am using this query: $result = civicrm_api3('Mailing', '...
hazalciplak's user avatar
0 votes
1 answer
84 views

How can I write custom entites/ actions for api v3 - usage of api v4 for scheduled jobs

I want to define some scheduled jobs so that old data is deleted from time to time. For example contacts in trash, mailings older than X year, drafted mailings never sent... For scheduled jobs I need ...
Tobias Krause's user avatar
1 vote
1 answer
80 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 -> ...
Wouter H.'s user avatar
1 vote
1 answer
304 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 ...
jsherk's user avatar
  • 583
0 votes
2 answers
193 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 ...
jsherk's user avatar
  • 583
1 vote
0 answers
47 views

UUID Auto field for Custom field

I want to create something like a UUID field for a custom multi-value fieldset that I will consume from an external API call. In other words: I have contacts that can have multiple versions of a ...
tanbog's user avatar
  • 317
0 votes
0 answers
21 views

Creating UFField using API - error with field_name

I'm trying to migrate data using the API and I'm having issues with UFField. Some entries are inserted correctly while others give me the following error: Fatal error: Uncaught API_Exception: [0]: The ...
lapmir's user avatar
  • 61

1
2 3 4 5
11