Questions tagged [chaining]
The chaining tag has no usage guidance.
13 questions
3
votes
1
answer
164
views
Best (api4) way to chain save a contact so that the email updates, without creating a new one?
Using civicrm api4, what's the best way to chain save a contact so that the email updates, without creating a new one?
For example, I want to update this existing contact:
entity: Contact, action: get,...
3
votes
2
answers
78
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
0
answers
78
views
Chaining Participants creation using REST API
I'm trying to create an event and chain the participants creation using the REST API from python. My attempt goes like this:
import requests
params = {
"key": "key",
"api_key": "apikey",
"json": ...
0
votes
2
answers
77
views
condition on count from chained api call
I am trying to use the api to get all contacts without an address with locationtype billing. For this I use the contact get api, and do a chained address get call. Is there a way to put a condition on ...
6
votes
1
answer
485
views
What is the join logic when using API chaining with action = get?
I read about API chaining and I'm using it with get actions to learn more about how it works. I'm confused by the inconsistent behavior of the following two API calls:
CRM.api3('participant', 'get', ...
0
votes
1
answer
53
views
How to update ContentType Label through API chaining?
I try to relabel Organization as "Entity":
$result = civicrm_api3('ContactType', 'create', array(
'label' => "Entity",
'api.ContactType.get' => array('name' => "Organization"),
));
...
4
votes
1
answer
261
views
Can I chain API calls through drush?
API chaining works well in Javascript and PHP. For example, I can retrieve a contact's email addresses using this code generated by the API Explorer:
Php
$result = civicrm_api3('Contact', 'getsingle'...
2
votes
1
answer
150
views
Alias for chained API calls?
I have a query in which I need to chain api.Contact.getsingle twice, given that the entity I'm querying is linked to two different contacts for which I need to fetch the data.
The problem is that, ...
2
votes
1
answer
376
views
Chain API call cascade, pass second value as third call argument, "id is not a valid integer"
While making a cascade API call, a roadblock has been hit, here's a code:
$result = civicrm_api3('Contact', 'get', array(
'sequential' => 1,
'return' => "id",
'id' => array('IN' => ...
1
vote
1
answer
76
views
How can I find contacts based on both custom data and address via the API?
For the Electoral API extension, I want to write a scheduled job to look up legislative data for everyone who a) has a geocode, and b) doesn't already have legislative data (which is stored in a multi-...
4
votes
2
answers
371
views
CiviCRM API with Custom Data mixed with Standard Entities
I'm using CiviCRM 4.6 with the new API editor.
I'm attempting to chain a bunch of queries together, which provide cases for a client within a period, along with the linked contact, along with custom ...
2
votes
1
answer
146
views
How to debug chained API calls
How can I get back a dump of the full param array when a chained api call fails, so that I can see what values are coming back from the previous call and going into the chained call (and thus better ...
1
vote
1
answer
823
views
How to use API chaining to create a contact and a relationship
I've read all the docs I could find, the code examples, the 4.6 explorer, but I'm not grasping one piece. Below is code to create a new adult contact (via profile submit, to get some extra validation ...