We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [api]

Questions about the CiviCRM API.

Filter by
Sorted by
Tagged with
1
vote
0answers
14 views

API Explorer 4 under Joomla and Windows/IIS gives fields like {{ ts('CiviCRM API v4') }}

I am running a development system under Joomla and IIS with CiviCRM 5.19.1 (5.19.0 had the same issue). When using API Explorer 4 I get windows like this. Under LAMP, the window makes sense. Any ...
1
vote
0answers
3 views

API: Update a specific multi value field set record

I created a custom field set with three fields, the field set does allow multiple records. The aim of this field set is to collect data about candidacies and mandates of politicians, such as the ...
2
votes
2answers
27 views

How to get data via relationships with APIv4?

Wilma has relationship: is campaigner at organisation System Change Not Charity. How can I get a list of individuals like Wilma and the organisations that they are campaigners for? I've read the ...
1
vote
1answer
20 views

Does the CiviCRM API comply with the OpenAPI Specification?

Does the CiviCRM API comply with the OpenAPI Specification?
2
votes
0answers
12 views

API4 authorization failure when creating a participant

I am currently trying to create a participant on a Drupal form submit, when i do this I get an error saying Authorization failed. I've tried managing the ACLs in Civi with no success, I've also ...
1
vote
1answer
23 views

Unable to list groups with CiviCRM API

When I run the API command (via CiviCRM API Explorer) to list all the "Mailing Lists" i.e. $result = civicrm_api3('Group', 'get', ['group_type' => "Mailing List"]); I get the full list of mailing ...
0
votes
0answers
17 views

Help with Custom Function

I want to create a button that i can click that create relationships for the employee if the Employer has a relationship. So if "Employer 1" has a relationship then all Employees of Employer 1 will ...
2
votes
3answers
41 views

REST API, iATS: How do I create a membership through the API without using CiviCRM's forms?

I'm building a software system that uses CiviCRM as a membership database and a billing engine for recurring dues. Our members do not have direct access to CiviCRM or the server on which it runs, and ...
1
vote
1answer
27 views

Guidance Needed on using CiviCRM API + PayPal to Complete Membership Contribution Payment

I'm at a total loss on how to make this work. I am using the CiviCRM API to create a contact, create a membership for that contact, and even create a contribution if that person selects check, ...
4
votes
1answer
33 views

Smarty only generating nulls from API calls

Using the Explorer, I built up the smarty code I need for a template to pull in address information on a contact for use in an email: {crmAPI var='result' entity='Address' action='get' contact_id=203}...
1
vote
1answer
27 views

Get a field label instead of value using the api

I would like to retrieve both the value as well as the label from a custom field using the api, but it only seems possible to retrieve the value. I wonder if this is possible, would surely help me a ...
0
votes
1answer
19 views

Relative date filter possible in api?

I was wondering if it is possible to use (custom) relative date filters with the api? For instance to find all participants of events in the current or last fiscal year. Would save me a lot of ...
1
vote
1answer
13 views

How do I create default custom data when changing contact subtypes via the API?

If I use the API to give someone a new contact subtype it doesn't create a row in any relevant custom data tables and populate the default values. Does anyone have a good way to handle this? I have ...
2
votes
2answers
66 views

Add dupe check parameter to an API call - Contact Form 7 plugin

I've installed the Contact Form 7 CiviCRM integration plugin, and it works fine. I'm just wondering how to add a dupe_check parameter. If I try something like: contact_type=Individual&source=...
1
vote
2answers
19 views

How do i properly include civicrm.settings.php to use api calls?

Quite a long time ago I wrote an external script that does this at the top: require_once '/path/to/joomla/install/com_civicrm/civicrm.settings.php'; require_once '/path/to/joomla/install/civicrm/CRM/...
0
votes
1answer
30 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 ...
2
votes
0answers
24 views

Custom API not recognized by explorer/cv

I'm troubleshooting an issue where some custom APIs (v3) via an extension are not recognized by the site, either in the API explorer or when attempting to run them via cv. The situation is puzzling: ...
1
vote
1answer
32 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
19 views

API Contributions and Payments

I'm using the API to create Contacts start Memberships through a signup form. We are offering 1-year memberships at various price points, and I have those set up in CiviMember. My code successfully ...
2
votes
0answers
32 views

API v3 Include Some Tags and Exclude Others

I can do a custom search on Contacts to include those with a list of tags, and exclude those that also have an additional tag. And I get the results I expect. I can't for the life of me figure out ...
1
vote
1answer
32 views

Attachment API File Upload

I'm working on a file upload of an image with a registration form. The file is being passed to PHP correctly, and I can check its properties in the $_FILES variable. I used the API Explorer to get the ...
0
votes
1answer
16 views

how do I count results in API v4

experimenting with refactoring some old code and figured I would experiment with apiv4. the first hurdle was figuring out how to use the ArrayObject that is returned. in apiv3, for example I would ...
1
vote
2answers
22 views

`json` parameter in the request API

The parameters in the API are confusing, especially the depth + the json paramter. I have seen these three combinations and my question is, which variant is wrong and which is not. I can't figure ...
1
vote
2answers
37 views

How to use PDF API in production?

(This post is following a previous question I asked and is related to ErikH's answer: https://civicrm.stackexchange.com/a/31142/6991) Context: I want to send per email an attached amended certificate ...
2
votes
1answer
354 views

Where is the API key?

We want to connect CiviCRM with our payment processor (Twingle). We need to find the API key, the site key and the URL of the CiviCRM instance, but we can't seem to find them. Where can we find them?
0
votes
1answer
33 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
16 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
2answers
44 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
20 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
42 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 ...
1
vote
0answers
9 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
28 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
16 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
27 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
324 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
44 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
33 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
19 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
55 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
30 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
17 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
25 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
48 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
22 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
48 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
36 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
16 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
19 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
31 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
59 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 ...