Questions tagged [api]

Questions about the CiviCRM API.

Filter by
Sorted by
Tagged with
0
votes
1answer
20 views

Create Contact from PHP

Whats wrong with this code? After submitting my form, I want to create a new contact in CRM via PHP, but it returned 500 $result = civicrm_api4('Contact', 'Create', [ 'where' => [ ['...
0
votes
1answer
12 views

Get an API key for civi update and mailings

My developer has asked me to provide an api key so that they can upgrade our version of civiCRM and set up cron and mailing system. I have no idea how to do this....
2
votes
1answer
78 views

How can I automate printing address labels?

Is there an API call available which could automatically create address labels? This could be very handy with CiviRules, to have an automatic API-action to create address labels overnight.
0
votes
0answers
24 views

Issue with WP Rest API

I've a CiviCRM 5.37 installed with a WP 5.72 in a Linux server. As a permalink WP setting I defined the "article name" syntax. Well, my problem is the follow: When I create a new mail and I ...
4
votes
2answers
224 views

Add Donations to Event Registration Form

I'm trying to give people an option to add donations to special projects when they register for a particular event. We could just point folks to the contributions pages, but it would be more effective/...
1
vote
1answer
25 views

Using the LIKE operator with a wildcard using API v3's REST interface

I am trying to do a simple GET request using a LIKE operator with a wildcard. It's easy to set up the explorer and works as expected. I'm using a demo civi environment using the example data included ...
1
vote
0answers
20 views

Bulk emails created with the APi delivered to 0 recipients

I'm using the API to send a bulk email each week to all our members. This is the code: $currentTime = new DateTime(); $approval_date = $currentTime->format('Y-m-d H:i:s'); $currentTime->add(new ...
0
votes
1answer
18 views

Has anyone got a recent example of a REST client under Drupal 9, possibly using AJAX?

I am trying to work out a way of presenting contact information from CiviCRM to another server, but am struggling to work out how one would code it. Has anyone got an example of something that works ...
2
votes
1answer
96 views

Why won't CRM.loadForm render url containing civicrm/a/#?

This call: CRM.loadForm(CRM.url('civicrm/a/#/tournament')); works very well for any url that does NOT contain 'civicrm/a/#'. As soon as I try to open anything from an extension, the popup stays '...
0
votes
0answers
13 views

API v3 Create Contact. In api.Order.create, the $value is empty

I am importing contacts from a CSV by reading it with PHP and creating an array of data, then using API v3 to create the Contact. I have been able to create the Contact, add emails, add website, add ...
1
vote
1answer
125 views

React with CiviCRM APIs

I am trying to use the CiviCRM APIs from my React application. Which API methods would be the one recommended or easy to do with React application ? The easiest would be REST but since my page and ...
1
vote
1answer
233 views

SpamAssassin marking mailings as compromised WordPress site

A few of my constituents have told me that my emails are going to their Spam folder in Gmail. I did some digging with mail-tester.com and found that SpamAssassin is dinging my mailings -1.629 points ...
0
votes
0answers
14 views

Manage ACLs for contact groups

I'm trying to limit access for a group of contacts. Let's assume that my contacts groups separated accordingly: Regular Contacts Volunteers Staff members Admins So for example I want that regular ...
0
votes
2answers
22 views

Register new account via REST application

I'm trying to register a new user account to my CiviCRM site and also to create a contact in the CiviCRM system for him. I want to do that via the REST API call application that I'm writing in python. ...
0
votes
1answer
16 views

What does 'Number of Items to Process For Each Queue Item' mean when using the API Importer extension?

I'm using Civi 5.35 and Drupal 7. We've installed the API CSV Import extension. At ~/civicrm/index.php?q=civicrm/csvimporter/import , I see a place to enter "Number Of Items To Process For Each ...
1
vote
2answers
42 views

What's the right syntax for the API3 “replace” action for the “WordReplacement” entity?

I'm trying to call the WordReplacement API v3 with the replace action. The APIv3 Explorer tells me the right PHP syntax is as show below. (I previously called WordReplacement get to get the correct id ...
1
vote
1answer
45 views

Attachment URLs incomplete on remote server only

I'm working locally on my Mac with the latest version of CiviCRM on latest WordPress, served by MAMP. Using the API, I create an attachment to a contact, and those attachments successfully display ...
0
votes
2answers
83 views

How to get contacts in children of a parent group using the API

I have a child groups C and B, each with 20 different contacts in them. Both child groups are in parent group A. I need to find all contacts in all children of A since C and B might be removed later ...
0
votes
1answer
10 views

Specified return fields in contact get do not get returned

If I do a api3 contact 'get' with no return fields specified, it obvs returns all the fields including address fields. What I want to do is only retrieve certain fields for my needs, just to reduce ...
0
votes
1answer
23 views

Export CSV of an smart group's contacts via REST API?

How can I make a REST API call to Civi that creates a CSV file with all the Contacts details (name, email, telephone...) from an specified Smart Group? Thanks.
2
votes
1answer
68 views

CiviMobileAPI Extension vs APIv3 for mobile app integration

We are building a react-native mobile app for our members and want to include some CiviCRM data and functionality in the app. Starting with some rudimentary data display eg: How long you've been a ...
0
votes
0answers
12 views

I've got API access to Contacs, lack permissions for Membership or Contribution!

I have dug deeper and more structured into my permissions problems. I have tried to access our CiviCRM via API3 REST.php? interface, designed from the APIv3 assistant. Both on releases 5.14 and 5.35 (...
1
vote
0answers
8 views

Where can I find CRM javascript object?

I want to use CRM.api3('Email', 'create', { ... call in my javascript. But the object CRM doesn't exist on my website. Which js file do I need to load to access that CRM object? I thought I'd load it ...
1
vote
1answer
55 views

Only in WORDPRESS: REST.php ---> Unable to decode supplied JSON

This is my first post for CiviCRM. Hi to all. I have seen others post related and nowadays the problem remain. Different from this post: REST API: Unable to decode supplied JSON - with wordpress ...
1
vote
1answer
28 views

Extrnal API access. Status_code 414

I am progressing deeper and deeper into CivCRM intricacies, and work with External (https://) access of the database via API's. When performing a python requests.get(....,entity=Contact,action=get) it ...
2
votes
1answer
96 views

Fetch membership type along with the contact details with civicrm_api

I am trying to create a lists of contact along with the membership type associated with each contact. Below is the code I have: $result = civicrm_api3('Contact', 'get', array( 'sequential' => ...
1
vote
1answer
29 views

API csv Import GUI with Formprocessor fails with smarty errors

I created a rather complicated form processor which works (through api), but when I tried to clone it (rename it to create so csv api picks it up) and tried to do the csv import. I get the following ...
2
votes
1answer
70 views

Call to undefined function user_load() using Drupal 9 and api3?

Full error message: Error: Call to undefined function user_load() in CRM_Utils_System_DrupalBase->getUserObject() (line 558 of /var/www/drupal/vendor/civicrm/civicrm-core/CRM/Utils/System/...
0
votes
1answer
14 views

Rest API contribution get doesn't return display_name

in my Civicrm 5.31 on Wordpress 5.5 I'm trying to retrieve contribution data via Rest API, using the apiExplorer I get the code: wp-content/plugins/civicrm/civicrm/extern/rest.php?entity=Contribution&...
0
votes
1answer
28 views

How Can I send mailing with AWS SES API instead of SMTP?

I want to send mailing with the help of AWS SES API instead of SMTP. I am using CiviCRM 5.32.2 and drupal 7.
0
votes
2answers
40 views

Mass deletion of contacts

I woudl like to mass delete contacts in my civicrm. I could search and delete using the GUI but it woudl take ages as there are so many. I feel like I might be able to do this via the api? Also ...
1
vote
2answers
56 views

API problem regarding to Word Replacement

I want to replace a word. I was trying to insert using API3 but it is not working properly. Word replacement API3 $result = civicrm_api3('WordReplacement', 'create', [ 'find_word' => "...
2
votes
2answers
33 views

How to get all active states & provinces from one api call?

I would like to get all active (i.e., in countryLimit) states & provinces available in my site for use in HTML tag. Can I query for that with a single JavaScript call to CRM.api3? I've tried: CRM....
4
votes
1answer
108 views

REST API 'between' parameters

I'm trying to make an external REST API call to rest.php. I was getting "Unable to decode supplied JSON", but then I figured out I could take the values I was stuffing into json (from the API ...
1
vote
0answers
5 views

GlobalPayments API

Has anyone successfully integrated GlobalPayments into CiviCRM? I'm running on WordPress, and there is an API for WP, but I can't find one for CiviCRM. Thanks
2
votes
1answer
29 views

CREATE action for profile missing (v3)?

I want to create a profile but I don't see that in the action dropdown. Have attached an image Please help.
0
votes
1answer
15 views

Field 'Type' in Contacts -> GetFields API

What does the 'type' refer to in the results of 'getfields' action of the Contact Entity. It has a numeric value (1,2, 16 etc). Below are a few sample results. "id": { "...
1
vote
1answer
20 views

How to import/create multiple events from .csv?

how do one import/create multiple events from an existing .csv file? I checked the "API csv Import"-Extension (https://civicrm.org/extensions/api-csv-import-gui). But this only updates ...
1
vote
0answers
16 views

Rest API for Reserve and Interview Respondents

Is there a way to Reserve and Interview Respondents using the Rest API? Couldn't find a way to do it using the 'Survey' Entity.
1
vote
1answer
23 views

Getting Groups Associated with Campaigns using REST API

CiviCampaign allows you to 'include group(s)' as a part of a Campaign. Is there a way to 'get' which groups have been associated for a given campaign ID using the REST API? The GET API for Campaign ...
3
votes
1answer
94 views

What is the correct REST URL in Drupal 8?

I know there's been a lot of work to deprecate the extern endpoints in CiviCRM, and the extern endpoints don't work in Drupal 8 without a lot of finagling. The documentation isn't updated to reflect ...
2
votes
0answers
118 views

How to trigger USPS address standardization on API address create?

It looks like addresses created by an API call do not go through the USPS address standardization routine. Is there a way to trigger the standardization through the API? Or what is the BAO function ...
2
votes
1answer
21 views

Missing information when Importing Contributions via API

I want to import a list of contacts from a csv file (specifically: the Contact IDs), and create a Contribution via API for each one of them. Purpose: These contacts are all ordering the same articles, ...
7
votes
2answers
131 views

Can I pass a GROUP BY to an API call?

I'm trying to write an API call returning all contacts that are at one end of one or more active relationships of a certain type, and their names. I note that you can specify limit, offset (LIMIT) and ...
4
votes
1answer
49 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 ...
2
votes
2answers
246 views

Is there a problem with the REST interface on CiviCRM API?

I have the CiviCRM API REST interface working fine for retrieving Case information for individual cases. But I'd like to use the options features options.limit and options.offset so I can retrieve ...
2
votes
1answer
40 views

API call for ACL roles no longer works

I have an API call to get ACL roles that worked before I upgraded to 4.7.29 (I think I was at 4.7.22). Now, this returns no results: $entity_id = $group["id"]; $apiParams = array("entity_id" =...
1
vote
1answer
81 views

Does CiviMobileAPI generate any logs?

I enabled CiviMobileAPI extension and Civi CRM Api Fix plug in (I'm using Wordpress) but can't login in the CiviMobile app (iOS). It keeps showing the Server API Error (Unknown error) message. I ...
1
vote
0answers
15 views

API csv import unable to import addresses

I am importing a large dataset using the API csv import extension. I have imported the custom fields, contacts, email and phone numbers using the different entities. I have tried to import the address ...
2
votes
1answer
69 views

APIv3 Rest URL … Could not load the settings file

I have a test instance started a day ago of CiviCRM running on Amazon EC2 using the bitnami version (https://bitnami.com/stack/civicrm/cloud) which uses Drupal 7.72 and runs CiviCRM 5.27.4 I added an ...

1
2 3 4 5
10