Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [api]

Questions about the CiviCRM API.

0
votes
1answer
21 views

Sharing data betweeen Multiple Databases

We have a main organisation with civi multi-site build but finding it a little complex in terms of granting permissions for various sub departments. Thee are also clashes over mailings and issues with ...
0
votes
0answers
13 views

Hook to change names of reccuring events

I am going to shut my other question and try and rewrite more clearly here. I have recurring events. I want to change the name of these recurring events to add the date to them, so each one is easily ...
0
votes
1answer
25 views

CiviCRM 5.13.1 API v3 Merge not working

The merge API was worked on 5.0 version but after upgrade to 5.13.1 the merge is Stopped working. Any help is very appreciate.
1
vote
1answer
13 views

Why no Member entity in the API v4 Explorer

I can't see Member or MembershipType in the API Explorer, nor can I see support for these entities in the API code. As these are pretty crucial I must be missing something - can anyone help?
2
votes
1answer
35 views

Updating Memo/Rich Text Editor Fields with the API

I have in my CiviCRM a custom field which is a memo field with a text editor. If I update the contents of this field through the user interface contents is saved correctly as html. E.g. <p>Hello ...
0
votes
0answers
8 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?
3
votes
1answer
27 views

Getting active relationships using the API is returning contacts in trash

I'm doing this call $result = civicrm_api3('Relationship', 'getvalue', [ 'return' => "contact_id_b", 'relationship_type_id' => 5, 'contact_id_a' => "user_contact_id", 'is_active' =&...
0
votes
0answers
10 views

CIVIX: Booted CiviCRM, but failed to find 'api/class.api.php'

without apparently making any change to the environment, suddenly, the following creation of a job with civix: php civix.phar generate: api --schedule = Daily Give ImportFromGive fails with error: ...
3
votes
1answer
22 views

API call to modify contact custom data fields fails without error

I'm trying to troubleshoot an issue I'm having with api v3. I can successfully use the api to modify standard CiviCRM contact fields, but if I use the api to modify a contact's custom field the call ...
1
vote
1answer
287 views

REST API call & endpoint

Our organisation has an ios/android app and would like to receive donation thru the app. Developer requires details of REST webserver endpoint of our civicrm to receive & post contact/contribution ...
0
votes
1answer
31 views

How do I add a contact to a group using the API?

I looked in the documentation but I can't seem to find a way to add a contact to a group using the API.
0
votes
1answer
24 views

DB Error when using dupe_check in rest API

On version 5.6.0, using api v3. Not sure if something recently changed in our environment, but as of a couple of days ago, running the contact create api (via rest or the explorer) causes a "DB Error: ...
2
votes
0answers
10 views

Has anyone done anything integrating Facebook Donations?

We have a potential customer who is interested in using the Facebook Donate API to integrate with CiviCRM. Any work been done on this already?
3
votes
2answers
50 views

Get civiMail report by API

I'm trying to get Report data about a Sent email through the API. I can see the report at: www.example.com/civicrm/mailing/report?mid=388&reset=1 And I can get data corresponding to the email ...
0
votes
1answer
23 views

How to get a data for a perticular logged in user ( through API)?

I gave an ACL role to users for data segregation. I want to fetch data from database but data must filter i.e. ACL. How to get data. Also I want a userkey and sitekey?
2
votes
1answer
15 views

Why is date_created field is ignored for Contact creation via API?

when I attempt to import historical data to seed the CRM, created_date is ignored and today's date/time is used instead. Using the API explorer, it looks like the date should be saved, but, when I do ...
0
votes
1answer
18 views

API v3 get multiple results for one field

I have a custom field that can be inserted multiple times in a contact. I'm trying to get the right syntax for the API to display an array with the different results. Here what I'm trying: civicrm/...
1
vote
1answer
41 views

CiviCRM 5.12.0 - Case API returning an Analyzer object containing XML and JSON. Only want JSON

I had a working script set up to create cases in CiviCRM using REST.https://domain.com/administrator/components/com_civicrm/civicrm/extern/rest.php?entity=Case&action=create&json=1&version=...
1
vote
1answer
21 views

Is it possible to find out who installed an extension update?

One of my clients had the API v4 extension updated to 4.3.0 last evening, and so today the contact summary screen was broken - because the API extension isn't compatible with the contact summary ...
2
votes
2answers
40 views

POST format for a chained create

when I try to chain commands in the content body of a POST, the contact is created fine, but the chained address is not created. I am not OK with passing sensitive donor information as parameters in ...
1
vote
1answer
23 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 ...
0
votes
0answers
13 views

CiviRules email says it's been delivered, but it hasn't delivered / says it's from “Unknown Sender”

Using: CiviCRM 5.10.4 Drupal 7.65 E-mail API (org.civicoop.emailapi) 1.19 API v4 (org.civicrm.api4) 4.3.0 CiviRules (org.civicoop.civirules) 2.5 I've just input a new CiviRule with the following ...
1
vote
1answer
18 views

passing POST payload in Content Body

I'm unhappy at the prospect of passing sensitive data like contact details as URI parameters for a POST (where they will show in logs, etc.). Is it possible to pass the details in the content body ...
1
vote
2answers
26 views

Programmatically Re-Use CiviMail Emails

I am trying to write an extension that monthly will send a series of CiviMai emails. Basically, it would be the same if a user went to the Sent mailings and clicked Re-Use and sent the email again ...
1
vote
2answers
54 views

How to send email report FROM other than default email address?

I have a report that is sending successfully every week. Only issue is I was not able to set FROM email address for the report. It’s always sent from default email address, but I need to send from ...
1
vote
2answers
31 views

What's the problem with API V4 update to 4.3?

I just (rashly) installed API V4.3 extension & can no longer browse contacts!!? After a search and clicking the contact I got the following screen. Rather fundamental! I've raised this as an ...
1
vote
2answers
35 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' => "...
5
votes
1answer
68 views

Get URL of custom image field

I would like to display pictures which are defined as custom "File" fields within an event. I currently to this by generating URLs having the following format: MY_URL?q=civicrm/file&reset=1&...
1
vote
2answers
26 views

Updating a Case Activity using API

With case activities, the Activity Create API seems to create a new revision of the activity. Is there a way of using the API to update a case activity without adding a new revision? My code ...
1
vote
2answers
25 views

How to obtain user input from an API call

This may be a stupid question - sorry if so. I am writing an API function to create a new case, and I want it to pre-fill the New Case form with field contents based the case source contact and two or ...
2
votes
2answers
35 views

Create Case using API via REST - no “Open Case” activity created

I'm using the REST interface and the create case API to create a new case. The case is created, but no activities. In particular, no "Open Case" activity is created as I would have expected. No entry ...
1
vote
1answer
30 views

Why does API get participants return all custom fields together with the specified return field?

When I do this: $result = civicrm_api3('Participant', 'get', [ 'sequential' => 1, 'return' => ["custom_14"], 'event_id' => 3, ]); In the results I get the desired custom field, but I ...
0
votes
1answer
32 views

How to sort in descending order the results of CiviCRM API

I need to find the external identifier with highest value and hence need to sort in descending order .So I need to use sorting feature but unaware of what value should be added in screenshot shown.I ...
1
vote
1answer
29 views

Unable to update participants using civicrm api?

Instead of updating the Participant,its creating new participant.I need to change participant status from registered to attended and vice versa. civicrm_initialize(); $result = civicrm_api3('...
2
votes
1answer
53 views

What are the security considerations before allowing access AJAX API to anonymous users?

We have an autocomplete-select list in one of our profiles that we want to use on a public page. I can see the call is blocked for anonymous users because of permissions on 'access AJAX API'. I'm ...
1
vote
1answer
24 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
23 views

What is 'object_table' and 'object_id' in Acl API?

I am not understanding the meaning of 'object_role' and 'object_id' in ACL API. I was trying to manage ACL using CiviCRM API 3.
1
vote
1answer
29 views

Not inserting a ACL Role using ACL Role API

I was trying to assigning a new Users to CiviCRM ACL role through ACL Role API, but it is not showing me in database. Input json $result = civicrm_api3('AclRole', 'create', [ 'debug' => ...
1
vote
1answer
60 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 ...
1
vote
1answer
33 views

API 'match' => “external_identifier”

I am writing a script that updates contacts from an external source when their external identifier is equal to the contact being imported. My research shows (and the API explorer confirms) that it ...
0
votes
1answer
27 views

How can I skip display of repeat events on the manage events page?

I need to skip showing repeat events on the manage events section.How can that be implemented programmatically?
1
vote
1answer
53 views

How to identify if the event is a repeat event?

I want to identify repeat events and mark it as not paid event programmatically and only if the user has paid for the main event, I want to allow them for repeat events Right now I don't see any value ...
2
votes
1answer
70 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 '...
2
votes
1answer
41 views

How to retrieve custom field image files?

How can I retrieve images uploaded in custom field sets for contacts? Could you get a URL for them the same way you can for the contact "image_url" in the API? When I look up the custom field for the ...
-1
votes
0answers
27 views

How to get current logged in contact id in civicrm? [duplicate]

I want current logged in contact id. Is there any civicrm api method which can give me a current contact id?
1
vote
2answers
26 views

Correct method for API calls on contact summary page? (slow!)

I pull out some important at-a-glance information on contact summary pages - membership info, relationships via related cases, etc. At the moment i override contentsummary.tpl and do my API calls ...
3
votes
1answer
43 views

Anyone else having trouble with API Explorer v4

Compare the two screenshots below. API Explorer v3 is acting as expected, but v4 is misfiring. Couldn't find anything related here nor in the issues list. Can't help but think I'm missing something ...
0
votes
1answer
35 views

Is it planned to use SPIP as a basis CMS for CIVICRM?

SPIP is a multilingual open-source CMS created in 2001, and a lot of non-profit use it as their website tool in France and other countries. Is it planned, or do you heard about some people willing to ...
0
votes
1answer
26 views

I am trying to insert custom tab into Activity tab but it is not working

I am creating new extension. I am adding a new custom field into Activity tab but it's not working //Creating a custom group for survey function custom_group_create_survey(){ $survey_custom_group = ...
1
vote
2answers
29 views

How to add custom field using API?

I want to add a custom field use for activities (meeting)? I did that using administrator -> customize data and screen -> custom fields How can I achieve it by API 3.