Hot answers tagged

4

The CiviMobile API extension was developed specifically for the CiviMobile App. It's not a generic end point for other apps to use. If you were planning on using it in this way, then at the very least it would be wise to reach out to those developers to let them know that this is what you were doing, so they might re-consider implementing breaking changes. ...


3

The function user_load is deprecated in D9. https://api.drupal.org/api/drupal/core%21modules%21user%21user.module/function/user_load/8.7.x Looks like we need a replacement stub function in the drupal module. For a quick hack, you could append this to /var/www/drupal/web/modules/contrib/civicrm/civicrm.module (or wherever it lives on your server). A better ...


3

Yes you can use the API CSV extension to import new events. Here is a good guide to do so: https://wapix.co/importing-events-to-civicrm/.


2

I just installed a CiviCRM and Drupal 9 instance (5.40.1). These were my steps: I enabled the new authx extension cv ext:enable authx I allowed the authenticate with the api_key in a special header cv ev 'Civi::settings()->set("authx_xheader_cred",["api_key"]);' The auth extension does not have a configuration screen, yet. I added ...


2

The correct endpoint for WordPress is wp-json/civicrm/v3/rest. Its documented in the developer manual, see https://docs.civicrm.org/dev/en/latest/api/v3/wp-rest/#endpoints. When you just copy the URL that is suggested in the API explorer you are left in the dark.


2

The entity is called UFGroup, and UFField for the fields. The naming is historical. The Profile entity is used to do something equivalent to filling out and submitting a profile form on the front end.


2

This extension may be of interest, but it doesn't allow sending via API: https://github.com/mecachisenros/aws I think you would need to write your own code to integrate with the SES API. But AWS works perfectly fine via SMTP.


2

Updated! based on Coleman's answer, and additional testing. First of all, for WordReplacement, if you want to update a single record it's best and most appropriate to use the get action to get the record ID (civicrm_word_replacement.id). Then (as Coleman noted) use the create action and include the id parameter to update just that record. (Without the id ...


2

If include 'state_province' in return param it should return you state_province_id, state_province_name and state_province. For geofield1 you need to use 'geo_code_1'. If you search for primary address in return field drop down under api explorer you should see the exact name for fields to retrieve for address. $result = civicrm_api3('Contact', 'get', [ '...


2

API CSV Import extension uses Job Scheduler to import the records in Civi. The job scheduler breaks down the whole csv into small batches(also known as queue item) to import to avoid timeout issue, memory excess and various reasons. 'Number of Items' is used to define how many records you want to process in single single queue. If you specify 2000 than there ...


2

the correct syntax is the one at the top: "first_name": {"LIKE":"hei%"} to work around the encoding issues (that might be tricky indeed), don't try to put all the params in the url (as http get) but use a http post (the api works with both)


2

It's not an "api" exactly, but you can use: $caseParams = [ 'activity_id' => 1234, 'case_id' => 12, ]; CRM_Case_BAO_Case::processCaseActivity($caseParams); Are you saying the api call used to work before and now is failing? I'm not sure if it ever worked before with an existing activity? It looks also like ...


2

the API key sits in the database as a field for the CiviCRM contact. You can find it in the table civicrm_contact. If you are not too technical and do not access your database directly on a regular basis the is an extension you can use called API Key (https://civicrm.org/extensions/api-key) which will show an additional tab for contacts if you are a sysadmin ...


2

From api explorer the results are retrieved using rest api where check_permissions is always set to TRUE by default even though its been explicitly set via api params. If you have check_permissions set to TRUE than api returns only those fields which are defined for the the entity. In your case the fields would be civicrm_api('Contribution', 'getfields', ['...


1

I can't help on the csvimporter part as I am not using it but the CustomField entity is used for defining custom fields. It could be used if you want to create new custom fields from a csv file so it's not what you are looking for. Instead, you should use the Contact entity which should have the custom fields you need. If csvimporter doesn't work, you might ...


1

You may need to add below line in .htaccess or nginx config to allow php file be executed RewriteCond %{REQUEST_URI} !/libraries/civicrm/extern/[a-z]+\.php$ Copy extern directory from civicrm vendor folder into libraries The rest api url for drupal would look like https://sitename/libraries/civicrm/core/extern/rest.php


1

I think there may be some misunderstanding about the purpose of the replace action. To clarify, this is a specialized api action intended to perform a simultaneous create/update/delete on a bunch of records. It's typical use would be to replace all of a contact's email addresses with a new set of email addresses. Perhaps the confusion arose from similarity ...


1

You can't create a csv directly from an API call. But it would be a very simple task to make an API call and then format the results as a csv. One simple option might be to use Google Apps Script to call the API then put the results into a spreadsheet, if you don't want to run this as a standalone script. Or any scripting language you might want to use will ...


1

You'll have an easier time modifying the permissions from within CiviCRM - Administer menu >> Users and Permissions >> Permissions (Access Control). When changing permissions from WP, you're usually dealing with machine names, not human-readable labels, so it can be hard to correlate error messages with the particular permission needed. It ...


1

CSV Import and Form Processor IS a powerful combo! Check out the advimportformprocessor extension. Note that this combines the "advimport" extension rather than the CSV API GUI extension with Form Processor. It's overall better, but some work on advimport's rough edges would improve the UX. Also note that Form Processor is pretty slow, so imports ...


1

You're in a bit of a tough spot, I'm afraid. The display name is attached to the contact, not the contribution. You would typically use an API join to handle this. However, joining to the Contact entity isn't supported in APIv3. It is supported in APIv4 (and in fact is one of the main reasons behind API4). However, API4 doesn't have a REST interface at ...


1

CRM.api3('StateProvince', 'get', { "sequential": 1, "return": ["name","country_id.name"], "options": {"limit":0} }) UPDATE: I haven't tried this but Lodash v3 is loaded on most civi pages so you might be able to use filter or forEach to combine the results of the above with the countryLimit ...


1

type is the data type - eg Integer, String, Boolean. If you use APIv4 Contact.getfields returns data_type with more obvious strings. For example: "data_type": "Integer" "data_type": "String",


1

You can download and install Campaign Group API3 extension, this extension should provide Campaign Group api which you can either use as chain api in Campaign api or you can use base as Campaign Group api and fetch all details of campaign by doing join on. HTH Pradeep


Only top voted, non community-wiki answers of a minimum length are eligible