Questions tagged [api]

Questions about the CiviCRM API.

Filter by
Sorted by
Tagged with
2
votes
1answer
79 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.
5
votes
3answers
610 views

How to trigger a confirmation email when registering participants via API

We have a custom module that we use to do event registrations (non - paid), however i was wondering is there anyway through the API of being able to trigger CiviCRM sending a confirmation registration ...
0
votes
1answer
22 views

Missing attribute payment_processor_id of entity Contribution in API Explorer v3?

I created a PHP 7 script that uses an API Call to get some information about a specific Contribution with a $contributionID that has been defined before. The code (below) works and correctly returns ...
3
votes
1answer
25 views

How to create an v4 api using civix tool?

I am using civix tool to create an extension. I created an API using civix tool.I want to create API v4. How to create API v4?
2
votes
1answer
26 views

Custom Fields and new version of csvimporter aka API csv Importer

I installed CiviCRM 5.41.0 and csvimporter 1.7. My overall goal is to import data from csv files. I created some custom fields, imported the standard fields using the standard importer and then ...
1
vote
0answers
21 views

Nested entity and API endpoints for a custom extension

I am working on an extension and I want a particular API endpoint structure. I'm trying to have this structure: Based on the documentation here, having entities created as direct children to the v3 ...
2
votes
1answer
99 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 '...
1
vote
1answer
134 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
28 views

Assigning existing activity to case via api fails silently - is deprecated activity revisions necessary?

Gurus, it seems that api3 civicrm_api3('Activity', 'create', [ 'id' => 1234, 'case_id' => 12, ]); does not assign the activity to the case. From my reading of funtion ...
1
vote
1answer
306 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
2answers
27 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. ...
3
votes
2answers
163 views

What is the correct REST URL in Drupal 8 (or 9)?

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 ...
0
votes
2answers
85 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
24 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
15 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....
0
votes
0answers
28 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
231 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
28 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
22 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
66 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 ...
0
votes
0answers
14 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 ...
0
votes
0answers
16 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
1answer
20 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
49 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
46 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
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
26 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
77 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
14 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
9 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
61 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
29 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
99 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
34 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
169 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
17 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
37 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
45 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
58 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
6 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
17 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
22 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
17 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
24 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 ...
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
132 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 ...

1
2 3 4 5
10