diff --git a/docs/api/actions.md b/docs/api/actions.md index 74a050f24adb262972985063dd489a35f4d22e35..b2cc49d32f067551db8cb0e77f20c065960a419e 100644 --- a/docs/api/actions.md +++ b/docs/api/actions.md @@ -74,6 +74,31 @@ Replace an old set of records with a new or modified set of records. Warning - REPLACE includes an implicit delete - use with care & test well before using in productions +## getunique + +Returns all unique fields (other than 'id' field) for a given entity. +```php +civicrm_api3('Contribution', 'getunique'); +``` + +return + +```php +{ + "is_error": 0, + "version": 3, + "count": 2, + "values": { + "UI_contrib_trxn_id": [ + "trxn_id" + ], + "UI_contrib_invoice_id": [ + "invoice_id" + ] + } +} +``` + ## <del>setvalue</del> **Deprecated.** Use the create action with the param 'id' instead.